Use the User model for foreign keys.
Closes no issue.
Short description
Previously foreign keys pointed at Member objects. This created some issues as autocomplete_fields
(in Django 2.0) and raw_id_fields
require an Admin
for the models that a foreign key points to. As Member
has no Admin
this meant that we could not use raw_id_fields
and autocomplete_fields
for Member
.
This MR fixes this issue by replacing all foreign keys to Member
with foreign keys to User
.
In particular this MR does the following things:
- The
events
,pizzas
,activemembers
, andmailinglist
apps now use theUser
model for foreign keys. - The
Member
model has been renamed toProfile
to reflect that it is (mostly) used for storage of extra information. - A proxy to
User
calledMember
has been added. This allows us to overrideManager
s and__str__
onUser
. Most methods that did not make sense inProfile
have been moved to the newMember
.
Edited by Ghost User