Skip to main content
``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.

Metadata

Release files for django-fixture-generator 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-fixture-generator 0.2.0
File Size Uploaded
django-fixture-generator-0.2.0.tar.gz 4.1 kB Details

Release files / django-fixture-generator-0.2.0.tar.gz

Download URL django-fixture-generator-0.2.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
069721ca2be5778aea5bcd3865891d256ea7b29d26ac8e43be255d1b44cbf8e3
BLAKE2b-256 checksum
How to use checksums
c56330f89a46f0a6ff8dcb6215d1f6ae204e1b2a787a7eb185480eec06835144
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page