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, blank=True, default='')
    content = models.TextField(max_length=1024, blank=True, default='')
    author = models.ForeignKey(User, on_delete=models.SET(get_null_user))

@@ -465,16 +465,38 @@
 ey(User,
+ related_name='posts',
  on_dele
@@ -525,8 +525,149 @@
 _user))%0A
+%0A    def __str__(self):%0A        if self.title is not None:%0A            return self.title%0A        else:%0A            return %22New Post%22%0A        

add str method and author related name.