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 install

If you need the latest development code, clone the active development repository on GitHub:

$ git clone git://


Add MamaCAS to the INSTALLED_APPS setting within your project’s (or equivalent) file:

    # ...existing apps...

Once added, run migrate to create the required database tables.

URL paths

Include the required CAS URL endpoints in your project’s root URLconf 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 URL (e.g. To add a path to the CAS root (e.g. include the path in the URL regular expression:

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.