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
5e2ee7c4
Commit
5e2ee7c4
authored
Aug 16, 2012
by
Baptiste Mouterde
Committed by
ikoalaz
Aug 16, 2012
Browse files
comments: add license stuff and some help for migration
parent
61b12f7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/controllers/comments.py
View file @
5e2ee7c4
# -*- coding: utf-8 -*-
#
# comments.py — comments controller
#
# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/
#
# 2012 Baptiste Mouterde <baptiste.mouterde@gmail.com>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
__author__
=
'kolo'
__licence__
=
'MIT'
...
...
@@ -269,6 +297,8 @@ class CommentsController(BaseController):
c
=
CommentsScore
(
**
data
)
meta
.
session
.
add
(
c
)
#changing score of the comment
if
not
str
(
comment
.
score
).
isdigit
():
comment
.
score
=
0
if
not
good
:
comment
.
score
-=
1
else
:
...
...
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