Skip to content
Extraits de code Groupes Projets
Valider e798ad5e rédigé par Jamesie Pic's avatar Jamesie Pic
Parcourir les fichiers

Added Dossier.get_absolute_url

parent a3db7415
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
# 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')
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter