This commit is contained in:
2024-05-10 09:38:31 +03:00
parent 9a5f895b93
commit 49cc44027d
81 changed files with 6093 additions and 28 deletions

17
system/comments/models.py Normal file
View File

@@ -0,0 +1,17 @@
from django.db import models
from django.conf import settings
""" Комментарии основная модель """
class Comment(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
content = models.TextField(verbose_name='Комментарий', help_text='Введите комментарий')
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
class Meta:
verbose_name = 'Комментарий'
verbose_name_plural = 'Комментарии'
ordering = ['-created']