Сохранение профиля с регистрацией в Django-Registration
В Django-Registration говорится, что вы можете сохранить пользовательский профиль при сохранении пользователя.
Но я понятия не имею, что документация просит меня сделать. Вот что они говорят:
To enable creation of a custom user profile along with the User
(e.g., the model specified in the AUTH_PROFILE_MODULE
setting), define a function which knows how to create and save an instance of that model with appropriate default values, and pass it as the keyword argument profile_callback
. This function should accept one keyword argument:
user
The User
to relate the profile to.
Может кто-нибудь дать мне пример функции, которую нужно создать, и как передать ее в качестве аргумента?