A Django data dump script generator
Project description
This is a Django data dump script generator.
It produces command line scripts usable within a Makefile or as a simple bash scripts to dump or load data with Django from the many app names you give it.
It need a dependancies map to know what is required to be dumped.
Maps
Currently it only have two maps one for “djangocms-2” and one for “djangocms-3” projects, and so it only knows about:
Django contrib auth;
Django sites;
emencia.django.countries;
contact_form;
DjangoCMS and its common plugins;
Zinnia;
Porticus;
South;
django-tagging;
django-taggit;
easy-thumbnails;
django-filer;
django-google-tools;
emencia-django-socialaggregator;
emencia-django-slideshows;
Note : Many app depends on Django’s content types but we don’t matter because it is automatically filled by Django and we should never try to dump/load it.
Format
Dumps order does matter to respect module’s dependancies;
model or dependancy names can be string or either a list of names, take care that string is splitted on white spaces, if you use excude flag like ‘-e’ with your model names, allways use a list;
Circular dependancies is possible;
Sample map :
[ ('DUMP_NAME_KEY', { 'use_natural_key': true, 'models': 'mymodel', 'dependancies': [], }), ]
Where :
- DUMP_NAME_KEY
Is the dump entry name, can be anything but commonly this is the app package name, this is what is used in embedded map files.
- use_natural_key
A boolean to define if the dump can use natural key, if not defined, a dump entry is assumed to support natural key.
- models
Is either a string of the model name or a list model names. Django accept either an app name from which it will take all its models, or a specific app model.
- dependancies
Either a string of another dump names to depends of. They will be taken also even if they haven’t been explicitely requested from user.
Changelog
0.2.3
Add optional ‘dump_other_apps’ and ‘exclude_apps’;
Pep8 fixes;
Add changelog file;
0.2.2
Minor fix in base template;
0.2.1
Fix dumpdata template line;
Fix emencia.django.countries dependancy model in maps;
0.2
Refactoring code;
0.1
First alpha version;
Project details
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
File details
Details for the file dr-dump-0.2.3.tar.gz
.
File metadata
- Download URL: dr-dump-0.2.3.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e30e01775507999c4916712b797c90f43b125e4be7475c71c500ada4bff5a6f |
|
MD5 | 1ea00263206e1fe9f491743ddc5a4c86 |
|
BLAKE2b-256 | 35ad0fd93a6c3172f06d0a6e1519f11fc7d9c9d0d22d0456fb8c1ad7670a6aa8 |
File details
Details for the file dr_dump-0.2.3-py2.7.egg
.
File metadata
- Download URL: dr_dump-0.2.3-py2.7.egg
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11eec997c2de3dc06f541bce218f88abccdc0e48b62b03ea7c114c63f09f4d4c |
|
MD5 | 4b0c55ad86d4ba5b6077e9232efefbbf |
|
BLAKE2b-256 | f8d0264559e6cadc1c761ad63d0b697fb4fc12c6a3514f2aff036809b7d6c066 |