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.

19 lines
477 B

  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 = ('user', 'example', 'text', 'created_at', )
  9. ordering = ('user', 'created_at', )
  10. search_fields = ('user',)
  11. admin.site.register(Example, ExampleAdmin)
  12. admin.site.register(Comment, CommentAdmin)