Improve admin view

This commit is contained in:
Midgard 2020-07-22 05:02:01 +02:00
parent cd3fc7956d
commit e066cf2c03
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -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)