Commit 43a70fc3 authored by Jan Enzo Salvador's avatar Jan Enzo Salvador

Added get_absolute_url function

parent b115622d
from django.db import models
from dashboard.models import WidgetUser
from django.urls import reverse
# Forum Post
# title; body; author; pub_datetime;
......@@ -12,6 +13,9 @@ class ForumPost(models.Model):
def __str__(self):
return self.title
def get_absolute_url(self):
return reverse('forumpost-details', kwargs={'pk':self.pk})
# Reply
# body; author; pub_datetime; forum_post;
class Reply(models.Model):
......
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