Django: customizing user profile page?

I'm still a newbie and I'm not sure how to set up a profile page for users. django.contrib.auth.views.loginredirected to the page accounts/profile, but how should I configure it?

Is it common knowledge to simply define accounts/profilein urls.pyand redirect it to a template or is it a more complex template?

django.views.generic.simple.direct_to_template, {'template':'profile.html'})Where profile.htmldoes he live in PROJECT_ROOT/templates/profile.htmland expand base.html?

+3
source share
2 answers

You can either set up a view / url that points to accounts / profile, or you can tell Django to be redirected to another place after logging in by setting it LOGIN_REDIRECT_URLin yours settings.py.

+2
source

Source: https://habr.com/ru/post/1736117/


All Articles