L
L
leha782016-04-10 22:42:36
Django
leha78, 2016-04-10 22:42:36

How to redirect to the login form if the method is @login_required?

I created a separate account application, calling it profiles
I put this @login_required in the add_classified method
And being not logged in, if I try to go to the classified/add address,
it throws me here:
site,com/accounts/login/?next=/classifieds/add/
and accordingly , page not found.
How to make it go to the site.com/login page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sergeev, 2016-04-10
@leha78

In settings, write LOGIN_URL

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question