Commit fb55de3f authored by iceman2434's avatar iceman2434

Added forums to models.py and admin.py

parent fe9bee8c
......@@ -14,7 +14,6 @@ class ForumAdmin(admin.ModelAdmin):
'fields': [
'post_title',
'post_body',
'pub_date'
]
}),
]
......
from django.db import models
from django.urls import reverse
from django.utils import timezone
class Forum(models.Model):
post_title = models.CharField(max_length=50)
post_body = models.CharField(max_length=100)
pub_date = timezone.now()
pub_date = models.DateTimeField(auto_now_add=True, editable=False)
def __str__(self):
return self.post_title
......
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