{ "info": { "author": "Kai Wu", "author_email": "k@limist.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP" ], "description": "Overview\n========\n\ndjango-metaimage is a GPL-licensed app for the Django web framework.\nMany sites deal with images/photos, which usually come from three\nsources: uploaded by a user, pulled from the Internet via a URL, or\ngenerated server-side. For the latter two cases, django-metaimage\nshould be helpful: a new instance can take either a remote image URL,\nor raw image data as a string (e.g. as might be produced via\nMatplotlib).\n\nThe main MetaImage model provides a wrapper of useful functionality\naround ImageModel from the powerful django-photologue app (a\ndependency). Some of the django-metaimage code was initially inspired\nfrom Pinax's photo app, but I have removed Pinax dependencies, so that\ndjango-metaimage only requires:\n\n1. Django \n2. django-photologue\n3. django-autoslug\n4. django-taggit\n5. django-uni-form, trunk (optional)\n\nYou might need django-uni-form, if you want to use the included\nexample templates, and want to see all django-metaimage's tests pass.\n\nIn sum, this app is provides more flexibility with local\nrepresentation of images on your site from multiple sources, whether\nuploaded, from remote images, or sever-side generated images.\n\n\nUsage\n-----\n\nThe main class, MetaImage, enables storing useful metadata about\nimages, including a title, caption, notes about the source\n(e.g. copyrights, permissions), and tags. MetaImage attributes\ninclude:\n\n- title, slug, caption, source_note (for attribution text, copyrights, etc.)\n- source_url (if any)\n- privacy \n- safetylevel\n- tags\n\n\nNow, to handle the two cases of storing images that the app was made\nfor: retrieval of a remote image from its URL (you'll have a local\ncopy in case the image moves/disappears), or storing a server-side\ngenerated image:\n\n- With a remote image, simply specify the source_url field in the new\n MetaImage instance and save it, e.g.\n\n::\n\n new_metaimage = MetaImage(\n title='Django logo',\n source_url='http://media.djangoproject.com/img/site/hdr_logo.gif',\n source_note='The logo of the Django project.',\n creator=foo_user)\n new_metaimage.save() # Will download, save source_url locally.\n\n\n- With a server-side generated image - as a string object - one would\n send in the keyword argument image_data when saving, e.g.\n\n::\n\n new_metaimage = MetaImage(\n title='Chart of f(x)',\n source_note='Chart of f(x) generated by Matplotlib.',\n creator=foo_user)\n new_metaimage.save(image_data=a_png_as_str)\n\n\nUseful MetaImage methods include:\n\n- render() and render_linked(), which spits out the HTML to show your\n image on a webpage, with a hyperlink to a details-page.\n\n\nBasic views, tests, and templates are also provided, so you can\nquickly integrate the app into an existing Django site.\n\n\nInstallation\n------------\n\nInstall via \"pip install django-metaimage\" or from source. You may\nalso need to do pip install for django-taggit, django-autoslug, and\nphotologue. \n\nThen update your Django project's settings.py file: add \"photologue\",\n\"taggit\" and \"metaimage\" (autoslug does not need to be there) in the\nINSTALLED_APPS list, e.g.\n\n::\n\n INSTALLED_APPS = [\n ...\n \"photologue\",\n \"taggit\",\n \"metaimage\",\n ...\n ]\n\n\nAnd then, do a \"manage.py syncdb\" to create the database tables\nneeded.\n\n\nOPTIONAL: Templates are provided for adding, editing, viewing, etc. of\nmetaimages; they're very basic and meant only as a starting point.\nBut if you want to use them directly, do at least these two things:\n\n1. Get and install django-uni-form > 0.7.0 which some of the templates\n rely on, and also update your setting.py INSTALLED_APPS to list\n \"uni_form\" as a package dependency.\n2. Update your site-wide urls.py, e.g.\n\n\n::\n\n urlpatterns = patterns(\"\",\n ...\n (r\"^metaimage/\", include(\"metaimage.urls\")),\n ...\n )\n\n\nAlso, many of the django-metaimage templates have templatetags\ndependencies that are commented out, as they require Pinax or other\npackages; you can activate them as needed, but be sure to update your\nINSTALLED_APPS accordingly.\n\n\nTesting\n-------\n\nI've included a set of unit tests for the app; if you have integrated\ndjango-metaimage into an existing Django site/project, just do the\nusual \"manage.py test\" and the tests should be run, BUT for all tests\nto pass, the current trunk (as of 2/2011) of django-uni-form is\nneeded:\n\nhttps://github.com/pydanny/django-uni-form\n\n\nShould you want to run django-metaimage's test suite outside of any\nparticular Django site/project - i.e. stand-alone Django app testing -\nI suggest installing and using the django-app-test-runner and my fork\nof it at:\n\nhttps://github.com/limist/django-app-test-runner\n\n...which enables usage of a testing-specific settings file. After you\ninstall django-app-test-runner in your virtualenv (don't develop in\nPython without it!) you should be able to do something like:\n\n::\n\n cd to/where/django-metaimage/code/is\n app-test-runner ./src/metaimage/ -s src/metaimage/testsettings.py\n\n\nNote that you'll need Internet connectivity for the tests to pass.\n\n\nErrors, etc.\n------------\n\nPlease log errors/issues using django-metaimage's github site,\nhttp://github.com/limist/django-metaimage/issues", "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/limist/django-metaimage", "keywords": null, "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "django-metaimage", "package_url": "https://pypi.org/project/django-metaimage/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-metaimage/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/limist/django-metaimage" }, "release_url": "https://pypi.org/project/django-metaimage/0.4/", "requires_dist": null, "requires_python": null, "summary": "Wrapper around django-photologue dealing w/ remote images, and server-side-generated images.", "version": "0.4" }, "last_serial": 743084, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "fcdbc1f7d1c9c5431f725f5248a6ffca", "sha256": "4f9b1256190c548bf5b416feb56a8d9be58d985755c642f16ba9b222040f43f5" }, "downloads": -1, "filename": "django_metaimage-0.3-py2.6.egg", "has_sig": false, "md5_digest": "fcdbc1f7d1c9c5431f725f5248a6ffca", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 35688, "upload_time": "2011-02-24T18:12:02", "url": "https://files.pythonhosted.org/packages/d2/35/607fa936eebf04b5178ee9a6188ed8bd2b4c052f8053b4e05d6980d62cac/django_metaimage-0.3-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "71002e120a55faf9fa8c3eaf4132ed69", "sha256": "c7af79a956a38eb4b13f6b4200f89734f4e0767da0ae1081f24d5cc5ee4e5998" }, "downloads": -1, "filename": "django-metaimage-0.3.tar.gz", "has_sig": false, "md5_digest": "71002e120a55faf9fa8c3eaf4132ed69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13865, "upload_time": "2011-02-24T18:12:02", "url": "https://files.pythonhosted.org/packages/59/a9/b2f44833f148681dc2d59b09611b97c4043ab5013848c230aeaeb6b42b25/django-metaimage-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "3f12926ac853d6b522f971c731caaeaa", "sha256": "d33ca3e9d6794820fbd7e5e122fdbf55c06c2cfa0e706bdfde5d0e803d3ff7b3" }, "downloads": -1, "filename": "django_metaimage-0.4-py2.6.egg", "has_sig": false, "md5_digest": "3f12926ac853d6b522f971c731caaeaa", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 33257, "upload_time": "2011-05-21T04:21:26", "url": "https://files.pythonhosted.org/packages/3b/de/3ea9dd50243ce1eac5be7a639562c0a26d342d0c10b82fcd39dfb2ddd9db/django_metaimage-0.4-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "704d1347cafb2b8d98e8d9d3ea6d08a1", "sha256": "45b8ff28da84a0b8905cf25490c88680b73923adf2ef8ac38c44dc73de2a9563" }, "downloads": -1, "filename": "django-metaimage-0.4.tar.gz", "has_sig": false, "md5_digest": "704d1347cafb2b8d98e8d9d3ea6d08a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14875, "upload_time": "2011-05-21T04:21:25", "url": "https://files.pythonhosted.org/packages/46/7a/fd896b2dce86d463cd1ef7dd8045b68db6e160bd36ad415d83a8c0874d01/django-metaimage-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f12926ac853d6b522f971c731caaeaa", "sha256": "d33ca3e9d6794820fbd7e5e122fdbf55c06c2cfa0e706bdfde5d0e803d3ff7b3" }, "downloads": -1, "filename": "django_metaimage-0.4-py2.6.egg", "has_sig": false, "md5_digest": "3f12926ac853d6b522f971c731caaeaa", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 33257, "upload_time": "2011-05-21T04:21:26", "url": "https://files.pythonhosted.org/packages/3b/de/3ea9dd50243ce1eac5be7a639562c0a26d342d0c10b82fcd39dfb2ddd9db/django_metaimage-0.4-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "704d1347cafb2b8d98e8d9d3ea6d08a1", "sha256": "45b8ff28da84a0b8905cf25490c88680b73923adf2ef8ac38c44dc73de2a9563" }, "downloads": -1, "filename": "django-metaimage-0.4.tar.gz", "has_sig": false, "md5_digest": "704d1347cafb2b8d98e8d9d3ea6d08a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14875, "upload_time": "2011-05-21T04:21:25", "url": "https://files.pythonhosted.org/packages/46/7a/fd896b2dce86d463cd1ef7dd8045b68db6e160bd36ad415d83a8c0874d01/django-metaimage-0.4.tar.gz" } ] }