from django.contrib import admin

from us_ignite.events.models import Event


class EventAdmin(admin.ModelAdmin):
    list_display = ('name', 'status', 'start_datetime', 'is_featured')
    search_fields = ('name', 'slug', 'venue', 'description', 'notes')
    list_filter = ('status', 'start_datetime', 'is_featured', 'created')
    date_hierarchy = 'start_datetime'

admin.site.register(Event, EventAdmin)

from django.contrib import admin

from us_ignite.events.models import Event, EventURL


class EventURLAdminInline(admin.TabularInline):
    model = EventURL


class EventAdmin(admin.ModelAdmin):
    list_display = ('name', 'status', 'start_datetime', 'is_featured')
    search_fields = ('name', 'slug', 'venue', 'description', 'notes')
    list_filter = ('status', 'start_datetime', 'is_featured', 'created')
    date_hierarchy = 'start_datetime'
    inlines = [EventURLAdminInline]

admin.site.register(Event, EventAdmin)

Add admin inline forms for the ``EventURLs``.