-
Notifications
You must be signed in to change notification settings - Fork 13
Hint 6 spoiler
Sébastiaan edited this page Mar 5, 2020
·
2 revisions
So you couldn't find the right file? It's quite logical actually, it's called admin.py
and it's located in the website/members
directory.
Once you've opened it you should find something like this:
class ProfileInline(admin.StackedInline):
fields = ('starting_year', 'programme', 'address_street',
'address_street2', 'address_postal_code', 'address_city',
'student_number', 'phone_number', 'receive_optin',
'receive_newsletter', 'birthday', 'show_birthday',
'direct_debit_authorized', 'bank_account', 'initials',
'nickname', 'display_name_preference', 'profile_description',
'website', 'photo', 'emergency_contact',
'emergency_contact_phone_number', 'language',
'event_permissions')
model = models.Profile
form = forms.ProfileForm
can_delete = False
That's a lot of field we have here! Fortunately we only need to add one. You should end up with something like this:
fields = ('starting_year', 'programme', 'address_street',
'address_street2', 'address_postal_code', 'address_city',
'student_number', 'phone_number', 'receive_optin',
'receive_newsletter', 'birthday', 'show_birthday',
'direct_debit_authorized', 'bank_account', 'initials',
'nickname', 'display_name_preference', 'profile_description',
'shoe_size', 'website', 'photo', 'emergency_contact',
'emergency_contact_phone_number', 'language',
'event_permissions')
Now you can run concrexit:
-
cd
into thewebsite
directory. -
./manage.py runserver
. - Test your new functionality!