Mercurial > public > sg101
view gpp/downloads/admin.py @ 58:02e5dfa830cc
#11 Update Blueprints to 0.9. Also update the conditional IE specific include of the ie.css file. Hopefully this will resolve some issues seen with IE8.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 24 Jun 2009 00:18:53 +0000 |
parents | d6f3c38e8f50 |
children | 341759e1cda1 |
line wrap: on
line source
""" This file contains the automatic admin site definitions for the downloads models. """ from django.contrib import admin from django.conf import settings from downloads.models import Download from downloads.models import Category from downloads.models import AllowedExtension from downloads.models import VoteRecord class DownloadAdmin(admin.ModelAdmin): exclude = ('html', ) list_display = ('title', 'user', 'category', 'date_added', 'ip_address', 'hits', 'average_score', 'size', 'is_public') list_filter = ('date_added', 'is_public', 'category', 'user', 'ip_address') date_hierarchy = 'date_added' ordering = ('-date_added', ) search_fields = ('title', 'description', 'user__username') raw_id_fields = ('user', ) save_on_top = True class VoteRecordAdmin(admin.ModelAdmin): list_display = ('user', 'download', 'vote_date') list_filter = ('user', 'download') date_hierarchy = 'vote_date' admin.site.register(Download, DownloadAdmin) admin.site.register(Category) admin.site.register(AllowedExtension) admin.site.register(VoteRecord, VoteRecordAdmin) # vim: ts=4 sw=4