Commit e798ad5e authored by Jamesie Pic's avatar Jamesie Pic

Added Dossier.get_absolute_url

parent a3db7415
# 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')
......
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