fix: resolved a bug that references WidgetUser to the models of the forum app

parent a6c815ae
from django.db import models
from homepage.models import WidgetUser
# Create your models here.
class Post(models.Model):
author = models.ForeignKey('homepage.WidgetUser', on_delete=models.CASCADE)
author = models.ForeignKey(WidgetUser, on_delete=models.CASCADE)
post_title = models.CharField(max_length=100)
post_body = models.CharField(max_length=1000)
pub_date = models.DateTimeField("Date published")
class Reply(models.Model):
author = models.ForeignKey('homepage.WidgetUser', on_delete=models.CASCADE)
author = models.ForeignKey(WidgetUser, on_delete=models.CASCADE)
reply_body = models.CharField(max_length=1000)
pub_date = models.DateTimeField("Replied on")
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