Commit 02bb500a authored by Claude Paroz's avatar Claude Paroz

Removed obsolete permalink decorator

parent 6d1619d9
......@@ -21,6 +21,7 @@
import datetime
import re
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.html import escape
from django.utils.safestring import mark_safe
......@@ -131,9 +132,8 @@ class Person(User):
def as_author(self):
return "%s <%s>" % (self.name, self.email)
@models.permalink
def get_absolute_url(self):
return ('person_detail_username', [self.username])
return reverse('person_detail_username', args=[self.username])
def coordinates_teams(self):
from teams.models import Team
......
......@@ -101,9 +101,8 @@ class Module(models.Model):
def __cmp__(self, other):
return cmp(self.name, other.name)
@models.permalink
def get_absolute_url(self):
return ('stats.views.module', [self.name])
return reverse('module', args=[self.name])
def get_description(self):
return self.description and _(self.description) or self.name
......
......@@ -22,6 +22,7 @@ from datetime import datetime, timedelta
from django.db import models
from django.core import mail
from django.core.urlresolvers import reverse
from django.utils import translation
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy, ugettext as _
......@@ -104,9 +105,8 @@ class Team(models.Model):
def __unicode__(self):
return self.description
@models.permalink
def get_absolute_url(self):
return ('team_slug', [self.name])
return reverse('team_slug', args=[self.name])
def can_edit(self, user):
""" Return True if user is allowed to edit this team
......@@ -219,9 +219,8 @@ class FakeTeam(object):
self.language = language
self.description = _("No team for locale %s") % self.language.locale
@models.permalink
def get_absolute_url(self):
return ('teams.views.team', [self.language.locale])
return reverse('team_slug', args=[self.language.locale])
def can_edit(self, user):
return False
......
......@@ -24,7 +24,8 @@ from datetime import datetime, timedelta
from django.conf import settings
from django.contrib.sites.models import Site
from django.core import mail, urlresolvers
from django.core import mail
from django.core.urlresolvers import reverse
from django.db import models
from django.db.models import Max
from django.db.models.signals import post_save, pre_delete
......@@ -83,9 +84,8 @@ class State(models.Model):
return "%s: %s %s (%s - %s)" % (self.name, self.branch.module.name,
self.branch.name, self.language.name, self.domain.name)
@models.permalink
def get_absolute_url(self):
return ('vertimus_by_ids', [self.branch.id, self.domain.id, self.language.id])
return reverse('vertimus_by_ids', args=[self.branch.id, self.domain.id, self.language.id])
@property
def stats(self):
......@@ -520,7 +520,7 @@ class Action(ActionAbstract):
return
current_site = Site.objects.get_current()
url = "https://%s%s" % (current_site.domain, urlresolvers.reverse(
url = "https://%s%s" % (current_site.domain, reverse(
'vertimus_by_names',
args = (
state.branch.module.name,
......
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