Context Navigation

The idea

Controling IP access in your web app. The idea provided in this cookbook let you define specific ip addresses, and controlling accessing from those ips. If an user access from a certain IP, automatically authenticates with a defined user.

IPAccess Model

You must define a model that permits defining a tuple (ip addr, user): ip from browser that connect, and users that authenticated.

This is the model proposed (it would be in a file like myproj/myapp/models.py):

Complete Application

I also developed ipaccess application​ which offers this functionality. For installing you have to untar compressed application and put in apps directory in your project. Then, you have to update import statements and add to applications installed settings: