This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
django-easy-fixture
===================
.. figure:: https://travis-ci.org/allenling/django-easy-fixture.svg?branch=master

python2.7, python3.5

1.8<= Django <= 1.10

**install: pip install django-easy-fixture**

That is a easy, simple tool to help you to fill your fixture dict with some spam datas

Make your fixture dict to be a completely available django fixture that **you do not have to worry about any unqiue, unqie_together, just pk**

**The pk must be defined by you!**

**Just support all the fields defined by Django, and do not support any customization field.**

**Maybe** support the customization field in the future.



1. get a fixture dict
---------------------

.. code-block:: python

# in template.py
fixtures_template={'auth.User': [{'pk': 1}]}

# in other.py
from easy_fixture.easy_fixture import EasyFixture
from template import fixtures_template

ef = EasyFixture(fixtures_template)
fixtures_dict = ef.output()

2. use as a django app command
------------------------------

.. code-block:: python

# in template.py
fixtures_template = {'auth.User': [{'pk': 1}]}

# in your settings.py
INSTALLED_APPS = ('other apps',
'easy_fixture',
)
run make_fixture command

.. code-block:: python

python manage.py make_fixture template.fixtures_template > /path/to/fixture.json

Must pass the module path and fixture variable, like module.to.fixture.Variable_name

**do not support old style**

.. code-block:: python

python manage.py make_fixture template > /path/to/fixture.json

3. use in test
--------------

In your testCase, call EasyFixture.load_into_testcase in your setUpTestData, setUpClass, setUp or anywhere you want to load your fixture data.

.. code-block:: python

FIXTURE_DICT = {'auth.User': [{'pk': 1}]}

class MyTestCase(TestCase):

@classmethod
def setUpTestData(cls):
ef = EasyFixture(FIXTURE_DICT)
ef.load_into_testcase()
TestCase.setUpTestData()

def tes_what_you_want(self):
pass


**deprecate**

.. code-block:: python

from easy_fixture.easy_fixture import FixtureFileGen

class MyCase(TestCase):
fixtures = FixtureFileGen(['my.fixture.template.module'])
Release History

Release History

0.3.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_easy_fixture-0.3.0-py2.py3-none-any.whl (6.7 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Nov 24, 2016
django-easy-fixture-0.3.0.tar.gz (13.3 kB) Copy SHA256 Checksum SHA256 Source Nov 24, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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