The primary prerequisite of MamaCAS is Django itself. MamaCAS is tested with and supports all supported versions of Django. Other versions of Django may work, but are not officially tested or supported. See the Django downloads page for download and installation details.
If you’re installing MamaCAS manually, such as from the GitHub repository, you’ll also need to install the Requests library. The optional gevent module may be installed to enable asynchronous single logout requests. The optional defusedxml module may be installed to enable the /samlValidate endpoint.
Installing the latest release is easiest with pip:
$ pip install django-mama-cas
To manually install the latest release, download it from PyPI and install with:
$ python setup.py install
If you need the latest development code, clone the active development repository on GitHub:
$ git clone git://github.com/jbittel/django-mama-cas.git
Add MamaCAS to the
INSTALLED_APPS setting within your project’s
settings.py (or equivalent) file:
INSTALLED_APPS = ( # ...existing apps... 'mama_cas', )
Once added, run
migrate to create the required database tables.
Include the required CAS URL endpoints in your project’s root
with the following:
urlpatterns = [ # ...existing urls... url(r'', include('mama_cas.urls')), ]
This makes the CAS server available at the top level of your project’s
http://example.com/login). To add a path to the CAS root
http://example.com/cas/login) include the path in the URL regular
urlpatterns = [ # ...existing urls... url(r'^cas/', include('mama_cas.urls')), ]
One or more authentication backends must be installed and configured based on your authoritative authentication sources. MamaCAS does not perform authentication itself, but relies on the active authentication backends. The process of installing and configuring authentication backends will change depending on the individual backend.
- Django user authentication documentation
- Authentication packages for Django