Commit 001a00e5 authored by nheoxoz's avatar nheoxoz

updated models.py with reverse

parent d523ce09
from django.db import models from django.db import models
from django.urls import reverse
class Announcement(models.Model): class Announcement(models.Model):
...@@ -19,6 +20,12 @@ class Announcement(models.Model): ...@@ -19,6 +20,12 @@ class Announcement(models.Model):
self.body, self.body,
) )
def get_absolute_url(self):
return reverse(
'announcements:announcement-details',
kwargs={'pk': self.pk},
)
class Reaction(models.Model): class Reaction(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