Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Respect My Net
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Lohninger
Respect My Net
Commits
afefbf73
Commit
afefbf73
authored
Apr 05, 2016
by
Okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the get_absolute_url aprt
parent
1b0921eb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
bt/models.py
bt/models.py
+2
-3
No files found.
bt/models.py
View file @
afefbf73
from
django.db
import
models
from
django.core.urlresolvers
import
reverse
from
django.utils.translation
import
ugettext_lazy
as
_
from
django_comments.moderation
import
CommentModerator
,
moderator
...
...
@@ -111,10 +112,8 @@ class Violation(models.Model):
def
operator
(
self
):
return
self
.
operator_ref
.
name
@
models
.
permalink
def
get_absolute_url
(
self
):
return
(
'violation_url'
,
(),
{
'id'
:
self
.
pk
})
return
reverse
(
'violation_url'
,
args
=
(
self
.
pk
))
def
__unicode__
(
self
):
return
"#%s %s/%s"
%
(
self
.
pk
,
self
.
country
,
self
.
operator
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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