Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Replace dumpdata and loaddata with migration aware fixture commands.

Project Description
The fast_fixtures django application provides apps with a way to export fixtures which note the state of the database when they were made.

They then allow the database to move to that state when loading the data or warn the user about the discrepencies (if they want to play it save)

This module is very new and it's ideas are pretty radical. Please test and consider contributing to the code.

Caveats:

* Output only supports json right now. This is a limitation of django's serializer structure.

Features:

* Json file is backwards compatible and new data is ignored if not relivent.
* Will not run any migrations for test fixtures, but this tools could be used to upgrade those fixtures.

Installation:

```python
pip install django-fast-fixtures

INSTALLED_APPS = (
...
'fast_fixtures',
)
```

Use:

```bash
manage.py dumpdata --migrated > fixture.json

manage.py migrate ... or another website instance

manage.py loaddata fixture.json
```

Data Created:

The data created in the json file is almost exactly the same, except for a new header object which appears at the start of the data stream:

```json
[
{
"model": "auth.user",
"fields": {},
"migrations": {
"app_label": "last_migration_label",
...
},
},
...
other data
]
```

The model and fields entries are there so the header is ignored by a normal loaddata process. Migrations lists all the apps that are included in this dump and their last applied migration in order.
Release History

Release History

This version
History Node

0.7

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-fast-fixtures-0.7.tar.gz (4.3 kB) Copy SHA256 Checksum SHA256 Source Mar 24, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting