SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 4711ad5f authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Merge branch 'hotfix_JSC_20170728_fellowships'

parents 2179e93a e3bee43e
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,14 @@ def college_fellow_is_active(fellow):
'''Check if fellow is currently active.'''
return fellow.is_active()
class EditorialCollegeFellowshipAdminForm(forms.ModelForm):
contributor = forms.ModelChoiceField(
queryset=Contributor.objects.order_by('user__last_name'))
class Meta:
model = EditorialCollegeFellowship
fields = '__all__'
class EditorialCollegeFellowshipAdmin(admin.ModelAdmin):
list_display = ('__str__', 'college', college_fellow_is_active)
......@@ -191,6 +199,7 @@ class EditorialCollegeFellowshipAdmin(admin.ModelAdmin):
fields = ('contributor', 'college', 'start_date', 'until_date', 'affiliation', )
college_fellow_is_active.boolean = True
form = EditorialCollegeFellowshipAdminForm
admin.site.register(EditorialCollegeFellowship, EditorialCollegeFellowshipAdmin)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment