3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-25 22:22:27 +00:00

Add search bar on profile admin

This commit is contained in:
Yoann Pétri 2018-12-23 21:48:49 +01:00
parent b4b88b1dba
commit f0aa02eeb4

View file

@ -4,7 +4,10 @@ from simple_history.admin import SimpleHistoryAdmin
from .models import School, Profile, CotisationHistory from .models import School, Profile, CotisationHistory
class ProfileAdmin(SimpleHistoryAdmin):
search_fields = ('user__username', 'user__first_name', 'user__last_name')
admin.site.register(Permission, SimpleHistoryAdmin) admin.site.register(Permission, SimpleHistoryAdmin)
admin.site.register(School, SimpleHistoryAdmin) admin.site.register(School, SimpleHistoryAdmin)
admin.site.register(Profile, SimpleHistoryAdmin) admin.site.register(Profile, ProfileAdmin)
admin.site.register(CotisationHistory, SimpleHistoryAdmin) admin.site.register(CotisationHistory, SimpleHistoryAdmin)