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

Easily bundle example data with your django apps.


$ pip install django_addexampledata


Add 'django_addexampledata' to INSTALLED_APPS.


django_addexampledata provides two Django management commands:

Finds all apps with an, and runs appname.exampledata.add_exampledata() on these apps. See the howto below for more info.

Create an example user. See --help for the User attributes that can be set. Example:

python createexampleuser grandma --is-superuser

creates a superuser named grandma with password set to test.

addexampledata howto

Add to the root of your Django app (in the same directory as Add an add_exampledata function to this module. Your may look something like this:

from models import Page

def add_exampledata():
    aboutus = Page.objects.create(title="About us",
                                  body="Hello cruel world")
    contactinfo = Page.objects.create(title="Contact info",
                                      body="Coming soon.",

As long as your Django app is in INSTALLED_APPS, <appname>.exampledata.add_exampledata is run each time you run:

python addexampledata

addexampledata on specific apps

You can specify the apps that you want to add example data for as arguments for the command. Example:

python addexampledata myapp myotherapp

addexampledata adds the same data each time it runs!

You can solve this in two ways:

  1. (reccommended) Add a make target or something similar (we use a Fabric action) to reset your example database and re-run addexampledata. Use this action whenever you change/add models or exampledata.
  2. Check for existing items in add_exampledata() before inserting new data.
Release History

Release History


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

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_addexampledata-1.0.tar.gz (3.0 kB) Copy SHA256 Checksum SHA256 Source Apr 10, 2012

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