Installation¶
pip install django-user-sessions
- In
INSTALLED_APPS
replace'django.contrib.sessions'
with'user_sessions'
. - In
MIDDLEWARE_CLASSES
replace'django.contrib.sessions.middleware.SessionMiddleware'
with'user_sessions.middleware.SessionMiddleware'
. - Add
SESSION_ENGINE = 'user_sessions.backends.db'
. - Add
url(r'', include('user_sessions.urls', 'user_sessions')),
to yoururls.py
. - Run
python manage.py syncdb
(ormigrate
) and start hacking!
GeoIP¶
You need to setup GeoIP for the location detection to work. See the Django documentation on installing GeoIP.