Commit afefbf73 authored by Okhin's avatar Okhin

Fixing the get_absolute_url aprt

parent 1b0921eb
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment