Skip to main content

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.

Release files for django-database-prefix 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-database-prefix 0.1.0
File Size Uploaded
django-database-prefix-0.1.0.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-database-prefix 0.1.0
File Interpreter ABI Platform
django_database_prefix-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / django-database-prefix-0.1.0.tar.gz

Download URL django-database-prefix-0.1.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
54401160e960d46cece4a9826f3d364ad535da42d58941252aa621f3ed7b1ec9
BLAKE2b-256 checksum
How to use checksums
a720fb9bcbb91e6f06bb4fe84797dbdc9ec6b41e4e83b6a127491746225511fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / django_database_prefix-0.1.0-py3-none-any.whl

Download URL django_database_prefix-0.1.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a241103ac3d6e7f252588471c0ed80accc82775b14b55ecb955268b0c44fedeb
BLAKE2b-256 checksum
How to use checksums
4f60c53d6a6058f6f42052136f2088a05dd490196f169902174ed00d31ad2df6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page