Metadata-Version: 2.1
Name: django-dbrouter
Version: 0.1.1
Summary: Simple and usable database router for django
Home-page: https://github.com/mavriq/django-dbrouter
Author: mavriq
Author-email: admin@mavriq.net
License: LGPG
Description: [[_TOC_]]
        
        # Description
        
        Set of simple and usable database routers for django applitaions
        
        
        ## dbrouter.DbByAppRouter
        
        `dbrouter.DbByAppRouter` allows you to specify django-applications or models, that will work with this database.
        
        
        ## dbrouter.RestrictMigrations
        
        `dbrouter.RestrictMigrations` allows you to specify a database to which you can not apply migrations.
        For example, with read-only access.
        
        # Example
        
        
        ```python
        INSTALLED_APPS = [
            ...
            'some_app',
            'other_app',
        ]
        
        ...
        DATABASES = {
            'default': {
                'ENGINE': 'django.db.backends.sqlite3',
                'NAME': 'db.sqlite3',
            },
            # 'dbrouter.DbByAppRouter' usage example
            'external': {
                'NAME': 'some_other',
                .....
                'applications': [
                    'some_app',                 #  all models on some_app
                    'other_app.OnlyThisModel',  #  OnlyThisModel on other_app
                ],
            },
            # 'dbrouter.RestrictMigrations' usage example
            'some_read_only_external_database': {
                'NAME': 'some_read_only_external_database',
                .....
                'allow_migrate': False,
                # False - disable migrations
                # True - do not disable migrations
                # None - default
            },
        }
        
        ...
        DATABASE_ROUTERS = [
            'dbrouter.DbByAppRouter',
            'dbrouter.RestrictMigrations',
            ...
        ]
        ```
        
Keywords: django-dbrouter,DATABASE_ROUTERS,database router,Django
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.5
Classifier: Framework :: Django :: 1.6
Classifier: Framework :: Django :: 1.7
Classifier: Framework :: Django :: 1.8
Classifier: Framework :: Django :: 1.9
Classifier: Framework :: Django :: 1.10
Classifier: Framework :: Django :: 1.11
Classifier: Framework :: Django :: 2.0
Classifier: Framework :: Django :: 2.1
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
