Commit e276ee54 authored by RJC's avatar RJC

refactor WidgetUser model into Dashboard app

parents 31e10e73 1c479d15
from django.db import models
from django.contrib.auth.models import User
from Dashboard.models import WidgetUser
# Create your models here.
# temporary user model for testing
class WidgetUser(User):
pass
class ForumPost(models.Model):
title = models.CharField(max_length=255, blank=True, null=True)
......@@ -12,6 +9,7 @@ class ForumPost(models.Model):
author = models.ForeignKey(WidgetUser, related_name='forumpost', on_delete=models.CASCADE, null=True)
pub_datetime = models.DateTimeField(auto_now_add=True)
class Reply(models.Model):
forumpost = models.ForeignKey(ForumPost, related_name='reply', on_delete=models.CASCADE, null=True)
body = models.TextField(blank=True, null=True)
......
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