session ended unexpected

i want to check if seesion is expired then back to login if the session is expired… any help
God Bless

If the views are restricted to logged in users only, then that’s how Django normally works.

Good Day sir… how to restrict views in users?
sorry im new in django… thank you.

You’ll want to read the complete page at Using the Django authentication system | Django documentation | Django to get started.

thank you sir have a great day