Skip to main content

Hybrid Access Control System for Django

Project description

HACS(Hybrid Access Control System)

The full featured advanced Access Control System powered by Django. HACS provides enterprise standard authorization system, it also covers IAM(Identity and Access Management).


  1. Django MultiSite: Support to run multiple sites with single config file(settings), this is dynamic process, so you can add unlimited sites.

  2. Firewall/Access Control: Complete firewall features for your application, almost similar fashion of IP Table
    1. Custom URL schema: applicable applicable on site, user & group’s rules.

    2. HTTP Methods filter: applicable on site, user & group’s rules.

    3. Maintenance Mode: applicable on only site’s rules.

    4. Regex patterned URL blacklist: applicable on site, user & group’s rules.

    5. Regex patterned URL whitelist: applicable on site, user & group’s rules.

  3. Advanced Authorization: (coming) Committed to be more than combination of Django Guardian and Django Authority but definitely base idea could be from those.

  4. Audit Trial: (coming) This is the part of IAM (Identity and Access Management)


Install django-hacs, simply use pip or easy_install

~$ pip install django-hacs
~$ easy_install django-hacs

Install most recent (dev) version of django-hacs

~$ git clone django-hacs
~$ cd django-hacs
~$ python install


Add django-hacs at INSTALLED_APPS


Add middleware classes from django-hacs and also make sure django.contrib.sites.middleware.CurrentSiteMiddleware is added:


Optionally define the writable location, where generated urlconf modules will be stored, default location is path to hacs/generated

HACS_GENERATED_URLCONF_DIR = "your desired directory location"

Initialize django-hacs environment and this the starting point:

~$ python init_hacs
>>> provide your information


  • Django 1.9.x or higher


Full documentation for end users can be found in the “docs” folder, and is also available online at

Routing Rules Management

We have two ways to do that. Django Admin 1. Make sure admin app is installed and hacs.urls is added into urlconf. i.e url(r'^hacs/', include(('hacs.urls', 'hacs'), namespace='hacs')) 2. Go to http://{host}/admin/hacs/. From there you can manage (add, edit, delete). More details could be found at documentation.

Django Management Tool 1. Download sample routing file from 2. Fill with required information. You can just copy/paste and fill as much as you need, just make sure about valid json and all entries are under one list. 3. Save the json file and keep in mind the location 4. Go to terminal and cd to

~$ python import_route -S <path to json file>

Deploy django-hacs

  1. You can either follow above instruction and create new routing schema.

  2. If you have already routing schema at local and that are ready for production.
    1. Export from local ~$ python export_route -d <output file name with full path. i.e /tmp/my-routes.json>

    2. Now import routing schema from production server’s terminal ~$ python import_route -S <path to json file>



If you are having issues, please let us know. We have a mailing list located at: Django HACS<>




  • Initial release.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-hacs-1.0b1.tar.gz (456.0 kB view hashes)

Uploaded source

Built Distribution

django_hacs-1.0b1-py2.py3-none-any.whl (508.8 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page