feat: article creation
This commit is contained in:
@@ -2,7 +2,7 @@ from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
class Article(models.Model):
|
||||
title = models.CharField(max_length=200)
|
||||
title = models.CharField(max_length=200, unique=True)
|
||||
author = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
text = models.TextField()
|
||||
created_date = models.DateField(auto_now_add=True)
|
||||
|
||||
Reference in New Issue
Block a user