Commit e798ad5e authored by Jamesie Pic's avatar Jamesie Pic
Browse files

Added Dossier.get_absolute_url

parent a3db7415
# coding: utf-8 # coding: utf-8
from django.core.urlresolvers import reverse
# 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
# 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 <>.
from django.db import models from django.db import models
from representatives.models import (HashableModel, Representative, from representatives.models import (HashableModel, Representative,
...@@ -33,6 +17,9 @@ class Dossier(HashableModel, TimeStampedModel): ...@@ -33,6 +17,9 @@ class Dossier(HashableModel, TimeStampedModel):
def __unicode__(self): def __unicode__(self):
return unicode(self.title) return unicode(self.title)
def get_absolute_url(self):
return reverse('representatives_votes:dossier-detail', args=(,))
class Proposal(HashableModel, TimeStampedModel): class Proposal(HashableModel, TimeStampedModel):
dossier = models.ForeignKey(Dossier, related_name='proposals') 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