photoblog/admin.py @ 7e2a0c0282b3

Really, Firefox?  I actually have to tell you to inherit the font-weight for a *div*?
author Steve Losh <steve@stevelosh.com>
date Thu, 19 Mar 2009 20:53:53 -0400
parents 1f2356294a8e
children (none)
from stevelosh.photoblog.models import Entry
from django.contrib import admin

class EntryAdmin(admin.ModelAdmin):
    fieldsets = [
        ('Entry', { 'fields': ['title', 'original_image', 'body'] }),
        ('Publishing', { 'fields': ['pub_date', 'published'] }),
        ('Advanced', { 'fields': ['slug'] }),
    ]
    save_on_top = True
    list_display = ('title', 'snippet', 'num_views', 'pub_date', 'published',)
    list_filter = ('published',)
    date_hierarchy = 'pub_date'
    ordering = ('-pub_date',)
    prepopulated_fields = { 'slug': ('title',) }

admin.site.register(Entry, EntryAdmin)