Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A Django application to store your previous history and action in your session engine

Project Description

A Django application to store your previous history and action using differents backends.

With this application you will be able to redirect your users to their previous location when they tried to access a page where the login is required.

You will be also able to record previous action which needed login required.

For example, if your user is not logged in your application and try to execute an action which required authentication (e.g.: an user clicks on a button to follow another user), this application will record parameters (even on POST) and execute the last action when your user will be successfully logged.

Thanks to oleiade for the name.


  1. Either check out the package from GitHub or it pull from a release via PyPI

    pip install django-backward
  2. Add backward.middleware.BackwardMiddleware to your MIDDLEWARE_CLASSES

  3. Add backward.urls to your

    from django.conf.urls import patterns, url, include
    urlpatterns = patterns(
        url(r'^backward/', include('backward.urls')),
  4. Set settings.LOGIN_REDIRECT_URL as mentioned in your for example

    LOGIN_REDIRECT_URL = '/backward/login/redirect/'
  5. Configure your Session engine if you are using the default backend

  6. Use the decorator backward.decorators.login_required if your views need authentication



The backend used to store information.

The default backend class is backward.backends.session.SessionBackend.


Store information in request.session using your Session engine


Store information in request.COOKIES, you can configure a few things:

  • BACKWARD_MAX_AGE: the age used to set an expiration date to the cookie
  • BACKWARD_COOKIE_DOMAIN: the domain name used for the cookie
  • BACKWARD_COOKIE_SECURE: if this is set to True, the cookie will be marked as secure, which means browsers may ensure that the cookie is only sent under an HTTPS connection.

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(7.9 kB) Copy SHA256 Hash SHA256
Source None Dec 21, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting