Skip to main content

No project description provided

Project description

django-database-prefix

Ables you to set Django's database tables prefix, as a result you can run multiple Django projects using single database, without any actions on the unmanaged tables.

Installation

Install using pip

pip install django-database-prefix

Add django-database-prefix at the top of the INSTALLED_APPS to make it initialized first.

'django_database_prefix',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

Configuration

Set string value for DB_PREFIX in the settings.py

DB_PREFIX = 'app1_'

In result you'll have app1_django_session talbe names pattern.

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-database-prefix-0.1.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

django_database_prefix-0.1.0-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

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