{ "info": { "author": "Martyn CLEMENT", "author_email": "martyn@engage-sports.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Django Multiple Auth\n====================\n\ndjango-multiple-auth allows you to login over a Django website with\nmany users and quickly switch without having to type credentials.\n\n\n[](https://travis-ci.org/EngageSports/django-multiple-auth)\n\n\nRequirements\n------------\n\n - Django 1.10.* / Django 1.11.*\n - Tested under python 2.7 and 3.6\n\n\nInstall\n-------\n\n```\npip install django-multiple-auth\n```\n\n\nAdd `multiple_auth` to INSTALLED_APPS\n\n```python\nINSTALLED_APPS = (\n ...\n 'multiple_auth',\n)\n```\n\nthen update your project's `urls.py`:\n\n```python\nurlpatterns = patterns(\n ...\n url(r'^m_auth/', include('multiple_auth.urls')),\n)\n```\n\nUsage\n-----\n\nReplace the usage of `django.contrib.auth.views.login` by `multiple_auth.views.login`\n \n```python\nfrom multiple_auth.views import login\n\nurlpatterns = patterns(\n url(r'^login/$', login, name='auth_login'),\n]\n```\n\nThis view must be used to login new users, including the first login. \n\n\nIn your template, load the template tag, show a list of logged-in users and give access to the login form.\n\n```html\n{% load multiple_auth_tags %}\n\n{% block content %}\n {% get_logged_in_users as logged_in_users %}\n