Learn more. How to logout from Django with custom user model and custom logout view? Ask Question. Asked 2 years, 9 months ago. Active 2 months ago. Viewed 3k times. Improve this question. Christopher Peisert Add a comment. Active Oldest Votes. Improve this answer. In book Django for Beginners Learn web development with Django 2. Vincent author describe how to extend user model using AbstractUser. And he don't do code change in login or logout view. He use them directly in template.
AbstractUser or AbstractBaseUser? Maybe you have mistake in your code. Why are you implementing your own? You might want to start here: docs. Add a comment. Active Oldest Votes. Improve this answer. Lucid Polygon Lucid Polygon 8 8 silver badges 18 18 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. Project description Project details Release history Download files Project description Auto logout a user after specific time in Django. SessionMiddleware django. AuthenticationMiddleware django. Logout in case of idle Logout a user if there are no requests for a long time. Add this!!! Limit session time Logout a user after seconds hour from the last login.
Please login again to continue. Combine configurations You can combine previous configurations. Project details Project links Homepage.
Download files Download the file for your platform. Files for django-auto-logout, version 0.
0コメント