Added imports

parent 6be0584e
from django.db import models from django.db import models
from django.urls import reverse from django.urls import reverse
from dashboard.model import WidgetUser
# Create your models here. # Create your models here.
class ForumPost(models.Model): class ForumPost(models.Model):
title = models.CharField(max_length=50) title = models.CharField(max_length=50)
body = models.TextField() body = models.TextField()
author = models.CharField(max_length=50) author = models.ForeignKey(
WidgetUser,
on_delete=models.CASCADE
)
pub_datetime = models.DateTimeField() pub_datetime = models.DateTimeField()
def __str__(self): def __str__(self):
......
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