{ "info": { "author": "Shinya Okano", "author_email": "tokibito@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "==============\nDjango Edamame\n==============\n\nOne idea of Class-based view module.\n\n.. image:: https://travis-ci.org/tokibito/django-edamame.png\n :target: https://travis-ci.org/tokibito/django-edamame\n\nDjango Edamame gives you inheritable module to bundle the multiple view functions like django.contrib.admin application.\n\nEdamame corresponds to the following problems:\n\n* Reuse URL pattern.\n* Creating an application with a similar view function set.\n\nAuthor\n======\n\n* Shinya Okano\n\nSimple example\n==============\n\nInherits the ``Views`` class, and implement the method of view function. And implement ``get_urls`` method to return the URL pattern.\n\nIn order to use a views class, it create an instance in the module.\n\n::\n\n from edamame import base\n\n class SiteViews(base.Views):\n def index(self, request):\n \"\"\"view function\n \"\"\"\n return render(request, 'index.html')\n\n def get_urls(self):\n urlpatterns = patterns(\n '',\n url(r'^$', self.wrap_view(self.index), name='index'),\n )\n return urlpatterns\n\n site_views = SiteViews()\n\n``urls`` property of views instance, it can be passed to ``include`` function in ``urls.py``.\n\n::\n\n from django.conf.urls import patterns, include, url\n from note.views import site_views\n\n urlpatterns = patterns('',\n url(r'', include(site_views.urls)),\n )\n\nGeneric view example\n====================\n\nImport the ``ModelViews`` class, and inherits.\n\n::\n\n from django.core.urlresolvers import reverse_lazy\n from edamame import generic\n from . import models\n\n\n class NoteViews(generic.ModelViews):\n model = models.Note\n success_url = reverse_lazy('note:index')\n\n note_views = NoteViews()\n\nIn ``urls.py``, use the ``include`` function.\n\n::\n\n from django.conf.urls import patterns, include, url\n from note.views import note_views\n\n urlpatterns = patterns('',\n url(r'note/', include(note_views.urls)),\n )\n\nExample Project\n===============\n\n``example`` directory in the repository is an example project.\n\nIf you have installed Django and Edamame, can run immediately.\n\n::\n\n $ cd example\n $ python manage.py syncdb\n $ python manage.py runserver\n\nLicense\n=======\n\n* MIT License", "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/tokibito/django-edamame", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-edamame", "package_url": "https://pypi.org/project/django-edamame/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-edamame/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tokibito/django-edamame" }, "release_url": "https://pypi.org/project/django-edamame/0.1/", "requires_dist": null, "requires_python": null, "summary": "One idea of Class-based view module.", "version": "0.1" }, "last_serial": 944874, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d24a9be47b8035df3e9d747b319279cb", "sha256": "cc942ab126c0cc0dc1908ff345e2c39cfa07a55ac2bbfb1849de91274a182ae8" }, "downloads": -1, "filename": "django_edamame-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d24a9be47b8035df3e9d747b319279cb", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6205, "upload_time": "2013-12-15T09:16:22", "url": "https://files.pythonhosted.org/packages/cd/79/43fd0562b7004bc569a09cc7a5ab5b67ca84074fa970d2d05674c8e8acf8/django_edamame-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1e59ea023565e0ceb79d947a0e1b892", "sha256": "7943449a6deea67761da54641448e90c9d2e3ebc80bf857c861b47bc944172e5" }, "downloads": -1, "filename": "django-edamame-0.1.tar.gz", "has_sig": false, "md5_digest": "c1e59ea023565e0ceb79d947a0e1b892", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3644, "upload_time": "2013-12-15T09:09:29", "url": "https://files.pythonhosted.org/packages/a3/bc/7e58e16c6b1b1130b524b2beee97a96318573684634f7221d0e005477e94/django-edamame-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d24a9be47b8035df3e9d747b319279cb", "sha256": "cc942ab126c0cc0dc1908ff345e2c39cfa07a55ac2bbfb1849de91274a182ae8" }, "downloads": -1, "filename": "django_edamame-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d24a9be47b8035df3e9d747b319279cb", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6205, "upload_time": "2013-12-15T09:16:22", "url": "https://files.pythonhosted.org/packages/cd/79/43fd0562b7004bc569a09cc7a5ab5b67ca84074fa970d2d05674c8e8acf8/django_edamame-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1e59ea023565e0ceb79d947a0e1b892", "sha256": "7943449a6deea67761da54641448e90c9d2e3ebc80bf857c861b47bc944172e5" }, "downloads": -1, "filename": "django-edamame-0.1.tar.gz", "has_sig": false, "md5_digest": "c1e59ea023565e0ceb79d947a0e1b892", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3644, "upload_time": "2013-12-15T09:09:29", "url": "https://files.pythonhosted.org/packages/a3/bc/7e58e16c6b1b1130b524b2beee97a96318573684634f7221d0e005477e94/django-edamame-0.1.tar.gz" } ] }