from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.db import models

def get_null_user():
    return get_user_model().objects.get_or_create(username='deleted')


class Post(models.Model):
    created = models.DateTimeField(auto_now_add=True)
    title = models.CharField(max_length=128)
    content = models.TextField(max_length=1024)
    author = models.ForeignKey(User, related_name='posts',
                               on_delete=models.SET(get_null_user))
    slug = models.SlugField()

    def __str__(self):
        if self.title is not None:
            return self.title
        else:
            return "New Post"

@@ -56,62 +56,52 @@
 ngo.
-contrib.auth.models import User%0Afrom django.db
+db import models%0A%0Afrom boards.models
  import 
 mode
@@ -96,22 +96,22 @@
  import 
-models
+Board%0A
 %0A%0Adef ge
@@ -197,16 +197,95 @@
 ted')%0A%0A%0A
+def get_null_board():%0A    return Board.objects.get_or_create(name='deleted')%0A%0A%0A
 class Po
@@ -484,12 +484,24 @@
 Key(
-User
+get_user_model()
 , re
@@ -596,12 +596,13 @@
     
-slug
+board
  = m
@@ -611,127 +611,216 @@
 els.
-SlugField()%0A%0A    def __str__(self):%0A        if self.title is not None:%0A            return self.title%0A        else:%0A    
+ForeignKey(Board, related_name='posts', %0A                              on_delete=models.SET(get_null_board))%0A    slug = models.SlugField()%0A    key = models.CharField(max_length=6)%0A    %0A    def __str__(self):%0A
     
@@ -834,15 +834,15 @@
 urn 
-%22New Post%22
+self.title
 %0A

add fields/methods to integrate board app.