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.

27 lines
535 B

2 years ago
2 years ago
  1. from django.contrib import admin
  2. from .models import Example, Comment
  3. class ExampleAdmin(admin.ModelAdmin):
  4. list_display = ("text", "project", "meta")
  5. ordering = ("project",)
  6. search_fields = ("text",)
  7. class CommentAdmin(admin.ModelAdmin):
  8. list_display = (
  9. "user",
  10. "example",
  11. "text",
  12. "created_at",
  13. )
  14. ordering = (
  15. "user",
  16. "created_at",
  17. )
  18. search_fields = ("user",)
  19. admin.site.register(Example, ExampleAdmin)
  20. admin.site.register(Comment, CommentAdmin)