summaryrefslogtreecommitdiff
path: root/packages/admin.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-01 19:57:16 -0500
committerDan McGee <dan@archlinux.org>2012-07-01 20:21:23 -0500
commit43b5c29b3d89cc2e7e7109bb3c7717a87cfc67b5 (patch)
treeadcaa326a0010efdb8fd6762742492d037d210b4 /packages/admin.py
parentb547d41dbf338fb75eb2c6ae05da143a5cd32c74 (diff)
Add new package Update model
This will be used to track updates to package as we do them during reporead. By storing enough relevant fields from the package object, we should be able to produce a useful report on a regular basis of what has been happening in the repositories. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/admin.py')
-rw-r--r--packages/admin.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/admin.py b/packages/admin.py
index 0589209f..d43cecce 100644
--- a/packages/admin.py
+++ b/packages/admin.py
@@ -1,6 +1,7 @@
from django.contrib import admin
-from .models import PackageRelation, FlagRequest, Signoff, SignoffSpecification
+from .models import (PackageRelation, FlagRequest,
+ Signoff, SignoffSpecification, Update)
class PackageRelationAdmin(admin.ModelAdmin):
list_display = ('pkgbase', 'user', 'type', 'created')
@@ -9,6 +10,7 @@ class PackageRelationAdmin(admin.ModelAdmin):
ordering = ('pkgbase', 'user')
date_hierarchy = 'created'
+
class FlagRequestAdmin(admin.ModelAdmin):
list_display = ('pkgbase', 'version', 'repo', 'created', 'who', 'is_spam',
'is_legitimate', 'message')
@@ -35,9 +37,19 @@ class SignoffSpecificationAdmin(admin.ModelAdmin):
date_hierarchy = 'created'
+class UpdateAdmin(admin.ModelAdmin):
+ list_display = ('pkgname', 'repo', 'arch', 'action_flag',
+ 'old_version', 'new_version', 'created')
+ list_filter = ('action_flag', 'repo', 'arch')
+ search_fields = ('pkgname',)
+ ordering = ('-created',)
+ date_hierarchy = 'created'
+
+
admin.site.register(PackageRelation, PackageRelationAdmin)
admin.site.register(FlagRequest, FlagRequestAdmin)
admin.site.register(Signoff, SignoffAdmin)
admin.site.register(SignoffSpecification, SignoffSpecificationAdmin)
+admin.site.register(Update, UpdateAdmin)
# vim: set ts=4 sw=4 et: