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

13 lines
No EOL
512 B
Python

from django.contrib import admin
from django.contrib.auth.models import Permission
from simple_history.admin import SimpleHistoryAdmin
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(School, SimpleHistoryAdmin)
admin.site.register(Profile, ProfileAdmin)
admin.site.register(CotisationHistory, SimpleHistoryAdmin)