Админка
This commit is contained in:
1 parent
7439a51d6c
commit
14ff702b4d
9 files changed
+84
-52
No files matched your search
@@ -1,6 +1,6 @@
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
|
||||
from userauth.models import DictEmployee
|
||||
|
||||
class BaseCriteria(models.Model):
|
||||
name = models.CharField(verbose_name='Название', max_length=150, blank=True, db_index=True)
|
||||
@@ -29,7 +29,11 @@ class UserComment(models.Model):
|
||||
def __str__(self):
|
||||
return str(self.user.fio())
|
||||
|
||||
def names(self):
|
||||
return DictEmployee.objects.get(login=self.user)
|
||||
|
||||
names.short_description="ФИО"
|
||||
|
||||
# Дочерняя модель
|
||||
class RatingStatus(models.Model):
|
||||
crit = models.ForeignKey(BaseCriteria, on_delete=models.PROTECT, related_name='get_criteria', verbose_name='Критерий')
|
||||
|
||||
Reference in new issue
Block a user