admin.py 998 Bytes
Newer Older
1 2
from django.contrib import admin

fred's avatar
fred committed
3
from .models import Emission, Episode, Category, Schedule, \
fred's avatar
fred committed
4
        SoundFile, NewsItem, NewsCategory, Nonstop
5 6 7 8 9 10 11 12 13 14 15

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)
fred's avatar
fred committed
16 17 18 19 20 21 22 23 24 25 26 27


class CategoryAdmin(admin.ModelAdmin):
    pass

admin.site.register(Category, CategoryAdmin)


class ScheduleAdmin(admin.ModelAdmin):
    pass

admin.site.register(Schedule, ScheduleAdmin)
fred's avatar
fred committed
28 29 30 31 32 33 34 35 36 37 38 39


class NewsCategoryAdmin(admin.ModelAdmin):
    pass

admin.site.register(NewsCategory, NewsCategoryAdmin)


class NewsItemAdmin(admin.ModelAdmin):
    pass

admin.site.register(NewsItem, NewsItemAdmin)
fred's avatar
fred committed
40 41 42 43 44 45


class SoundFileAdmin(admin.ModelAdmin):
    pass

admin.site.register(SoundFile, SoundFileAdmin)
fred's avatar
fred committed
46 47 48 49 50 51


class NonstopAdmin(admin.ModelAdmin):
    pass

admin.site.register(Nonstop, NonstopAdmin)