The primary prerequisite of MamaCAS is Django itself. MamaCAS supports the last two major release versions of Django and the current LTS release, generally following Django’s support policy. Other versions of Django may work, but are not officially tested or supported. See the Django downloads page for information on downloading and installing Django.
If you’re installing MamaCAS manually, such as from the GitHub repository, you’ll need to install the Requests and defusedxml libraries. The optional gevent module may also be installed to enable asynchronous single sign-out requests.
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
First, 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 manage.py migrate to create the required database tables.
Include the required CAS URL endpoints in your project’s root URLconf with the following:
urlpatterns = patterns('', # ...existing urls... (r'', include('mama_cas.urls')), )
This makes the CAS server available at the top level of your project’s URL (e.g. http://example.com/login). To add a subpath to the CAS root (e.g. http://example.com/cas/login) add the path to the URL regular expression:
urlpatterns = patterns('', # ...existing urls... (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.