2012-05-13 14:09:22 +02:00
|
|
|
from djeuscan.models import Package, Version, VersionLog, EuscanResult, \
|
2012-06-12 15:27:28 +02:00
|
|
|
Log, WorldLog, CategoryLog, HerdLog, MaintainerLog, Herd, Maintainer, \
|
2012-11-02 17:33:00 +01:00
|
|
|
RefreshPackageQuery, Category, Overlay, ProblemReport
|
2011-04-13 08:50:24 +02:00
|
|
|
from django.contrib import admin
|
|
|
|
|
2012-06-04 11:27:18 +02:00
|
|
|
|
|
|
|
class EuscanResultAdmin(admin.ModelAdmin):
|
|
|
|
search_fields = ('package__name', 'package__category')
|
2012-07-25 16:52:49 +02:00
|
|
|
list_filter = ('datetime', 'package__category')
|
2012-06-04 11:27:18 +02:00
|
|
|
ordering = ["-datetime"]
|
|
|
|
|
|
|
|
|
|
|
|
class HerdAdmin(admin.ModelAdmin):
|
|
|
|
search_fields = ('herd', 'email')
|
|
|
|
ordering = ["herd"]
|
|
|
|
|
|
|
|
|
|
|
|
class MaintainerAdmin(admin.ModelAdmin):
|
|
|
|
search_fields = ('name', 'email')
|
|
|
|
ordering = ["name"]
|
2011-11-15 16:56:20 +01:00
|
|
|
|
2012-04-28 18:16:05 +02:00
|
|
|
|
2011-11-15 16:56:20 +01:00
|
|
|
class PackageAdmin(admin.ModelAdmin):
|
|
|
|
search_fields = ('category', 'name')
|
2012-06-04 11:27:18 +02:00
|
|
|
list_filter = ('category', )
|
|
|
|
|
|
|
|
|
|
|
|
class VersionAdmin(admin.ModelAdmin):
|
|
|
|
search_fields = ('package__name', 'package__category')
|
2012-12-12 22:54:50 +01:00
|
|
|
list_filter = ('overlay', 'packaged')
|
2012-06-04 11:27:18 +02:00
|
|
|
|
2012-04-28 18:16:05 +02:00
|
|
|
|
2012-07-25 16:52:49 +02:00
|
|
|
class ProblemReportAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('package', 'subject', 'datetime')
|
|
|
|
search_fields = ('package__name', 'package__category')
|
|
|
|
list_filter = ('datetime', 'package__category')
|
|
|
|
ordering = ["-datetime"]
|
|
|
|
|
2012-08-11 13:31:57 +02:00
|
|
|
|
2011-11-15 16:56:20 +01:00
|
|
|
admin.site.register(Package, PackageAdmin)
|
|
|
|
|
2012-06-04 11:27:18 +02:00
|
|
|
admin.site.register(Herd, HerdAdmin)
|
|
|
|
admin.site.register(Maintainer, MaintainerAdmin)
|
|
|
|
|
|
|
|
admin.site.register(Version, VersionAdmin)
|
2011-11-15 16:56:20 +01:00
|
|
|
admin.site.register(VersionLog)
|
2012-06-04 11:27:18 +02:00
|
|
|
|
|
|
|
admin.site.register(EuscanResult, EuscanResultAdmin)
|
2011-11-15 16:56:20 +01:00
|
|
|
|
|
|
|
admin.site.register(Log)
|
|
|
|
admin.site.register(WorldLog)
|
|
|
|
admin.site.register(CategoryLog)
|
|
|
|
admin.site.register(HerdLog)
|
|
|
|
admin.site.register(MaintainerLog)
|
2012-06-12 15:27:28 +02:00
|
|
|
|
|
|
|
admin.site.register(RefreshPackageQuery)
|
2012-07-26 14:37:03 +02:00
|
|
|
admin.site.register(Category)
|
|
|
|
admin.site.register(Overlay)
|
2012-07-25 16:52:49 +02:00
|
|
|
|
|
|
|
admin.site.register(ProblemReport, ProblemReportAdmin)
|