]> git.parisson.com Git - teleforma.git/commitdiff
Add get_absolute_url to Corrector model
authortest test <yoanl@pilotsystems.net>
Wed, 7 Jul 2021 12:56:49 +0000 (14:56 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 7 Jul 2021 12:56:49 +0000 (14:56 +0200)
teleforma/models/crfpa.py

index b5d2b014e08fc97dba76cb8a4481a7014cafc568..8dd1c04d84b08483f8c02828843183d7532ed318 100755 (executable)
@@ -360,6 +360,9 @@ class Corrector(models.Model):
             return self.user.last_name + ' ' + self.user.first_name
         except:
             return ''
+            
+    def get_absolute_url(self):
+        return reverse_lazy('teleforma-profile-detail', kwargs={'username': self.user.username}) 
 
     class Meta(MetaCore):
         db_table = app_label + '_' + 'corrector'