{ "info": { "author": "Ali Zaidi", "author_email": "alixedi@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "=============================\ndjango_popcorn\n=============================\n\n.. image:: https://badge.fury.io/py/django_popcorn.png\n :target: http://badge.fury.io/py/django_popcorn\n \n.. image:: https://travis-ci.org/alixedi/django_popcorn.png?branch=master\n :target: https://travis-ci.org/alixedi/django_popcorn\n\n.. image:: https://pypip.in/d/django_popcorn/badge.png\n :target: https://crate.io/packages/django_popcorn?version=latest\n\n.. image:: https://coveralls.io/repos/alixedi/django_popcorn/badge.png\n :target: https://coveralls.io/r/alixedi/django_popcorn\n\nAdd-another pop-ups a la ``django-admin``. \n\nThe popup views are implemented using a mixin to the generic CreateView. Also, the popups now support permissions. As a result, a user will only get the ``add-another`` link next to a ForeignKey or a ManyToMany field if he has the add permission for the target model. \n\nInstallation\n------------\n\nGet it from the cheeseshop: ::\n\n pip install django_popcorn\n\n\nUsage\n-----\n\nRead on: \n\n1. Include the following in your ``INSTALLED_APPS`` settings: ::\n\n 'popcorn',\n\n2. Add this to your ``settings.py`` (If you do not already have it): ::\n\n TEMPLATE_CONTEXT_PROCESSORS = (\n \"django.contrib.auth.context_processors.auth\",\n \"django.core.context_processors.debug\",\n \"django.core.context_processors.i18n\",\n \"django.core.context_processors.media\",\n \"django.core.context_processors.static\",\n \"django.contrib.messages.context_processors.messages\",\n \"django.core.context_processors.request\",\n \"popcorn.context_processors.admin_media_prefix\",\n )\n\n POPCORN_MODELS = ('auth.Group', 'auth.Permission')\n\n3. Add the following to your ``base.html`` template: ::\n\n \n\n4. We will create a view for ``auth.User`` and use the utility ``get_popcorn_urls`` function to generate popcorn views and urls: ::\n\n urlpatterns = patterns('',\n url(r'^$', CreateView.as_view(model=User, success_url='.'), name='auth_user_create'),\n url(r'^admin/', include(admin.site.urls)),\n )\n\n urlpatterns += get_popcorn_urls()\n\n7. Render your forms like so: :: \n\n
\n\nThats it! sync your DB, run the dev server and fire up your browser at localhost. You should see a form **wthout** the ``add-another`` links. This is because popcorn add-another links are only enabled for users who have add permission for the target model. Now log-in - possibly via admin after enabling it and hit localhost again. You should see a little ``+`` next to ForeignKey and ManyToMany fields. Click it and the add-another popup would appear. If you are having any problems, please check out the test project for a working implementation.\n\n\n\n\nHistory\n-------\n\n1.0.0 (2014-06-23)\n++++++++++++++++++\n\n* 98% test coverage. Ready for big-time.\n\n0.2.0 (2013-12-9)\n++++++++++++++++++\n\n* Added support for permissions. \n\n0.1.0 (2013-12-2)\n++++++++++++++++++\n\n* First release on PyPI.", "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/alixedi/django_popcorn", "keywords": "django_popcorn", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django_popcorn", "package_url": "https://pypi.org/project/django_popcorn/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django_popcorn/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/alixedi/django_popcorn" }, "release_url": "https://pypi.org/project/django_popcorn/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Add-another pop-ups a la django-admin.", "version": "1.0.0" }, "last_serial": 1135031, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "328c9617911b7b81d47a0ac05e7e37d1", "sha256": "80648fb7752ea4bda2636ae31d8b87721f3b1655eca5cb83cb1b449a15360080" }, "downloads": -1, "filename": "django_popcorn-0.1.0.tar.gz", "has_sig": false, "md5_digest": "328c9617911b7b81d47a0ac05e7e37d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7085, "upload_time": "2013-12-02T09:14:02", "url": "https://files.pythonhosted.org/packages/4d/78/4ee00472c0a48c8af1863ce968c421093837dbd3f92d085973ba9c1b7eb4/django_popcorn-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5d49fbaebb329823779283a2ef6cfd16", "sha256": "c9364e34ed70596b65e936554be54b43d0d492f7fc67d5d1b2d036ca800940ed" }, "downloads": -1, "filename": "django_popcorn-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5d49fbaebb329823779283a2ef6cfd16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7281, "upload_time": "2013-12-09T06:07:39", "url": "https://files.pythonhosted.org/packages/9a/7c/8894432f1ac97b01933a958aec3b47c8655053cb8d130522e2015c9f7056/django_popcorn-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "b46810c29e4c3c53ff2a738f36770e14", "sha256": "7f11b4e742036ea961cf9d95660d2a3bc8570a2cf06af99f8e5b9268d88b56c1" }, "downloads": -1, "filename": "django_popcorn-0.2.1.tar.gz", "has_sig": false, "md5_digest": "b46810c29e4c3c53ff2a738f36770e14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7470, "upload_time": "2013-12-09T06:18:39", "url": "https://files.pythonhosted.org/packages/24/79/9cdbd739336a228b618a130784e3937dbac657707fb87338c97a076f7bf4/django_popcorn-0.2.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "449c7a7ba1ebaacdde40a4934e0826b4", "sha256": "f86018e333ea0e2daad2dd2b74c3aedcd17a5da031f8251ca80a2c26388fabee" }, "downloads": -1, "filename": "django_popcorn-1.0.0.tar.gz", "has_sig": false, "md5_digest": "449c7a7ba1ebaacdde40a4934e0826b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14827, "upload_time": "2014-06-23T20:01:44", "url": "https://files.pythonhosted.org/packages/ce/e0/401c19faab7e3a9d91e7b0c5ba63bf28854c443e7cb3b3ad02b05e1e0c40/django_popcorn-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "449c7a7ba1ebaacdde40a4934e0826b4", "sha256": "f86018e333ea0e2daad2dd2b74c3aedcd17a5da031f8251ca80a2c26388fabee" }, "downloads": -1, "filename": "django_popcorn-1.0.0.tar.gz", "has_sig": false, "md5_digest": "449c7a7ba1ebaacdde40a4934e0826b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14827, "upload_time": "2014-06-23T20:01:44", "url": "https://files.pythonhosted.org/packages/ce/e0/401c19faab7e3a9d91e7b0c5ba63bf28854c443e7cb3b3ad02b05e1e0c40/django_popcorn-1.0.0.tar.gz" } ] }