Added get_absolute_url function to WidgetUser Model in dashboard/models.py

parent 164e5eed
...@@ -16,3 +16,6 @@ class WidgetUser(models.Model): ...@@ -16,3 +16,6 @@ class WidgetUser(models.Model):
def __str__(self): def __str__(self):
return '{} {}'.format(self.first_name, self.last_name) return '{} {}'.format(self.first_name, self.last_name)
def get_absolute_url(self):
return reverse("widgetuser-details", kwargs={'pk': self.pk})
\ No newline at end of file
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