{ "info": { "author": "Espen Angell Kristiansen", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "Easily bundle example data with your django apps.\n\nInstall\n=======\n\n::\n\n $ pip install django_addexampledata\n\n\nSetup\n=====\n\nAdd ``'django_addexampledata'`` to ``INSTALLED_APPS``.\n\n\n\nUsage\n=====\n\n``django_addexampledata`` provides two Django management commands:\n\n addexampledata\n Finds all apps with an ``exampledata.py``, and runs\n ``appname.exampledata.add_exampledata()`` on these apps.\n See the howto below for more info.\n\n createexampleuser\n Create an example user. See ``--help`` for the User attributes that can be set.\n Example::\n\n python manange.py createexampleuser grandma --is-superuser\n \n creates a superuser named grandma with password set to ``test``.\n \n\naddexampledata howto\n--------------------\n\nAdd ``exampledata.py`` to the root of your Django app (in the same directory as\n``models.py``). Add an ``add_exampledata`` function to this module. Your\n``exampledata.py`` may look something like this::\n\n from models import Page\n\n def add_exampledata():\n aboutus = Page.objects.create(title=\"About us\",\n body=\"Hello cruel world\")\n contactinfo = Page.objects.create(title=\"Contact info\",\n body=\"Coming soon.\",\n parent=aboutus)\n\nAs long as your Django app is in INSTALLED_APPS,\n``.exampledata.add_exampledata`` is run each time you run::\n\n python manage.py addexampledata\n\n\naddexampledata on specific apps\n-------------------------------\n\nYou can specify the apps that you want to add example data for as arguments for\nthe command. Example::\n\n python manage.py addexampledata myapp myotherapp\n\n\naddexampledata adds the same data each time it runs!\n----------------------------------------------------\n\nYou can solve this in two ways:\n\n1. *(reccommended)* Add a make target or something similar (we use a Fabric\n action) to reset your example database and re-run ``addexampledata``. Use\n this action whenever you change/add models or exampledata.\n2. Check for existing items in ``add_exampledata()`` before inserting new data.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/espenak/django_addexampledata", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django_addexampledata", "package_url": "https://pypi.org/project/django_addexampledata/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django_addexampledata/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/espenak/django_addexampledata" }, "release_url": "https://pypi.org/project/django_addexampledata/1.0/", "requires_dist": null, "requires_python": null, "summary": "Easily bundle example data with your django apps.", "version": "1.0" }, "last_serial": 791068, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "b62640147c046cb954999d15414cd827", "sha256": "457f5305799e0d8241a3b0766426d142a007acaa3875b46eb2fdafef56cbc6c3" }, "downloads": -1, "filename": "django_addexampledata-1.0.tar.gz", "has_sig": false, "md5_digest": "b62640147c046cb954999d15414cd827", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2993, "upload_time": "2012-04-10T09:39:11", "url": "https://files.pythonhosted.org/packages/67/ed/e35eb3d18ed53364321e92c8a8b7d28a330d503afb62aad226955f968523/django_addexampledata-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b62640147c046cb954999d15414cd827", "sha256": "457f5305799e0d8241a3b0766426d142a007acaa3875b46eb2fdafef56cbc6c3" }, "downloads": -1, "filename": "django_addexampledata-1.0.tar.gz", "has_sig": false, "md5_digest": "b62640147c046cb954999d15414cd827", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2993, "upload_time": "2012-04-10T09:39:11", "url": "https://files.pythonhosted.org/packages/67/ed/e35eb3d18ed53364321e92c8a8b7d28a330d503afb62aad226955f968523/django_addexampledata-1.0.tar.gz" } ] }