fix: resolved relationship with WidgetUser and the models in thee Forum app

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