from django.contrib import admin
from django.utils import timezone

from karspexet.show.models import Production, Show


@admin.register(Production)
class ProductionAdmin(admin.ModelAdmin):
    list_display = ("name", "alt_name")


@admin.register(Show)
class ShowAdmin(admin.ModelAdmin):
    list_display = ("date_string", "production", "venue", "visible", "is_upcoming")
    list_select_related = ("production", "venue")
    list_filter = ("visible", "production")
    exclude = ("slug",)
    ordering = ("-pk",)

    @admin.display(boolean=True)
    def is_upcoming(self, obj):
        return obj.date > timezone.now()

@@ -1,20 +1,45 @@
+from django import forms%0A
 from django.contrib 
@@ -51,16 +51,16 @@
 t admin%0A
-
 from dja
@@ -250,16 +250,487 @@
 ame%22)%0A%0A%0A
+class ShowForm(forms.ModelForm):%0A    class Meta:%0A        model = Show%0A        fields = %5B%0A            %22production%22,%0A            %22venue%22,%0A            %22date%22,%0A            %22free_seating%22,%0A            %22visible%22,%0A            %22short_description%22,%0A        %5D%0A%0A    visible = forms.BooleanField(initial=False, required=False)%0A%0A    def __init__(self, *args, **kwargs):%0A        super().__init__(*args, **kwargs)%0A        self.fields%5B%22production%22%5D.initial = Production.objects.last()%0A%0A%0A
 @admin.r
@@ -980,16 +980,16 @@
 slug%22,)%0A
-
     orde
@@ -1003,16 +1003,36 @@
 (%22-pk%22,)
+%0A    form = ShowForm
 %0A%0A    @a

Add better ShowForm