Piki is a minimal wiki
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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)