{ "info": { "author": "Osiloke Emoekpere", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "OVERVIEW\n========= \n:Author: Osi Emoekpere (http://osiloke.com, http://twitter.com/osilocks)\n\n:info: This app extends mezzanine applications by provides an interface for adding dynamic custom content like a twitter mentions widget or slideshow to mezzanine pages.\n\nFeatures\n========\n* Easy and full frontend modification of widgets i.e Adding, Editing and Deleting widgets\n* Configuration options for each widget\n* Multisite support\n* Sortable Widgets\n* Mutual exclusivity from django app loader\n* Bootstrap theme integration\n\nRequirements\n============\n\nPython\n------\nmezzanine 1.x.x\ndjango-classy-tags\n\nJavascript \n----------\nBootstrap Tooltip\nJquery Django Admin Form\nunderscore\njQuery UI\n\nPlease use widget/widget_loader.html as a reference to add the neccessary js if you do not want to use the {% widget_loader %} tag.\n\nMETHODOLOGY\n===========\nWidgets are placed in the specified slot. Slots are just placeholders inside django templates where widgets are rendered.\nThey are not stored in the database. As a result, a template designer does not worry about syncing the database\nevery time he wants to create a `slot` in a template. On the other hand, the end user must be aware of the `slots` available for\nwidgets.\n\nWidget Classes contain the logic used to render each widget and are dynamically loaded at runtime using the same autoloading magic\nused for django admin.\n\nSetup\n=====\nAdd the widget app to your installed apps after all mezzanine apps in your ``settings.py``::\n\n INSTALLED_APPS = (\n ...\n 'widget',\n ...\n )\n\nUSAGE\n=====\n\nPage Widgets\n------------\nThe widget app searches all apps in loaded in django for a file named `page_widgets.py`. This file contains code which describe\nhow a widget should be rendered. An example widget which displays the addthis links is shown below::\n\n class SocialLogosWidget(WidgetClassBase):\n template = \"widgets/social.html\"\n\n def render(self, context, slot, queryset, **kwargs):\n return context\n\n class Meta:\n name = _(\"Social Logos\")\n author = 'Progweb Team'\n\nThis widget just renders the social.html template which contains the addthis links.\n\nWidgets can also have options. A widget which shows mentions of a twitter user is shown below::\n\n class TwitterMentionsWidgets(WidgetClassBase):\n \"Displays recent messages for a twitter account, Uses\"\n template = \"widgets/twitter_mentions.html\"\n\n options = [\n opt(name=\"Tag\", required=True, help_text=\"#Tag to list\"),\n opt(name=\"Limit\", default=3, help_text=\"Number of tweets to show\"),\n ]\n\n def render(self, context, **kwargs):\n return context\n\n class Meta:\n name = \"Twitter Mentions\"\n author = 'Progweb Team'\n\n\nWidgets are not used in the application until they are registered::\n\n widget_pool.register_widget(SocialLogosWidget)\n widget_pool.register_widget(TwitterMentionsWidgets)\n\nThe template variable can either be the path to a template file or a string with the template definition\n\n\nRendering\n---------\nRender widgets on a page by first including the widget tag library::\n\n\t{% load widget_tags %}\n\nYou will need to load the javascript code which is used to manipulate widgets. The following should go in your base template::\n\n {% widget_loader %}\n\n.. note:: This should come after all other javascript declarations. Please make sure you have jquery declared.\n\nThe following snippet will render widgets which are assigned to the footer slot.::\n\n\t{% render_widgets \"footer\" %}\n\n\nAdding Widgets\n--------------\nIt is really easy to add widgets from the frontend site. Just look for the `Add Widget` link and click it. You will get a\nlist of widgets to choose from. If the widget has options, you will be able to enter them. Try adding the twitter mentions widget.\n\n.. note:: Widgets can only be modified on mezzanine pages (for now).\n\nExample Project\n===============\nInstall the widgets app by running::\n\npython setup.py install #From the `widget` folder\n\nChange directory to the example app and run::\n\npython manage.py createdb --noinput\n\nThis will create a demo mezzanine applciation, To test out mezzanine widgets go to any mezzanine page (about, gallery etc) and click the `add widget` button to add a new widget. \n\nRun tests from the example folder with::\n\npython manage.py test widget --settings=test_settings\n\nTODO\n====\n* Better presentation of widget list in frontend.\n* More render options, like provide template for widget list wrap\n* Bootstrap theme integration", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://osiloke.blogspot.com", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "Mezzanine-Widgets", "package_url": "https://pypi.org/project/Mezzanine-Widgets/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Mezzanine-Widgets/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://osiloke.blogspot.com" }, "release_url": "https://pypi.org/project/Mezzanine-Widgets/1.5.1/", "requires_dist": null, "requires_python": null, "summary": "Makes it super easy to add extra content to mezzanine pages and also add extended functionality. Check out the example app.", "version": "1.5.1" }, "last_serial": 784704, "releases": { "0.1.0dev": [ { "comment_text": "", "digests": { "md5": "41d9575df24ca20720004a3696b76e0c", "sha256": "7020e643c565404eb238b2e4defe16c8cc623f72bc346e69c9edb06710dee551" }, "downloads": -1, "filename": "Mezzanine Widgets-0.1.0dev.tar.gz", "has_sig": false, "md5_digest": "41d9575df24ca20720004a3696b76e0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21117, "upload_time": "2012-03-06T22:50:24", "url": "https://files.pythonhosted.org/packages/d7/12/be1f106832d0da24407a5bd65612c4791846ad5a5dbec2ff4468621cdfec/Mezzanine%20Widgets-0.1.0dev.tar.gz" } ], "1.5": [], "1.5.1": [] }, "urls": [] }