Карусель 1 часть
This commit is contained in:
1 parent
1b3ac28ddf
commit
e83ea1300f
11 files changed
+57
-47
No files matched your search
@@ -11,28 +11,8 @@ class RatingStatusInline(admin.TabularInline):
|
||||
readonly_fields=( 'crit', 'rating')
|
||||
can_delete = False
|
||||
show_change_link = False
|
||||
|
||||
extra = 0
|
||||
|
||||
# class GetRatFilter(admin.SimpleListFilter):
|
||||
# title = 'get_rat'
|
||||
# parameter_name = 'get_rat'
|
||||
|
||||
# def lookups(self, request, model_admin):
|
||||
# return (
|
||||
# ('Yes', 'Yes'),
|
||||
# ('No', 'No'),
|
||||
# )
|
||||
|
||||
# def queryset(self, request, queryset):
|
||||
# value = self.value()
|
||||
# print(self.value(), '---------------------------')
|
||||
|
||||
# if value < 5:
|
||||
# return queryset.filter(comment='Я усталь')
|
||||
# if value > 5:
|
||||
# return queryset.filter(comment='qqqq')
|
||||
|
||||
class UserCommentAdmin(admin.ModelAdmin):
|
||||
fields = ( 'comment', ('get_rat', 'user', 'time_create'))
|
||||
list_display=('user', 'time_create', 'comment', 'get_rat', 'utility')
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ class BaseCriteria(models.Model):
|
||||
rating = models.IntegerField(verbose_name='Рейтинг', default=5, blank=True)
|
||||
color = models.CharField(verbose_name='Цвет иконки', max_length=150, null=True, blank=True)
|
||||
class Meta:
|
||||
verbose_name = "Критерии оценки"
|
||||
verbose_name_plural = "Критерии оценки"
|
||||
verbose_name = "Справочник - Критерии оценки"
|
||||
verbose_name_plural = "Справочник - Критерии оценки"
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
|
||||
|
||||
Reference in new issue
Block a user