Django Dynamic Models
=====
Django Dynamic Models is a app that enable change model fields if other other apps models.
Detailed documentation is in the "docs" directory.
Install
-----------
```
pip install --upgrade django-dynamic-models
```
Quick start
-----------
1. Add `django_dynamic_models` to your INSTALLED_APPS setting before the apps you need change models like this::
INSTALLED_APPS = (
...
'django_dynamic_models',
'app_with_models',
'app_with_changes',
)
2. Define your model your want to change from another apps
import django_dynamic_models as dymodels
app_label = 'app_label'
class ArticleBase(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=50)
class Meta:
abstract = True
def __unicode__(self):
return u'%s' % self.name
Article = dymodels.change.load('Article', ArticleBase, app_label)
3. In the app need a model change add a file named 'models_changes_registry.py' and add her the new fileds
import django_dynamic_models as dymodels
from django.db import models
dymodels.change.register('Article', **{
'brand' : models.CharField(max_length=30, blank = True, null = True),
})
Metadata
Release files for django-dynamic-models 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-dynamic-models-0.0.5.zip | 4.9 kB | Without provenance | Details for django-dynamic-models-0.0.5.zip |
Release files / django-dynamic-models-0.0.5.zip
| Download URL | django-dynamic-models-0.0.5.zip |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9777cbe1e44d5b27f783f2e0ccfd56b5ada42ebb5d0513350a3fb057c662b7d7
|
|
BLAKE2b-256 checksum How to use checksums |
239055a3c09f2ceac737647bfe5ccaa228bb1d8c7118a555a935015ec80aa852
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-dynamic-models 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.