{ "info": { "author": "Daan Vielen", "author_email": "daan@digitaldaan.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "=============================\r\ndjango-dynamic-views\r\n=============================\r\n\r\n.. image:: https://badge.fury.io/py/django-dynamic-views.png\r\n :target: https://badge.fury.io/py/django-dynamic-views\r\n\r\n.. image:: https://travis-ci.org/ddaan/django-dynamic-views.png?branch=master\r\n :target: https://travis-ci.org/ddaan/django-dynamic-views\r\n\r\nProvides out of the box CRUD functionality including templates and gives you the ability to build your screen top-down.\r\n\r\nDocumentation\r\n-------------\r\n\r\nThe full documentation is at https://django-dynamic-views.readthedocs.org.\r\n\r\nQuickstart\r\n----------\r\n\r\nInstall django-dynamic-views::\r\n\r\n pip install django-dynamic-views\r\n\r\nThen use it in a project::\r\n\r\n from django_dynamic_views.views import DynamicListView, DynamicCRUDView, DynamicUpdateView, DynamicCreateView\r\n\r\n\r\n\r\nAdd django-dynamic-views to installed apps::\r\n\r\n INSTALLED_APPS = (\r\n ...\r\n 'django_dynamic_views',\r\n ...\r\n )\r\n\r\n\r\n\r\nExample\r\n=====================\r\n\r\nConsider this simple model:\r\n\r\nmodels.py\r\n\r\n::\r\n\r\n class Article(models.Model):\r\n name = models.Charfield(max_length=200)\r\n description = models.Charfield(max_length=200)\r\n\r\nDefine a Crud view by extending DynamicCRUDView and set the model as a attribute\r\n\r\nviews.py\r\n::\r\n\r\n class ArticleCRUDView(DynamicCRUDView):\r\n model = Article\r\n\r\nNow add the urls to your urlpatterns with one command\r\n\r\nurls.py\r\n::\r\n\r\n urlpatterns += ArticleCRUDView.urls()\r\n\r\nYou'll point your browser to /article/list/ and a basic list with Create / Read / Update and Delete\r\nbuttons will be displayed.\r\n\r\nSo on the background it will create the following urls::\r\n\r\n /article/list/\r\n /article/create/\r\n /article/(?P[-\\w]+)/update/\r\n /article/(?P[-\\w]+)/read/\r\n /article/(?P[-\\w]+)/delete/\r\n\r\nIf you don't care for some of the urls you can modfiy the _links_ atribute on the CrudView::\r\n\r\n class ArticleCRUDView(dynamicviews.DynamicCRUDView):\r\n model = Article\r\n links = ['list', 'read']\r\n\r\nThis will result in the following urls::\r\n\r\n /article/list/\r\n /article/(?P[-\\w]+)/read/\r\n\r\nSo this will give you a basic list with a Read button next to it.\r\n\r\n## Override the default classes\r\nYou can define which class the CRUD uses, so you can easily modify it's appearance and behaviour\r\n\r\n::\r\n\r\n class ArticleDetailView(DetailView):\r\n template_name = 'articles/article_detail.html'\r\n\r\n\r\n class ArticleCRUDView(dynamicviews.DynamicCRUDView):\r\n model = Article\r\n links = ['list', 'read']\r\n read_class = ArticleDetail\r\n\r\n\r\n\r\nRunning Tests\r\n--------------\r\n\r\nDoes the code actually work?\r\n\r\n::\r\n\r\n source /bin/activate\r\n (myenv) $ pip install -r requirements-test.txt\r\n (myenv) $ python runtests.py\r\n\r\nCredits\r\n---------\r\n\r\nTools used in rendering this package:\r\n\r\n* Cookiecutter_\r\n* cookiecutter-pypackage_\r\n\r\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\r\n.. _cookiecutter-djangopackage: https://github.com/pydanny/cookiecutter-djangopackage\r\n\n\n\n\nHistory\n-------\n\n0.1.0 (2016-04-09)\n++++++++++++++++++\n\n* First release on PyPI.", "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/ddaan/django-dynamic-views", "keywords": "django-dynamic-views", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-dynamic-views", "package_url": "https://pypi.org/project/django-dynamic-views/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-dynamic-views/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ddaan/django-dynamic-views" }, "release_url": "https://pypi.org/project/django-dynamic-views/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Provides out of the box CRUD functionality including templates and gives you the ability to build your screen top-down.", "version": "0.1.1" }, "last_serial": 2222815, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "00f129a7814ff07faf48ac845c49ea4c", "sha256": "6cf998a29bd0bac789c2e419676712875915b9a44d930e6a65d2cd1224a62fc4" }, "downloads": -1, "filename": "django_dynamic_views-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "00f129a7814ff07faf48ac845c49ea4c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 17060, "upload_time": "2016-04-10T15:04:10", "url": "https://files.pythonhosted.org/packages/77/5f/4f404776af176187fcc902aea50e7ea6e03f6758bb3a38369aad8d37700b/django_dynamic_views-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "459f3ff89332a629974332f669b0e37e", "sha256": "86f39a6149b0b9353eaf6580767c29d376e496f495832026e2b1827ccc8e4582" }, "downloads": -1, "filename": "django_dynamic_views-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "459f3ff89332a629974332f669b0e37e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 17240, "upload_time": "2016-07-15T10:21:48", "url": "https://files.pythonhosted.org/packages/9d/10/9d31b54e42f07a61ac6108df62e53cc3f5712e700122b4cd14fed8d5a6d0/django_dynamic_views-0.1.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "459f3ff89332a629974332f669b0e37e", "sha256": "86f39a6149b0b9353eaf6580767c29d376e496f495832026e2b1827ccc8e4582" }, "downloads": -1, "filename": "django_dynamic_views-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "459f3ff89332a629974332f669b0e37e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 17240, "upload_time": "2016-07-15T10:21:48", "url": "https://files.pythonhosted.org/packages/9d/10/9d31b54e42f07a61ac6108df62e53cc3f5712e700122b4cd14fed8d5a6d0/django_dynamic_views-0.1.1-py2.py3-none-any.whl" } ] }