event admin

This commit is contained in:
Qwann 2018-08-20 15:16:40 +02:00
parent 20fad42d6d
commit 7064e89059

View file

@ -1,3 +1,14 @@
from django.contrib import admin
from shared.admin import admin_site
# Register your models here.
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)