Django extension for flexible import and merge
Project description
djfim
License
Apache License Version 2.0
Usage
a) declare concrete datamodel:
# app/models.py
from django.db import models
from djfim.models import Blob, Entity, Generation
class MyBlob(Blob):
class Meta:
abstract = False
class MyEntity(Entity):
generation = models.ForeignKey('MyGeneration', on_delete=models.CASCADE, null=False)
blob = models.ForeignKey('MyBlob', on_delete=models.CASCADE, null=False)
class Meta:
abstract = False
class MyGeneration(Generation):
l_anchor = models.ForeignKey('self', on_delete=models.SET_NULL, null=True, related_name='l_subtree')
r_anchor = models.ForeignKey('self', on_delete=models.SET_NULL, null=True, related_name='r_subtree')
class Meta:
abstract = False
b) migrate datamodel:
python manage.py makemigrations
pythno manage.py migrate
c) setup datamodel reference:
# project/settings.py
DJFIM = {
'MODLE': {
'BLOB': {
'app_name': 'app',
'app_label': 'MyBlob',
},
}
}
d) invoke management command:
python manage.py fim [action]
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
djfim-0.5.8-py3-none-any.whl
(38.2 kB
view details)
File details
Details for the file djfim-0.5.8-py3-none-any.whl.
File metadata
- Download URL: djfim-0.5.8-py3-none-any.whl
- Upload date:
- Size: 38.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 PyPy/7.3.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5191b75a2f57eb5f0f1fe21d1892305b4151207039107dca7f7c6e6f9249c313
|
|
| MD5 |
2c5da999ef5569a520378ec793c1b85c
|
|
| BLAKE2b-256 |
14c79b9d23be267bf0354c42af92a9fac9442918fb89487f2ac3beb87914135b
|