Added some logic

This commit is contained in:
maciejrusek
2026-03-18 19:14:26 +01:00
parent fdcd0653a6
commit 5722f0b7ea
13 changed files with 211 additions and 44 deletions

View File

@@ -1,6 +1,6 @@
# from django.db import models
# from apps.user.models import User
from django.db import models
from apps.user.models import User
# class Author(models.Model):
# user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="Authors")
# name = models.CharField(max_length=255)
class Author(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="authors")
name = models.CharField(max_length=255)