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!

django-fixture-generator is a reusable django application to make writing fixtures not suck.

Project Description
``django-fixture-generator``
============================

Requires Django 1.2.

* Add ``"fixture_generator"`` to your ``INSTALLED_APPS`` setting.
* Create a ``fixture_gen.py`` file in one of your apps. It should look
something like:

from fixture_generator import fixture_generator

from django.contrib.auth.models import User, Groups

@fixture_generator(User, requires=["my_app.test_groups"])
def test_users():
muggles, wizards = Group.objects.order_by("name")
simon = User.objects.create(username="simon")
adrian = User.objects.create(username="adrian")
jacob = User.objects.create(username="jacob")

simon.groups.add(wizards)
adrian.groups.add(muggles)
jacob.groups.add(muggles)


@fixture_generator(Group)
def test_groups():
Group.objects.create(name="Muggles")
Group.objects.create(name="Wizards")

* Run ``manage.py generate_fixture my_app.test_users``.
* Save the resulting fixture somewhere.
Release History

Release History

This version
History Node

0.2.0

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-fixture-generator-0.2.0.tar.gz (4.1 kB) Copy SHA256 Checksum SHA256 Source Jul 16, 2010

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