3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-22 11:23:11 +00:00
coope/users/admin.py

13 lines
512 B
Python
Raw Normal View History

2018-08-31 12:46:35 +00:00
from django.contrib import admin
2018-11-22 21:52:15 +00:00
from django.contrib.auth.models import Permission
2018-11-27 08:07:12 +00:00
from simple_history.admin import SimpleHistoryAdmin
2018-08-31 12:46:35 +00:00
2018-10-05 22:03:02 +00:00
from .models import School, Profile, CotisationHistory
2018-12-23 20:48:49 +00:00
class ProfileAdmin(SimpleHistoryAdmin):
search_fields = ('user__username', 'user__first_name', 'user__last_name')
2018-11-27 08:07:12 +00:00
admin.site.register(Permission, SimpleHistoryAdmin)
admin.site.register(School, SimpleHistoryAdmin)
2018-12-23 20:48:49 +00:00
admin.site.register(Profile, ProfileAdmin)
2018-11-27 08:07:12 +00:00
admin.site.register(CotisationHistory, SimpleHistoryAdmin)