project/kiwipycon/talk/admin.py
changeset 1 fda1c66b25f9
equal deleted inserted replaced
0:9a77edda77b7 1:fda1c66b25f9
       
     1 # -*- coding: utf-8 -*-
       
     2 from __future__ import absolute_import
       
     3 
       
     4 #django.contrib
       
     5 from django.contrib import admin
       
     6 
       
     7 #kiwipycon
       
     8 from .models import Talk
       
     9 
       
    10 class TalkAdmin(admin.ModelAdmin):
       
    11     list_display = ('title', 'speaker', 'topic', 'duration', 'audience', 'approved')
       
    12     list_filter = ('approved', 'audience', 'topic', 'speaker')
       
    13     search_fields = ('slug', 'title', 'abstract')
       
    14     prepopulate_from = {'slug': ('title',)}
       
    15     fieldsets = (
       
    16         ('Details', {
       
    17             'fields': ('slug', 'title', 'abstract', 'speaker')
       
    18         }),
       
    19         ('Information', {
       
    20             'fields': ('topic', 'duration', 'audience', 'approved')
       
    21         }),
       
    22     )
       
    23 admin.site.register(Talk, TalkAdmin)