evorepo/main/admin.py
Dan McGee d21d8be018 UserProfile model and fields shuffle
Move this model into the devel/ application, and move the PGPKeyField
which is used only by these models into the application as well. This
involves updating some old migrations along the way to ensure we don't
reference a field class that no longer exists.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20 11:15:03 -05:00

42 lines
1.3 KiB
Python

from django.contrib import admin
from main.models import Arch, Donor, Package, Repo, Todolist
class DonorAdmin(admin.ModelAdmin):
list_display = ('name', 'visible', 'created')
list_filter = ('visible', 'created')
search_fields = ('name',)
exclude = ('created',)
class ArchAdmin(admin.ModelAdmin):
list_display = ('name', 'agnostic')
list_filter = ('agnostic',)
search_fields = ('name',)
class RepoAdmin(admin.ModelAdmin):
list_display = ('name', 'testing', 'staging', 'bugs_project',
'bugs_category', 'svn_root')
list_filter = ('testing', 'staging')
search_fields = ('name',)
class PackageAdmin(admin.ModelAdmin):
list_display = ('pkgname', 'full_version', 'repo', 'arch', 'packager',
'last_update', 'build_date')
list_filter = ('repo', 'arch')
search_fields = ('pkgname', 'pkgbase', 'pkgdesc')
date_hierarchy = 'build_date'
class TodolistAdmin(admin.ModelAdmin):
list_display = ('name', 'date_added', 'creator', 'description')
search_fields = ('name', 'description')
admin.site.register(Donor, DonorAdmin)
admin.site.register(Package, PackageAdmin)
admin.site.register(Arch, ArchAdmin)
admin.site.register(Repo, RepoAdmin)
admin.site.register(Todolist, TodolistAdmin)
# vim: set ts=4 sw=4 et: