Это мой код:
from django.db import models
from django.contrib.auth.models import User
class Post(models.Model):
STATUS_CHOICES = (
('draft','Draft'),
('published','Published'),
)
title = models.CharField(max_length=100)
slug = models.SlugField(max_length=120)
author = models.ForeignKey(User, related_name='chat_posts')
body = models.TextField()
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
status = models.CharField(max_length=10, choices=STATUS_CHOICES, default='draft')
def __str__(self):
return self.title
и проблема с
файлом "C: -------------------------- \ models.py ", строка 20 def str (self):
IndentationError: unindent не соответствует ни одному внешнему уровню отступа для str
Может ли кто-нибудь помочь мне с этим?