Commit c04d0a33 authored by iceman2434's avatar iceman2434

Update models.py

parent cc6c8cc5
from django.db import models from django.db import models
from django.urls import reverse from django.urls import reverse
from django.utils import timezone
class Forum(models.Model): class Forum(models.Model):
post_title = models.CharField(max_length=50) post_title = models.CharField(max_length=50)
post_body = models.CharField(max_length=100) post_body = models.CharField(max_length=100)
pub_date = models.DateTimeField(auto_now_add=True) pub_date = timezone.now()
def __str__(self): def __str__(self):
return self.post_title 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