event admin
This commit is contained in:
parent
20fad42d6d
commit
7064e89059
1 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,14 @@
|
||||||
from django.contrib import admin
|
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)
|
||||||
|
|
Loading…
Reference in a new issue