Advertisement
horozov86

admin.py for comments

Mar 25th, 2024
609
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. from django.contrib import admin
  2. from .models import Comment
  3.  
  4. @admin.register(Comment)
  5. class CommentAdmin(admin.ModelAdmin):
  6.     list_display = ('text', 'date_time_of_publication', 'to_place')
  7.     search_fields = ('text',)
  8.     list_filter = ('date_time_of_publication',)
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement