]> git.parisson.com Git - teleforma.git/commitdiff
set absolute profile url
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 19 May 2015 14:08:11 +0000 (16:08 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 19 May 2015 14:08:11 +0000 (16:08 +0200)
teleforma/models/crfpa.py

index 55f2707055f7a4975cced17fa17d91aefb3f73e0..ed6768a3935d82a1eb30ec91cee914d41e677b3f 100644 (file)
@@ -166,6 +166,9 @@ class Student(Model):
     def balance(self):
         return  round(self.total_payments - self.total_fees, 2)
 
+    def get_absolute_url(self):
+        return reverse_lazy('teleforma-profile-detail', kwargs={'username':self.user.username})
+
     class Meta(MetaCore):
         db_table = app_label + '_' + 'student'
         verbose_name = _('Student')