diff --git a/representatives_votes/models.py b/representatives_votes/models.py index 41514fde5bc57fa4d219984e0e41faa2132a85a2..f9609c69782a189427dc1b7ade78669e884b6081 100644 --- a/representatives_votes/models.py +++ b/representatives_votes/models.py @@ -1,21 +1,5 @@ # coding: utf-8 - -# This file is part of toutatis. -# -# toutatis is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of -# the License, or any later version. -# -# toutatis is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU General Affero Public -# License along with django-representatives. -# If not, see <http://www.gnu.org/licenses/>. - +from django.core.urlresolvers import reverse from django.db import models from representatives.models import (HashableModel, Representative, @@ -33,6 +17,9 @@ class Dossier(HashableModel, TimeStampedModel): def __unicode__(self): return unicode(self.title) + def get_absolute_url(self): + return reverse('representatives_votes:dossier-detail', args=(self.pk,)) + class Proposal(HashableModel, TimeStampedModel): dossier = models.ForeignKey(Dossier, related_name='proposals')