===========================
Tool to automatically create a development database for local development by sampling your production database.
It maintains referential integrity by looking up the dependencies for the selected rows.
Installation
============
```bash
sudo pip install dev_db
```
Add dev_db to your installed apps
Customize the CreateDevDB class
```python
DEV_DB_CREATOR = 'dev_db.creator.DevDBCreator'
# for fashiolista
DEV_DB_CREATOR = 'framework.dev_db_creator.FashiolistaDBCreator'
```
Creating the data
=================
```bash
python manage.py create_dev_db -o ../development_data.json
gzip ../development_data.json
```
Creating the test fixture takes about 5-10 minutes
Loading the data
================
start with an empty db on local called
test_fashiolista_local
1. python manage.py syncdb --all --noinput
2. python manage.py migrate --fake --noinput
3. Truncate contenttype and permission tables
4. python manage.py loaddata ../development_data.json.gz --traceback -v2
These four steps are also wrapped in the load_dev_db command. So simply run
(This assumes you don't have the database yet, it wont drop it for you)
```bash
python manage.py load_dev_db
```
Loading the fixture takes about 2 minutes
(be sure to run pgtune on your local postgres, otherwise it might take longer)
Running tests
=============
From the dev_db_example directory run
```bash
python manage.py test dev_db
```
Metadata
Release files for dev_db 0.3.2
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 |
|---|---|---|---|---|
| dev_db-0.3.2.tar.gz | 11.3 kB | Without provenance | Details for dev_db-0.3.2.tar.gz |
Release files / dev_db-0.3.2.tar.gz
| Download URL | dev_db-0.3.2.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
852f236bdb10b7ff5e6d8137f2782be021bf79ccc736929066777cf3ff6e08b1
|
|
BLAKE2b-256 checksum How to use checksums |
47813a41e18a9e0227607f80b4cfe61e5e91db812dd3fdfc043c790a82b41529
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dev_db 0.3.2
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.