14 lines
441 B
Python
14 lines
441 B
Python
from django.contrib import admin
|
|
from shared.admin import admin_site
|
|
|
|
from .models import Event
|
|
|
|
|
|
class EventAdmin(admin.ModelAdmin):
|
|
list_display = ['title', 'slug', 'beginning_date', 'ending_date']
|
|
readonly_fields = ['created_by', 'created_at', ]
|
|
ordering = ['title', 'beginning_date', 'ending_date', ]
|
|
search_fields = ['title', 'decription', ]
|
|
date_hierarchy = 'beginning_date'
|
|
|
|
admin_site.register(Event, EventAdmin)
|