Improve admin view
This commit is contained in:
parent
cd3fc7956d
commit
e066cf2c03
1 changed files with 8 additions and 2 deletions
|
@ -2,5 +2,11 @@ from django.contrib import admin
|
|||
|
||||
from .models import Event, EventRegistration
|
||||
|
||||
admin.site.register(Event)
|
||||
admin.site.register(EventRegistration)
|
||||
|
||||
class RegistrationInline(admin.StackedInline):
|
||||
model = EventRegistration
|
||||
|
||||
class EventAdmin(admin.ModelAdmin):
|
||||
inlines = [RegistrationInline]
|
||||
|
||||
admin.site.register(Event, EventAdmin)
|
||||
|
|
Loading…
Reference in a new issue