admin.py 336 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
from django.contrib import admin

from .models import Emission, Episode

class EmissionAdmin(admin.ModelAdmin):
    prepopulated_fields = {'slug': ('title',)}

admin.site.register(Emission, EmissionAdmin)


class EpisodeAdmin(admin.ModelAdmin):
    prepopulated_fields = {'slug': ('title',)}

admin.site.register(Episode, EpisodeAdmin)