Search code examples
djangosessionadmin

Different sessions for admin and applications in Django


I'd like to have different sessions for the Django admin interface and applications themselves to be able to login as admin to the admin interface and as a standard user to the application.

Any ideas how to achieve that?

P.S. Sure, I can use 2 different web browser instances, any other ways?


Solution

  • The way I have solved this in the past is to have 2 different urls. www.example.com and admin.example.com. As the sessions are stored in cookies, and the cookies being domain specific you can use both at the same time.