Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
b4a55aad
Commit
b4a55aad
authored
Aug 09, 2012
by
Baptiste Mouterde
Committed by
ikoalaz
Aug 09, 2012
Browse files
comments : remove older and useless comments model
parent
b7c66c23
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/model/comments.py
deleted
100644 → 0
View file @
b7c66c23
"""
holds comments engine
"""
__author__
=
'Baptiste Mouterde'
__licence__
=
'MIT'
import
sqlalchemy
as
sa
import
meta
from
sqlalchemy
import
orm
from
debexpo.model
import
OrmObject
from
debexpo.model.packages
import
Package
from
debexpo.model.users
import
User
t_comments
=
sa
.
Table
(
'comment'
,
meta
.
metadata
,
sa
.
Column
(
'id'
,
sa
.
types
.
Integer
,
primary_key
=
True
),
sa
.
Column
(
'author_id'
,
sa
.
types
.
Integer
,
sa
.
ForeignKey
(
'users.id'
)),
sa
.
Column
(
'parent_id'
,
sa
.
types
.
Integer
,
sa
.
ForeignKey
(
'comment.id'
)),
sa
.
Column
(
'index'
,
sa
.
types
.
Integer
),
sa
.
Column
(
'package_id'
,
sa
.
types
.
Integer
,
sa
.
ForeignKey
(
'packages.id'
)),
sa
.
Column
(
'revision'
,
sa
.
types
.
String
(
40
)),
sa
.
Column
(
'style'
,
sa
.
types
.
String
(
10
)),
sa
.
Column
(
'file'
,
sa
.
types
.
String
(
100
),
nullable
=
True
),
sa
.
Column
(
'title'
,
sa
.
types
.
String
(
100
)),
sa
.
Column
(
'content'
,
sa
.
types
.
String
(
500
)),
sa
.
Column
(
'start'
,
sa
.
types
.
Integer
,
nullable
=
True
),
sa
.
Column
(
'stop'
,
sa
.
types
.
Integer
,
nullable
=
True
),
)
class
Comment
(
OrmObject
):
foreign
=
[
'author'
,
'parent_id'
,
'package_id'
]
orm
.
mapper
(
Comment
,
t_comments
,
properties
=
{
'users'
:
orm
.
relation
(
User
),
'comment'
:
orm
.
relation
(
Comment
),
'packages'
:
orm
.
relation
(
Package
)}
)
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment