What is Airavata?¶
Ever wanted to run several sites using the same codebase and the same database without having to deploy (and maintain) several instances of your project? Than Airavata is for you!
The new (Django 1.8+) implementation of django.contrib.sites
already makes things easier but is still missing (probably by design) some usefull features.
Airavata is a tool providing those features.
Features¶
SiteAlias
: Airavata adds site aliases (other domain names) to the sites framework to allow having several domain names pointing to the same site (eg: http://john-doe.my-shiny-cms-platform.com and http://john-doe.com)get_current_site
: Airavata leverages the changed behaviour of get_current_site in Django 1.8 and patches it to extend lookups to site aliasessetprimarydomain
: Airavata provides a management command to change the first domain name in the database and optionally create an alias for ‘localhost’SiteFilteredViewMixin
: Airavata provides a view mixin, to use with Django’s generic class based views, which filters results based on the current site- Unique domains names: Airavata patches the sites framework to ensure that domain names are unique across
Site
andSiteAlias
. AllowedSites
andCachedAllowedSites
: Airavata provides 2 helper classes extended from django-allowedsites to use in your settings.py in order to fetchALLOWED_HOSTS
list from the database.
ToDo¶
- improve test coverage
- improve this doc
- Media file “finder” and upload_path builder
- provide a SiteFilteredModelAdmin