* Now Feedback have manytomany to posotions, so a feedback email can be associated to few positions. * Add user and time field to nomination model * Delete feedbacks and questionnaires field from nomineeposition model, now feedback model has all information about nominations, feedback and quiestionnaires * Add user field to Feedback model to know the nomcom meber who made the nomination, regardless of the real author * Add nomcom field to Feedback and refactor EncryptedTextField, it's necessary to encrypt the comments with the nomcom public key. * Template tag to decrypt feedback has been improved, now It isn't necessary the view context has the private key variable. * Add skel view to view feedback * Delete hidden fields from private and public feedback form * Refactor private index view to show total number of questionnaires and to show if the nomienee has questionnaires or not See #970 - Legacy-Id: 5571
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
from django.contrib import admin
|
|
|
|
from ietf.nomcom.models import NomCom, Nomination, Nominee, NomineePosition, \
|
|
Position, Feedback
|
|
|
|
|
|
class NomComAdmin(admin.ModelAdmin):
|
|
raw_id_fields = ('group', )
|
|
|
|
|
|
class NominationAdmin(admin.ModelAdmin):
|
|
list_display = ('candidate_email', 'nominator_email', 'position')
|
|
|
|
|
|
class NomineeAdmin(admin.ModelAdmin):
|
|
list_display = ('email',)
|
|
|
|
|
|
class NomineePositionAdmin(admin.ModelAdmin):
|
|
pass
|
|
list_display = ('nominee', 'position', 'state')
|
|
list_filter = ('state', 'position')
|
|
|
|
|
|
class PositionAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'nomcom', 'is_open', 'incumbent')
|
|
list_filter = ('nomcom',)
|
|
|
|
|
|
class FeedbackAdmin(admin.ModelAdmin):
|
|
list_display = ('nominee', 'author', 'type')
|
|
list_filter = ('type',)
|
|
|
|
admin.site.register(NomCom, NomComAdmin)
|
|
admin.site.register(Nomination, NominationAdmin)
|
|
admin.site.register(Nominee, NomineeAdmin)
|
|
admin.site.register(NomineePosition, NomineePositionAdmin)
|
|
admin.site.register(Position, PositionAdmin)
|
|
admin.site.register(Feedback, FeedbackAdmin)
|