Answer the question
In order to leave comments, you need to log in
Editing a profile in Django?
Help a newbie - something is generally stuck.
I screwed up the registration of users on the site using django-registration and the next item was the question of letting the user edit his profile after authorization.
The documentation says how to expand the user profile model, but how to edit it remains unclear - what to prescribe routing for (let's say all fields are standard), where to specify the profile template, and so on?
Answer the question
In order to leave comments, you need to log in
And what's the problem with making a view?
Extend user form via inline formset.
docs.djangoproject.com/en/dev/topics/forms/modelforms/#model-formsets
you rather need django-profiles , which extends the capabilities of django-registration. In general, it is not so difficult to write your own view with the processing of the user profile form.
good afternoon, could you tell me about django-registration, otherwise I don’t get a damn thing views
class RegisterFormView(FormView):
form_class = UserCreationForm
success_url = "/"
template_name = "core/register.html"
def form_valid(self, form ):
form.save()
return render(RegisterFormView, self).form_valid(form)
throws error NoneType' object has no attribute '_insert'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question