{ "info": { "author": "Derek Stegelman", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Utilities" ], "description": "Django Infuse\n=============\n\nSeries of Class based mixins. Requires Django 1.4s use of PermissionDenied exception. \n\nInstallation\n------------\n\n pip install django-infuse\n \nCurrently Supported Mixins\n--------------------------\n\n* Permission Required\n* Staff Required\n* Super User required\n* Login Required\n* Group Required\n\nUsage\n-----\n\n### Login Required Mixin\n\nInherit the mixin you want to use and add any additional (optional) params.\n\n\tfrom infuse.auth.permissions import LoginRequiredMixin\n\n\tclass MyLoginProtectedView(LoginRequiredMixin, ListView):\n\t\t# If login_url is not the url you want to redirect\n\t\t# users to, set one here.\n\n\t\tlogin_url = \"/my/new/url/\"\n\n\t\t# Do the rest of your stuff.....\n\n### Group Required Mixin\n\nThe only other different one is GroupRequiredMixin\n\n\tfrom infuse.auth.permissions import GroupRequiredMixin\n\n\tclass MyGroupRequiredView(GroupRequiredMixin, ListView):\n\t\t# Uses login_required, so you can optionally pass in\n\t\t# a url just like LoginRequired.\n\n\t\t# You MUST set a group, Infuse will throw an exception\n\t\t# if you do not.\n\n\t\tgroup = \"My Awesome Group\"\n\n\n### Permission Required Mixin\n\nOriginal work by Kenneth Love and Chris Jones. Modified to always raise PermissionDenied\n\n\tfrom infuse.auth.permissions import PermissionRequiredMixin\n\n\tclass PermissionRequiredView(PermissionRequiredMixin, ListView):\n\t\t# Permission to require\n\t\tpermssion_required = 'model.can_do_something'\n\t\t\n\n### Save and Continue Form Wizard\n\nThis mixin is still very much in a alpha status. The django form wizard does not support the concept of 'Finish Later' or any\nbuilt in ability to save the form 'half done'. This mixin provides a way for developers to add a 'Finish Later' functionality \nto their form wizard.\n\nIn order to use the 'Finish Later' functionality you must add a button/input element on your form wizard templates and name it 'save_only'\n\n \n \nNext inherit the SaveAndContinue Mixin\n\n from infuse.wizard.mixins import SaveAndContinueWizard\n \n class MyFinishLaterWizard(SaveAndContinueWizard):\n \n # This url is where the user will be redirected to when \n # they click the 'Finish Later' button\n save_only_url = reverse_lazy('wheretogowhenuserssaves')\n \nIn addition to the ``save_only_url`` that you are required to set, you may also provide the following methods:\n\n def post_save_only(self):\n pass\n \n def process_wizard_goto_step(self, wizard_goto_step):\n if wizard_goto_step and wizard_goto_step in self.get_form_list():\n self.storage.current_step = wizard_goto_step\n form = self.get_form(\n data=self.storage.get_step_data(self.steps.current),\n files=self.storage.get_step_files(self.steps.current))\n return self.render(form)\n \n def pre_process(self, form):\n pass\n\n def additional_file_processing(self):\n pass\n\n \n* ``post_save_only`` - Called when save_only is executed. Provides a way to hook into the save_only processor\n* ``pre_process`` - Do any pre processing before forms are attempted to save. Can be used to setup formsets.\n* ``additional_file_processing`` - Do any additional file processing. I use this to make sure that files saved to AWS are saved \nwith the correct file name.\n* ``process_wizard_goto_step`` - Allows you to override the default behaviour of going between steps.\n\nThis particular mixin is extreamly powerful, but is in a constantly changing state. If you are using it, please provide some feedback of how and what your using it for, as well as any improvements you have.", "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/dstegelman/django-infuse", "keywords": "", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-infuse", "package_url": "https://pypi.org/project/django-infuse/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-infuse/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/dstegelman/django-infuse" }, "release_url": "https://pypi.org/project/django-infuse/0.3/", "requires_dist": null, "requires_python": null, "summary": "A series of class based view mixins.", "version": "0.3" }, "last_serial": 789867, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "c341753e382e7e2921e104a2c6a3aacc", "sha256": "f9db1a8d62d62794b40ab4626c0a2e19ae93d2e558e4ac5938fc9d2cfcf2eb57" }, "downloads": -1, "filename": "django-infuse-0.1.tar.gz", "has_sig": false, "md5_digest": "c341753e382e7e2921e104a2c6a3aacc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2467, "upload_time": "2012-11-19T15:08:32", "url": "https://files.pythonhosted.org/packages/17/69/a45b4321dccea0a3a2d7443d3c65ba6c1ebd2477b8f6ddfa9f4e59e1884c/django-infuse-0.1.tar.gz" } ], "0.1-alpha": [], "0.2": [ { "comment_text": "", "digests": { "md5": "08400123aab661297810d9c79836187b", "sha256": "1de57505f2a4b58e3743a02e21b0cb16462887b300fe257d08571cf0ab906d7c" }, "downloads": -1, "filename": "django-infuse-0.2.tar.gz", "has_sig": false, "md5_digest": "08400123aab661297810d9c79836187b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3108, "upload_time": "2012-11-19T15:16:30", "url": "https://files.pythonhosted.org/packages/c7/57/b603ead4ce943d1212e9ed9d6c86a1c9cb86793bae815fcc716c429c731a/django-infuse-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "4cfaa24f026c63fe4f05b72b54006825", "sha256": "db2d0def1d40ff34ceb37bf0818973aa877913b94bc44ad4be82b8f82d1c10cc" }, "downloads": -1, "filename": "django-infuse-0.2.1.tar.gz", "has_sig": false, "md5_digest": "4cfaa24f026c63fe4f05b72b54006825", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3687, "upload_time": "2013-01-02T17:34:22", "url": "https://files.pythonhosted.org/packages/bc/47/81f3a852ff485308a903db202c7d81407a879c60e65430922bd54a5561b2/django-infuse-0.2.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "9e7ae8f49902d7f776f96f05814221d5", "sha256": "8ce7c574b66e3c0c874061ee3d948b6c3bd9b409814fe28932f930a60c49e614" }, "downloads": -1, "filename": "django-infuse-0.3.tar.gz", "has_sig": false, "md5_digest": "9e7ae8f49902d7f776f96f05814221d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5569, "upload_time": "2013-01-12T14:45:50", "url": "https://files.pythonhosted.org/packages/ac/71/1019652336e4ea479f4342476922927d2980d3194a07214c0aa5e6010ce8/django-infuse-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9e7ae8f49902d7f776f96f05814221d5", "sha256": "8ce7c574b66e3c0c874061ee3d948b6c3bd9b409814fe28932f930a60c49e614" }, "downloads": -1, "filename": "django-infuse-0.3.tar.gz", "has_sig": false, "md5_digest": "9e7ae8f49902d7f776f96f05814221d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5569, "upload_time": "2013-01-12T14:45:50", "url": "https://files.pythonhosted.org/packages/ac/71/1019652336e4ea479f4342476922927d2980d3194a07214c0aa5e6010ce8/django-infuse-0.3.tar.gz" } ] }