Piki is a minimal wiki
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

admin.py 584B

12345678910111213141516171819
  1. from django.contrib import admin
  2. from simple_history.admin import SimpleHistoryAdmin
  3. from .models import PikiPage
  4. class PikiPageAdmin(SimpleHistoryAdmin):
  5. list_display = ('rel_path', 'tags', 'deleted')
  6. history_list_display = ('rel_path', 'tags', 'deleted')
  7. search_fields = ('rel_path', 'tags', )
  8. list_filter = (
  9. ('deleted', admin.BooleanFieldListFilter),
  10. ('other_perms_read', admin.BooleanFieldListFilter),
  11. ('other_perms_write', admin.BooleanFieldListFilter),
  12. )
  13. ordering = ["rel_path"]
  14. admin.site.register(PikiPage, PikiPageAdmin)