{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python" ], "description": ".. contents::\n\nIntroduction\n============\n\nThis package is a collection of utility code to make building Pyramid applications\nbacked by SQLAlchemy easier. It includes:\n\n- A TemplateAPI class to inject variables into all your templates\n- A Deform CSRF-validation schema\n- A Deform Recaptcha widget\n- SQLAlchemy DBSession and declarative_base stubs\n\nExtra Models\n------------\n\nIf you have models that you would like the main ``initialize_db`` script to create,\nthey need to inherit from ``sixfeetup.bowab.db.Base``. Then add the following to your config::\n\n bowab.models =\n dotted.python.path.to.models\n\nUsing the TemplateAPI\n---------------------\n\nIf you would like to include the ``sixfeetup.bowab.api.TemplateAPI`` class as is, you simply need to\ninclude this in your Pyramid app configuration::\n\n config.include('sixfeetup.bowab')\n\nThis will add an event subscriber to the ``pyramid.events.BeforeRender`` event. This means that all\ntemplates will have access to an ``api`` variable that represents the ``TemplateAPI`` instance.\n\nGoogle Analytics\n================\n\nThe TemplateAPI class supports extracting Google Analytics settings from the Pyramid settings registry. The following keys are supported:\n\n gaq.account\n Property ID from Google\n gaq.allow_linker\n http://code.google.com/apis/analytics/docs/gaJS/gaJSApiDomainDirectory.html#_gat.GA_Tracker_._setAllowLinker\n gaq.domain_name\n explicit domain name to use\n gaq.single_push\n boolean; use a push per setting, or one single push\n\nTo use this in your project, update ``base.pt`` to include::\n\n \n \n \n \n\nCustomizing the TemplateAPI\n---------------------------\n\nOften, you will want to use the ``sixfeetup.bowab.api.TemplateAPI`` class as a base for your own API\ninstances, since you may have extra variables that should be available to templates.\n\nTo do this, you need to include ``sixfeetup.bowab`` as specified in the 'Using the TemplateAPI' section.\n\nThen, create a subclass within your project that inherits from ``sixfeetup.bowab.api.TemplateAPI``::\n\n from sixfeetup.bowab.api import TemplateAPI\n\n class MyTemplateAPI(TemplateAPI):\n def __init__(self, request, rendering_val):\n super(MyTemplateAPI, self).__init__(request, rendering_val)\n # Any custom initalization\n\n def my_func(self):\n return 'my func'\n\nThen, in your ``paster.ini`` file, include the following::\n\n bowab.api_class = my_project.MyTemplateAPI\n\nMake sure the ``bowab.api_class`` variable points to the full dotted path of your custom class. This class will\nthen be registered by the ``sixfeetup.bowab`` include process.\n\nUsing the Recaptcha Widget\n--------------------------\n\nThe Recaptcha widget needs the private and public keys for your Recaptcha account.\nThese can be set in your config file using the ``bowab.recaptcha_private_key`` and\n``bowab.recaptcha_public_key`` values, respectively.\n\n\nUsing the SpectrumColorPickerWidget\n-----------------------------------\n\nThe spectrum color picker widget can be used to convert text inputs expecting\n'#'-prefixed hexidecimal values to a nice jquery-based color picker input.\n\nIf the widget is initialized with a 'default' color value, that value will be\npresented as a pallet swatch to ease returning to default. If initialized with\na 'color' value, that will be the initial color displayed.\n\nForms using the color picker widget will need to use the ``colorpicker_registry``\nin order to ensure that the color picker js and css files are found. Alternatively,\nthe resources may be imported and loaded into a custom registry, or into the\ndeform ``default_resource_registry``.\n\nIf you have more than one color field in a form, and wish to have separate\nvalues used for ``color`` and ``default``, import the ``build_color_widget`` function\nwhich is suitable for use inside a defered widget generator. (See\n``speak_friend.forms.profiles.Domain`` for an example).\n\nContributors\n============\n\n- David Blewett\n- Nolan Brubaker\n- Cris Ewing\n- Chrissy Wainwright\n- Clayton Parker\n\nChangelog\n=========\n\n0.8 (xxxx-xx-xx)\n----------------\n\n0.7\n---\n\n- Initial implementation\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://svn.plone.org/svn/collective/", "keywords": "", "license": "gpl", "maintainer": "", "maintainer_email": "", "name": "sixfeetup.bowab", "package_url": "https://pypi.org/project/sixfeetup.bowab/", "platform": "", "project_url": "https://pypi.org/project/sixfeetup.bowab/", "project_urls": { "Homepage": "http://svn.plone.org/svn/collective/" }, "release_url": "https://pypi.org/project/sixfeetup.bowab/0.11/", "requires_dist": null, "requires_python": "", "summary": "Helpful utilities for Pyramid projects", "version": "0.11" }, "last_serial": 3962155, "releases": { "0.11": [ { "comment_text": "", "digests": { "md5": "d7e65c6b102dbdf3d2a1dcd90e16799b", "sha256": "e871d17da52d0ead4f47ded3b96791f43fb46b601a447bf7b78d6c4ff51fda6d" }, "downloads": -1, "filename": "sixfeetup.bowab-0.11.zip", "has_sig": false, "md5_digest": "d7e65c6b102dbdf3d2a1dcd90e16799b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49332, "upload_time": "2018-06-14T17:13:40", "url": "https://files.pythonhosted.org/packages/96/87/3461469c3b0f610dc247422ec23872852e250da44c5ba677703ce52ff761/sixfeetup.bowab-0.11.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d7e65c6b102dbdf3d2a1dcd90e16799b", "sha256": "e871d17da52d0ead4f47ded3b96791f43fb46b601a447bf7b78d6c4ff51fda6d" }, "downloads": -1, "filename": "sixfeetup.bowab-0.11.zip", "has_sig": false, "md5_digest": "d7e65c6b102dbdf3d2a1dcd90e16799b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49332, "upload_time": "2018-06-14T17:13:40", "url": "https://files.pythonhosted.org/packages/96/87/3461469c3b0f610dc247422ec23872852e250da44c5ba677703ce52ff761/sixfeetup.bowab-0.11.zip" } ] }