Commit 52e064b0 authored by KaoruSawade's avatar KaoruSawade

Created dashboardv2 branch and edited models.py: implemented get_absolute_url...

Created dashboardv2 branch and edited models.py: implemented get_absolute_url for the WidgetUser model
parent 695274ab
from django.db import models
from django.urls import reverse
# Create your models here.
......@@ -17,3 +18,7 @@ class WidgetUser(models.Model):
def __str__(self):
return '{} {} {}'.format(self.first_name, self.middle_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