{ "info": { "author": "Adriano Veiga", "author_email": "profpardal.88@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://travis-ci.org/adrianoveiga/django-media-fixtures.svg?branch=master\n :target: https://travis-ci.org/adrianoveiga/django-media-fixtures\n\n\ndjango-media-fixtures\n------------------------\n\nSimple project to copy media files (intended for fixtures loads), pretty much as staticfiles does.\n\n\nDependencies\n------------\n\n- Django 1.8 or higher (not tested on previous versions)\n\n\nInstallation\n------------\n\n.. code-block:: python\n\n pip install django-media-fixtures==0.0.3\n\nThen, put 'django_media_fixtures' on your INSTALLED_APPS (on settings.py), just below 'django.contrib.staticfiles'.\n\n\nUsage\n-----\n\nJust call manage command 'collectmedia', same as you do with collectstatic:\n\n.. code-block:: python\n\n python manage.py collectmedia\n\nAnd then all files on 'media_fixtures' folder in-apps will be copied to your MEDIA_ROOT.\n\nSo, when you create your fixture (for any ways, even through shell), put your file path matching the same tree folder view as your media file.\n\nFor instance,\n\n.. code-block:: python\n\n YourModel.objects.get_or_create(image=\"uploads/yourmodel/img/example.jpg\")\n\nWhere the file 'example.jpg' is on: yourappfolder/media_fixtures/uploads/yourmodel/img/example.jpg\n\n\nConfigurations\n--------------\n\n- MEDIA_FIXTURE_FOLDERNAME\n You can change the media fixtures folder's name on your apps, just putting this variable on settings.py. \n\n .. code-block:: python\n \n MEDIA_FIXTURE_FOLDERNAME='my_media_fixtures_folder'\n\n- MEDIA_FIXTURES_FILES_FINDERS\n You can change the media fixtures finders, to search media files on other folders not in-app, for instance. \n \n .. code-block:: python\n \n MEDIA_FIXTURES_FILES_FINDERS = (\n 'django_media_fixtures.finders.FileSystemFinder', # combined with MEDIA_FIXTURES_FILES_DIRS, choose specific folders\n 'django_media_fixtures.finders.AppDirectoriesFinder', # default (if you do not set MEDIA_FIXTURES_FILES_FINDERS)\n )\n\n- MEDIA_FIXTURES_FILES_DIRS\n You can list specific media folders that you want to include on search.\n\n .. code-block:: python\n\n MEDIA_FIXTURES_FILES_DIRS = [\n \"/home/user/myproject/mediafiles\",\n \"/opt/webfiles/common/\",\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/adrianoveiga/django-media-fixtures.git", "keywords": "django collectmedia mediafiles mediafixtures fixtures media", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-media-fixtures", "package_url": "https://pypi.org/project/django-media-fixtures/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-media-fixtures/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/adrianoveiga/django-media-fixtures.git" }, "release_url": "https://pypi.org/project/django-media-fixtures/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "Simple project to copy media files (intended for fixtures loads), pretty much as Django staticfiles does", "version": "0.0.3" }, "last_serial": 2227397, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "8563bf1ef7c93b3984abaea5d28c5e0b", "sha256": "89aff382beb8c6e1ee67b87386b4a88c9d90d5bb47433db07b16e7b3c826c66b" }, "downloads": -1, "filename": "django-media-fixtures-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8563bf1ef7c93b3984abaea5d28c5e0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8658, "upload_time": "2016-07-15T07:12:24", "url": "https://files.pythonhosted.org/packages/b9/17/a4e48e527ca50aaf761ba0ea7543735b49ee949ba0f1e3f381af85ce26ef/django-media-fixtures-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "3ff4b008a26f469af6453ae28fee1d7b", "sha256": "735a95fbe40b4ce50951451157f9bb27f7f836fbee9bf59b21550acc11cf5295" }, "downloads": -1, "filename": "django-media-fixtures-0.0.3.tar.gz", "has_sig": false, "md5_digest": "3ff4b008a26f469af6453ae28fee1d7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8715, "upload_time": "2016-07-17T23:48:18", "url": "https://files.pythonhosted.org/packages/86/55/444c708ff4894251061ded1a4aeef2d1e84bc370779c08a9eb032c10aec0/django-media-fixtures-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3ff4b008a26f469af6453ae28fee1d7b", "sha256": "735a95fbe40b4ce50951451157f9bb27f7f836fbee9bf59b21550acc11cf5295" }, "downloads": -1, "filename": "django-media-fixtures-0.0.3.tar.gz", "has_sig": false, "md5_digest": "3ff4b008a26f469af6453ae28fee1d7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8715, "upload_time": "2016-07-17T23:48:18", "url": "https://files.pythonhosted.org/packages/86/55/444c708ff4894251061ded1a4aeef2d1e84bc370779c08a9eb032c10aec0/django-media-fixtures-0.0.3.tar.gz" } ] }