Commit ce604261 authored by Joshua de Vera's avatar Joshua de Vera

models updated

parent 1fc0333b
from django.db import models
from django.urls import reverse
class AnnouncementAdmin(models.Model):
class Announcement(models.Model):
announcement_title= models.CharField(max_length=50)
announcement_body = models.CharField(max_length=200)
pub_date = models.DateTimeField(auto_now_add=True)
......@@ -10,7 +10,7 @@ class AnnouncementAdmin(models.Model):
return self.full_announcement
def get_absolute_url(self):
return reverse('Announcement', args=[(self.full_name)])
return reverse('Announcement', args=[(self.full_announcement)])
@property
def full_announcement(self):
......
......@@ -40,6 +40,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'widget_group3'
]
MIDDLEWARE = [
......
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