<commit_before>Django Tenant Templates
=======================

Tenant-aware templating for Django.

**This project is a proof of concept. Using it in production is strongly
discouraged.**

Overview
--------

A tenant is a set of application configurations and behaviors that runs
alongside other tenants in the same server process.

One of the first challenges when building a multitenant Web app is loading
different templates for each tenant without making developers' lives harder.
Django Tenant Templates provies utilities for making templating in Django
tenant-aware without getting in the way of normal Django development.

Installation and Usage
----------------------

Install `django-tenant-templates` from PyPI::

    pip install django-tenant-templates

Add the tenant middleware class to your Django settings::

    MIDDLEWARE_CLASSES = (
        ...
        'django_tenant_templates.middleware.TenantMiddleware',
        ...
    )

Add one or more of the tenant template loaders. They should be placed before
the standard Django loaders::
<commit_msg>This has been used in a production project for a while<commit_after>Django Tenant Templates
=======================

Tenant-aware templating for Django.

Overview
--------

A tenant is a set of application configurations and behaviors that runs
alongside other tenants in the same server process.

One of the first challenges when building a multitenant Web app is loading
different templates for each tenant without making developers' lives harder.
Django Tenant Templates provies utilities for making templating in Django
tenant-aware without getting in the way of normal Django development.

Installation and Usage
----------------------

Install `django-tenant-templates` from PyPI::

    pip install django-tenant-templates

Add the tenant middleware class to your Django settings::

    MIDDLEWARE_CLASSES = (
        ...
        'django_tenant_templates.middleware.TenantMiddleware',
        ...
    )

Add one or more of the tenant template loaders. They should be placed before
the standard Django loaders::

{'fraction_non_alphanumeric': 0.0893371757925072, 'fraction_numerical': 0.0, 'mean_word_length': 3.5881057268722465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7602516', 'n_tokens_mistral': 516, 'n_tokens_neox': 494, 'n_words': 244}