euscanwww: Admin interface tweaks
Added some search fields, ordering and filters to the admin panel Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
parent
60e2019cc3
commit
c41521d59f
@ -2,18 +2,42 @@ from djeuscan.models import Package, Version, VersionLog, EuscanResult, \
|
|||||||
Log, WorldLog, CategoryLog, HerdLog, MaintainerLog, Herd, Maintainer
|
Log, WorldLog, CategoryLog, HerdLog, MaintainerLog, Herd, Maintainer
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
admin.site.register(Herd)
|
|
||||||
admin.site.register(Maintainer)
|
class EuscanResultAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ('package__name', 'package__category')
|
||||||
|
list_filter = ('datetime', )
|
||||||
|
ordering = ["-datetime"]
|
||||||
|
|
||||||
|
|
||||||
|
class HerdAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ('herd', 'email')
|
||||||
|
ordering = ["herd"]
|
||||||
|
|
||||||
|
|
||||||
|
class MaintainerAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ('name', 'email')
|
||||||
|
ordering = ["name"]
|
||||||
|
|
||||||
|
|
||||||
class PackageAdmin(admin.ModelAdmin):
|
class PackageAdmin(admin.ModelAdmin):
|
||||||
search_fields = ('category', 'name')
|
search_fields = ('category', 'name')
|
||||||
|
list_filter = ('category', )
|
||||||
|
|
||||||
|
|
||||||
|
class VersionAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ('package__name', 'package__category')
|
||||||
|
list_filter = ('overlay', 'packaged', 'alive')
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(Package, PackageAdmin)
|
admin.site.register(Package, PackageAdmin)
|
||||||
|
|
||||||
admin.site.register(Version)
|
admin.site.register(Herd, HerdAdmin)
|
||||||
|
admin.site.register(Maintainer, MaintainerAdmin)
|
||||||
|
|
||||||
|
admin.site.register(Version, VersionAdmin)
|
||||||
admin.site.register(VersionLog)
|
admin.site.register(VersionLog)
|
||||||
admin.site.register(EuscanResult)
|
|
||||||
|
admin.site.register(EuscanResult, EuscanResultAdmin)
|
||||||
|
|
||||||
admin.site.register(Log)
|
admin.site.register(Log)
|
||||||
admin.site.register(WorldLog)
|
admin.site.register(WorldLog)
|
||||||
|
Loading…
Reference in New Issue
Block a user