090500
This commit is contained in:
17
system/comments/models.py
Normal file
17
system/comments/models.py
Normal 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']
|
||||
Reference in New Issue
Block a user