aboutsummaryrefslogtreecommitdiffstats
path: root/rrs/admin.py
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2015-01-28 17:38:04 -0600
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:51 +1200
commitac485c0cc4fcdfe9296ec6b1a913fa963c4f53f7 (patch)
treeb571a0af1f6206b182e6c688070efb1da3b25c00 /rrs/admin.py
parenta1244395bb66e04f41733b2b61c4feda359e684b (diff)
downloadopenembedded-core-contrib-ac485c0cc4fcdfe9296ec6b1a913fa963c4f53f7.tar.gz
rrs: Add support for Recipe maintainership history
Now can you get maintainers based on Milestones. Feature changes, rrs/models.py: Add RecipeMaintainerHistory to store maintainer updates. rrs/admin.py: Add admin site for RecipeMaintainerHistory. Adapt changes, Now you need to specify RecipeMaintainerHistory to get RecipeMaintainer, changes into rrs/view.py. These set of changes are incompatible with the previous version you need to do initial setup described in README.rrs. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Diffstat (limited to 'rrs/admin.py')
-rw-r--r--rrs/admin.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/rrs/admin.py b/rrs/admin.py
index 04b04c0916..264f02a5cb 100644
--- a/rrs/admin.py
+++ b/rrs/admin.py
@@ -7,8 +7,9 @@
from django.contrib import admin
from django.contrib.admin import DateFieldListFilter
-from rrs.models import Milestone, Maintainer, RecipeMaintainer, RecipeDistro, \
- RecipeUpgrade, RecipeUpstream, RecipeUpstreamHistory
+from rrs.models import Milestone, Maintainer, RecipeMaintainerHistory, \
+ RecipeMaintainer, RecipeDistro, RecipeUpgrade, RecipeUpstream, \
+ RecipeUpstreamHistory
class MilestoneAdmin(admin.ModelAdmin):
search_fields = ['name']
@@ -18,9 +19,14 @@ class MaintainerAdmin(admin.ModelAdmin):
search_fields = ['name']
model = Maintainer
+class RecipeMaintainerHistoryAdmin(admin.ModelAdmin):
+ search_fields = ['title', 'author__name', 'sha1']
+ list_filter = ['author__name', ('date', DateFieldListFilter)]
+ model = RecipeMaintainerHistory
+
class RecipeMaintainerAdmin(admin.ModelAdmin):
search_fields = ['recipe__pn']
- list_filter = ['recipe__layerbranch__layer__name', 'maintainer__name']
+ list_filter = ['recipe__layerbranch__layer__name', 'history', 'maintainer__name']
model = RecipeMaintainer
class RecipeDistroAdmin(admin.ModelAdmin):
@@ -49,6 +55,7 @@ class RecipeUpstreamAdmin(admin.ModelAdmin):
admin.site.register(Milestone, MilestoneAdmin)
admin.site.register(Maintainer, MaintainerAdmin)
+admin.site.register(RecipeMaintainerHistory, RecipeMaintainerHistoryAdmin)
admin.site.register(RecipeMaintainer, RecipeMaintainerAdmin)
admin.site.register(RecipeDistro, RecipeDistroAdmin)
admin.site.register(RecipeUpgrade, RecipeUpgradeAdmin)