Closed NeuralFlux closed 5 years ago
We have already coded this. In previous commits, we included in views.py
the redirection logic. Are to referring to something else.
No,for security purposes I believe he is talking about adding a specific decorator - do see if you can find it ;)
We have already coded this. In previous commits, we included in
views.py
the redirection logic. Are to referring to something else.
Though we've done it before using simple logic, there's a more "pythonic" and developer way of doing it. This issue is all about finding it :stuck_out_tongue_winking_eye:
Ok, got it, I initially used the @login_required
decorator, but has some issues. It was got lazy to switch to this approach. I would fix this issue. Kindly assign it to me
Currently,
localhost:8000/users/
is User Home. But the problem is that any person, even if not logged in, can go there. So make sure that route is accessible only to logged in users.Redirect them to login if not logged in.