A django module that allows to configure a global or model based database table prefix
Project description
Django Model Prefix
A Django package that adds a global or model based database table prefix
Installation
Install using pip:
pip install django-model-prefix
Add model_prefix to your INSTALLED_APPS list. Make sure it is the first app in the list
INSTALLED_APPS = [
'model_prefix',
...
]
Usage
Global table prefix
The global database table prefix can be configured using the DB_PREFIX
setting
DB_PREFIX = "foo_"
Model table prefix
Optionally a model based prefix can also be defined by extending the models meta class
class Meta:
db_prefix = "bar_"
This can be also used in order to disable the global prefix for a specific model
class Meta:
db_prefix = None
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-model-prefix-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 001c5401e2ac5ec18d18d3da2b00f90e0241c0c3e154fc60142c119db7d312ee |
|
MD5 | 9edd29f2c21ca7478ab92ef043c98905 |
|
BLAKE2b-256 | 380bc9faf65e88d644bab35e769654f1dc2b4b722bb2d08ac8eb0ee046f4f2b6 |
Close
Hashes for django_model_prefix-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a89568e31a0ae5d9272b00e67608afbaf81337cf9ae9ecf7610834334c38a5b7 |
|
MD5 | 4590c5ab3ab8ce4db1441610c13e4271 |
|
BLAKE2b-256 | f7bdef909ff88f5619e65b45d7423c1c7eb14a511e46d8b442c079de6a8b6d01 |