{ "info": { "author": "Dave Lowe", "author_email": "dave@hellopullswitch.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "django-freeplay\n===============\n\nFreeplay is a unique approach to easily add CMS functionality to\nyour Django app. Define regions for managing (and allowing clients to manage) \nbits of content on your site that don't need the full build-out of \ncustom apps. For example, that list of links in the footer, or the photo \nand bio of the CEO. With Freeplay, each region can contain one or many \nitems, so you quickly gain flexible model-like functionality.\n\nEach bit of content gets rendered onsave with Django's template \nprocessor, so you have all the power of the Django's parser.\n\n\nInstallation\n============\n\n1. ``pip install django-freeplay``\n2. Add ``'freeplay'`` and ``'relatedwidget'`` to your ``INSTALLED_APPS``\n in your project's settings.py\n3. Add ``(r\"^admin/content/\", include(\"freeplay.urls_admin\")),`` to \n your main urls.py, before you include the admin urls\n4. Sync your db or use your migration tool of choice \n (recommended: `nashvegas`_)\n\n.. _`nashvegas`: https://github.com/paltman/nashvegas\n\n\nRequirements\n============\n\nInstalling freeplay will also bring \n`django-model-utils`_, `django-imagekit`_, \nand `django-relatedadminwidget`_ with it.\n\nThe admin templates assume the existence of a few CSS and JS libraries: \n`Chosen`_, `Masonry`_, and `jQuery.Slugify`_. Place\nthe files here (in relation to your staticfiles directory) to \"just make it\nwork\":\n\n- chosen_v1.0.0/chosen.jquery.min.js\n- masonry/jquery.masonry.min.js\n- jquery-slugify/dist/slugify.min.js\n\nNote: All three of these can be installed quickly using `bower`_. Add\n`django-bower`_ to your project if you haven't yet!\n\nThese paths can also be overridden with a `FREEPLAY` setting in your settings\nfile:\n\n.. code-block:: python\n\n FREEPLAY = {\n \"CHOSEN_PATH\": \"some/path/chosen.js\",\n \"SLUGIFY_PATH\": \"some/path/slugify.js\",\n \"MASONRY_PATH\": \"some/path/masonry.js\"\n }\n\nAnd for more advanced customization, you can always override the freeplay\ntemplates with your own.\n\n.. _`django-model-utils`: https://github.com/carljm/django-model-utils\n.. _`django-imagekit`: https://github.com/jdriscoll/django-imagekit\n.. _`django-relatedadminwidget`: https://github.com/benjaoming/django-relatedadminwidget\n.. _`Chosen`: https://github.com/harvesthq/chosen/\n.. _`Masonry`: http://masonry.desandro.com\n.. _`jQuery.Slugify`: https://github.com/pmcelhaney/jQuery-Slugify-Plugin\n.. _`bower`: http://bower.io/\n.. _`django-bower`: https://github.com/nvbn/django-bower\n\nUsage\n=====\n\nIn the django admin, create a new freeplay **Template**. Start by defining the \ntemplate **bits** and then write the template **code**. For example, let's say we want to \nmanage a few FAQs. We'd create one bit like so:\n\n| Kind: Plain Text \n| Name: Question \n| Context name: question \n| Order: 1 \n| Text Widget: Textarea Input Field \n| Required: True \n\nAnd another:\n\n| Kind: Markdown \n| Name: Answer \n| Context name: answer \n| Order: 2 \n| Text Widget: Textarea Input Field \n| Required: True\n\n(Note: if you use Markdown, be sure you've added ``markdown`` to your \nrequirements)\n\nWhen you set up the bits for a template, you're defining the form that you \nor your clients will use to add and edit content for items that use this \ntemplate. As such, you can include help text with each bit.\n\nNow we can write the following for the template Code:\n\n.. code-block:: html\n\n {{ order }}\n {{ question|title }}\n
{{ answer|safe }}
\n\nNote we need to use the ``safe`` filter for HTML content, and also that each \nitem will include its \"order\" in context as well as \"label\".\n\nAs soon as you have a template, create a **Region** and then you can start adding \ncontent, which is easily done using the included admin urls and templates.\n\nTemplatetags\n------------\n\nHere's how you fetch and display freeplay content in your templates:\n\n.. code-block:: html\n\n {% load freeplay_tags %}\n\n\n``content_bits`` : assignment tag, accepts \"region_slug\" as argument\n\n.. code-block:: html\n \n {% content_bits \"question-answer\" as qa_items %}\n {% for item in qa_items %}\n
  • {{ item.data|safe }}
  • \n {% endfor %}\n\n``get_bit`` : assignment tag, requires \"region_slug\" and, optionally, \"item_slug\" \n\n.. code-block:: html\n\n {% get_bit \"site_constants\" \"footer-company-summary\" as co_summary %}\n \n\n.. code-block:: html\n\n {% get_bit \"footer-address\" as address %}\n \n\nImages\n-------\n\nImage bits can be rendered in your template using `{{ item }}` (if the context\nname for this bit is \"item\". Thisenerates the `` tag including an `alt`\nattribute. If you just want to get the image path, you can either use\n`{{ item.contentbit.image_url }}` or `{{ item_url }}`.\n\n\nAlso\n====\n\nFreeplay regions let you set \"Min Items\" and \"Max Items\", optionally. On the \nfreeplay admin dashboard, it will then alert you if a region needs more content \nto meet the minimum requirement and won't show the \"Add\" link if the region has \nmet the maximum limit.\n\nImage constraints should be entered as width followed by height, separated with \"x\": 150x80\n\nTo display an image in your template, something like this will work:\n\n.. code-block:: html\n\n \"Headshot\"\n\nOr...\n\n.. code-block:: html\n\n {{ headshot.markup }}\n\nHope you find this useful!", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/pullswitch/django-freeplay", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-freeplay", "package_url": "https://pypi.org/project/django-freeplay/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-freeplay/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/pullswitch/django-freeplay" }, "release_url": "https://pypi.org/project/django-freeplay/0.1.91/", "requires_dist": null, "requires_python": null, "summary": "Easily add CMS functionality to your Django site", "version": "0.1.91" }, "last_serial": 985457, "releases": { "0.1.2": [ { "comment_text": "built for Darwin-12.2.0", "digests": { "md5": "433256515c3d9962ad529369ca940b1f", "sha256": "4d5f25b46a4d5af39974bbe76edc9601558127dbbbfe5ae0829b8f4c1e7ad31a" }, "downloads": -1, "filename": "django-freeplay-0.1.2.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "433256515c3d9962ad529369ca940b1f", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 13169, "upload_time": "2013-03-22T20:43:16", "url": "https://files.pythonhosted.org/packages/25/eb/8c59bad85b44f74fe1085e20b047cea9230349325ed4082cdda13a338b5f/django-freeplay-0.1.2.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "bc4d2801d4faa08c3ed6c008e754b643", "sha256": "b514426cf5fba99fb33c7e3c54d10c9cc825726202fa6a936e7e401b3eb23538" }, "downloads": -1, "filename": "django-freeplay-0.1.2.tar.gz", "has_sig": false, "md5_digest": "bc4d2801d4faa08c3ed6c008e754b643", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10147, "upload_time": "2013-03-22T20:43:14", "url": "https://files.pythonhosted.org/packages/58/43/3c4068c921a29aaf606d4e4ef9db52fa49240a14d34f4c67b64beeb710d5/django-freeplay-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "built for Darwin-12.2.0", "digests": { "md5": "df1233ec2fd8feb5a49a63241e12504c", "sha256": "a59e31dc742b51eee2752bf2da6c809aca06093ace0efa6b1c2d26ec8855f5a1" }, "downloads": -1, "filename": "django-freeplay-0.1.3.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "df1233ec2fd8feb5a49a63241e12504c", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 13156, "upload_time": "2013-03-26T02:49:24", "url": "https://files.pythonhosted.org/packages/e0/db/f3fb2e46c2a01907eac0b6cbc0529e3691b4dd956ad512a5971b3adae81c/django-freeplay-0.1.3.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "db5a04abfa9db59ac8b599fdb0a135b9", "sha256": "9f167611e1978cb404a16b84b054f131f9d56f8264192832e7cf9aff611f43b1" }, "downloads": -1, "filename": "django-freeplay-0.1.3.tar.gz", "has_sig": false, "md5_digest": "db5a04abfa9db59ac8b599fdb0a135b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10134, "upload_time": "2013-03-26T02:49:22", "url": "https://files.pythonhosted.org/packages/ff/c8/89408a43bdb75d8fcf8283d18016f5c2e3bab02594fc335818d21868504c/django-freeplay-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "built for Darwin-12.2.0", "digests": { "md5": "5066c3bd143c68f143dab7ee897f427a", "sha256": "17927cd4aa54a5256bf5951f22fba1295f19f7fc22ea0eee6f32f0d7dbd22401" }, "downloads": -1, "filename": "django-freeplay-0.1.4.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "5066c3bd143c68f143dab7ee897f427a", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 13180, "upload_time": "2013-03-29T18:35:39", "url": "https://files.pythonhosted.org/packages/da/b6/019d447e32a82b39a989e363b051941b524c73387ee41cc9ec0fe099a221/django-freeplay-0.1.4.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "7fade8f2817cfd8047d776e5261af0b7", "sha256": "8020477308b08fe715a437f58002135c19cfd86e03e569376db54f8d82a8b359" }, "downloads": -1, "filename": "django-freeplay-0.1.4.tar.gz", "has_sig": false, "md5_digest": "7fade8f2817cfd8047d776e5261af0b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10148, "upload_time": "2013-03-29T18:35:36", "url": "https://files.pythonhosted.org/packages/74/a1/0b9fb32412d724584efbcf33c97f59292671a249c4edfd988a672b1b74b9/django-freeplay-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "built for Darwin-12.2.0", "digests": { "md5": "76c009186475128ba02a9034d848fbe1", "sha256": "950843023bf50a8a71130647f07bf69e6238739cf8ecc715314688f70d228b14" }, "downloads": -1, "filename": "django-freeplay-0.1.5.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "76c009186475128ba02a9034d848fbe1", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 13282, "upload_time": "2013-04-09T15:42:55", "url": "https://files.pythonhosted.org/packages/1d/a3/c323e33f00a7e82ec948bfe49072973bcf17123acdae9630cb4b874c4f9a/django-freeplay-0.1.5.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "a84634a6d8343c04aa06fa1399749f4a", "sha256": "8df958c1d517636676a244d3c9be554960bcc24cb2a6c6201ecc9c4d81f2e84b" }, "downloads": -1, "filename": "django-freeplay-0.1.5.tar.gz", "has_sig": false, "md5_digest": "a84634a6d8343c04aa06fa1399749f4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10190, "upload_time": "2013-04-09T15:42:53", "url": "https://files.pythonhosted.org/packages/81/28/fb5b290d737e0844ec78173aad7dff40c8a847894d963cc3cbe2b0bc9acb/django-freeplay-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "built for Darwin-12.2.0", "digests": { "md5": "35fa9c15605c147a5f76fe04f0b20d87", "sha256": "45511821cd63c19d5dbdad9821c4666e6a3f4abbe410237a6b45d14ef4c43357" }, "downloads": -1, "filename": "django-freeplay-0.1.6.macosx-10.8-x86_64.tar.gz", "has_sig": false, "md5_digest": "35fa9c15605c147a5f76fe04f0b20d87", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 13264, "upload_time": "2013-04-09T20:57:44", "url": "https://files.pythonhosted.org/packages/3b/47/3c2dcd26e745d91f844740688fd65c36801e82f62a4f3f93c8683d44067d/django-freeplay-0.1.6.macosx-10.8-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "829f93c4f7171a2778bb7ecb71cb2cdc", "sha256": "c0a4245b0f2b81c1a72205b54546915831a352b54cb76c328ab25c7ee5ef1681" }, "downloads": -1, "filename": "django-freeplay-0.1.6.tar.gz", "has_sig": false, "md5_digest": "829f93c4f7171a2778bb7ecb71cb2cdc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10183, "upload_time": "2013-04-09T20:57:42", "url": "https://files.pythonhosted.org/packages/5d/2f/2f26750ed2a11fae1f48fbed7d6041d132b017a1e7ae63c0167d9e5e68e8/django-freeplay-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "1ce2096f6015038905318ba5d8981eb4", "sha256": "fa68c1d624af400573202890ed5a2efdd0de65de60501bcc09dfef05b50291b4" }, "downloads": -1, "filename": "django-freeplay-0.1.7.tar.gz", "has_sig": false, "md5_digest": "1ce2096f6015038905318ba5d8981eb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12834, "upload_time": "2014-01-24T20:06:51", "url": "https://files.pythonhosted.org/packages/14/6b/0663507e170cf5fd854873bb1023a3f478b59298e25e08286b27917fd7e1/django-freeplay-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "368605160ac0ebd7cb1532959cc4ba4c", "sha256": "d904cf878693dcc4b62cf95744d5198e82d40c9970ef1b2d8f189a2858444962" }, "downloads": -1, "filename": "django-freeplay-0.1.8.tar.gz", "has_sig": false, "md5_digest": "368605160ac0ebd7cb1532959cc4ba4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12136, "upload_time": "2014-01-29T18:19:16", "url": "https://files.pythonhosted.org/packages/6b/28/4cc8f96cd577f049424c471a018d06d9dfe57c0ce5f7a082bf16b6c5a621/django-freeplay-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "3092cb9556dae42d7968212af6253626", "sha256": "e1af70f180585c15081ba6c91ebfaf8afd7815f00c1c3f8bc9836d0806a3c779" }, "downloads": -1, "filename": "django-freeplay-0.1.9.tar.gz", "has_sig": false, "md5_digest": "3092cb9556dae42d7968212af6253626", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12252, "upload_time": "2014-01-29T19:54:40", "url": "https://files.pythonhosted.org/packages/4c/8d/090c0aac1b8ebd402bb57df6313f39996c81d64e322d0a0a4c15b3bacee8/django-freeplay-0.1.9.tar.gz" } ], "0.1.91": [ { "comment_text": "", "digests": { "md5": "2e4668033c1ff29a1d1d4b49e0c4f0b5", "sha256": "900a899a965416411ebb560c841ab1a90c52a9679264a49bc7f10f1662c67705" }, "downloads": -1, "filename": "django-freeplay-0.1.91.tar.gz", "has_sig": false, "md5_digest": "2e4668033c1ff29a1d1d4b49e0c4f0b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12228, "upload_time": "2014-01-29T20:02:59", "url": "https://files.pythonhosted.org/packages/7e/6f/02169dad0fb7907c5678aa96080fec14a460af32c2c403ae2c481d6f8be2/django-freeplay-0.1.91.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e4668033c1ff29a1d1d4b49e0c4f0b5", "sha256": "900a899a965416411ebb560c841ab1a90c52a9679264a49bc7f10f1662c67705" }, "downloads": -1, "filename": "django-freeplay-0.1.91.tar.gz", "has_sig": false, "md5_digest": "2e4668033c1ff29a1d1d4b49e0c4f0b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12228, "upload_time": "2014-01-29T20:02:59", "url": "https://files.pythonhosted.org/packages/7e/6f/02169dad0fb7907c5678aa96080fec14a460af32c2c403ae2c481d6f8be2/django-freeplay-0.1.91.tar.gz" } ] }