Commit 6fad3d03 authored by Nicolas Joyard's avatar Nicolas Joyard

Remove absolute url getters

parent 48c21668
...@@ -4,7 +4,6 @@ import hashlib ...@@ -4,7 +4,6 @@ import hashlib
from datetime import datetime from datetime import datetime
from django.db import models from django.db import models
from django.core.urlresolvers import reverse
from django.utils.encoding import smart_str, smart_unicode from django.utils.encoding import smart_str, smart_unicode
from django.utils.functional import cached_property from django.utils.functional import cached_property
...@@ -82,10 +81,6 @@ class Country(models.Model): ...@@ -82,10 +81,6 @@ class Country(models.Model):
def __unicode__(self): def __unicode__(self):
return u'{} [{}]'.format(self.name, self.code) return u'{} [{}]'.format(self.name, self.code)
def get_absolute_url(self):
return reverse('representatives:representative-list',
kwargs=dict(group_kind='country', group=self.name))
class Representative(HashableModel, TimeStampedModel): class Representative(HashableModel, TimeStampedModel):
""" """
...@@ -121,10 +116,6 @@ class Representative(HashableModel, TimeStampedModel): ...@@ -121,10 +116,6 @@ class Representative(HashableModel, TimeStampedModel):
class Meta: class Meta:
ordering = ['last_name', 'first_name'] ordering = ['last_name', 'first_name']
def get_absolute_url(self):
return reverse('representatives:representative-detail',
args=(self.slug,))
# Contact related models # Contact related models
...@@ -201,15 +192,6 @@ class Group(HashableModel, TimeStampedModel): ...@@ -201,15 +192,6 @@ class Group(HashableModel, TimeStampedModel):
class Meta: class Meta:
ordering = ('name',) ordering = ('name',)
def get_absolute_url(self):
if self.chamber:
return reverse('representatives:representative-list',
kwargs=dict(group_kind=self.kind, chamber=self.chamber.name,
group=self.name))
else:
return reverse('representatives:representative-list',
kwargs=dict(group_kind=self.kind, group=self.name))
class Constituency(HashableModel, TimeStampedModel): class Constituency(HashableModel, TimeStampedModel):
""" """
......
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