Skip to main content
=====
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)

Source distribution for django-dynamic-models 0.0.5
File Size Uploaded
django-dynamic-models-0.0.5.zip 4.9 kB Details

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

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.2

2 release files

0.0.1

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