added is_pushed and some "styling"

This commit is contained in:
Holger Sielaff
2024-07-13 10:19:49 +02:00
parent 3640ab759d
commit e7b2dff233
7 changed files with 24 additions and 13 deletions

View File

@@ -28,8 +28,9 @@ class LabelAdmin(PermissionsAdminMixin, admin.ModelAdmin):
@admin.register(Question)
class QuestionAdmin(PermissionsAdminMixin, admin.ModelAdmin):
autocomplete_fields = ('medias', 'links', 'labels', 'shares')
list_display = ('name', 'list_labels', 'list_level', 'author')
list_display = ('name', 'list_labels', 'list_level', 'author', 'is_published')
search_fields = ('name', 'question', 'awnser', 'description', 'label__name', 'level__value', 'level__name',)
list_editable = ('is_published',)
def list_labels(self, instance):
if instance.labels: