Nice extensions for django
Project description
nicedjango
Nice django tools
ModelGraph
Selective dumping and loading of only the needed model data for all objects and their related objects of one or more querysets.
This is done by
getting a graph of all relations between models,
getting all pks first in chunks,
dump them in an order that enables correct loading.
Examples
# show model graph parts that would be dumped and those which not: # example for query model a1.A with relation to child a1.B(A) ./manage.py dump_graph -p -q a -r a.b a1-a: a1-a.b to child a1-b.pk excludes: a1-a.f to foreign a1-f.a a1-b: a1-b.pk to parent a1-a.pk excludes: a1-b.c to child a1-c.pk a1-b.e to child a1-e.pk # dump all objects from a1.models.A.objects.filter() with relation a.b as compact yaml: ./manage.py dump_graph -f dump.yaml -s compact_yaml -q a.filter(pk__in=(1,2)) -r a.b - a1-a: [pk] - [1] - [2] - a1-b: [pk] - [2] # load back the dumped dump.yaml ./manage.py load_graph -f dump.yaml -s compact_yaml # by default serializing into compact csv files is enabled: mkdir dump_folder ./manage.py dump_graph -f dump_folder -q a.filter(pk__in=(1,2)) -r a.b #results in two files under dump_folder: # a1-a.csv: a1-a:pk 1 2 # and a1-b.csv: a1-b:pk 2
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
nicedjango-1.2.0.zip
(46.9 kB
view details)
nicedjango-1.2.0.tar.gz
(28.6 kB
view details)
nicedjango-1.2.0.tar.bz2
(23.4 kB
view details)
Built Distribution
File details
Details for the file nicedjango-1.2.0.zip
.
File metadata
- Download URL: nicedjango-1.2.0.zip
- Upload date:
- Size: 46.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ba90635f2c4afa7d520c31d2ee6663a8761efa3f4c7c9ffda4c37004ecc5744 |
|
MD5 | 553839328f6840efbbc0ef95db9aa51c |
|
BLAKE2b-256 | c8c75a67884ffe1dac49a9ab06d2ceadeab1aa0b31ed27630f5c3a76b6ec0c90 |
File details
Details for the file nicedjango-1.2.0.tar.gz
.
File metadata
- Download URL: nicedjango-1.2.0.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a24678ff1b235aabb1db1d7bf3dacca9e4055db5e1ad7641c21f71e987283fce |
|
MD5 | 4b3cc37c2a311bbfb6b1e99719e00c69 |
|
BLAKE2b-256 | a4ee7c29da9a5369a7d6591a7a959c957b990f2bbc64939d8940240602a481d1 |
File details
Details for the file nicedjango-1.2.0.tar.bz2
.
File metadata
- Download URL: nicedjango-1.2.0.tar.bz2
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e05ff7fa9561bc57dae3327ab9fb6b230cb719f8bdf250c12dfeea1d6e0657d6 |
|
MD5 | 3116b3a68a1189901e51342969554992 |
|
BLAKE2b-256 | bca1f71493c70e386ba679ca638a73f05fcf2e09bd4e635319297184137dc2d7 |
File details
Details for the file nicedjango-1.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: nicedjango-1.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4f69358f6f63ae1bf4a021c6fecffa038ca6bc3084a39ec9e2312d513196155 |
|
MD5 | 21b2ea1996b723a24fafb6264f7821a0 |
|
BLAKE2b-256 | b619c960e83119d2240eb919f0ccb6e2397376841cc3e962530fe3396972b076 |