{ "info": { "author": "Ryan P Kilby", "author_email": "rpkilby@ncsu.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "django-template-forms\n=====================\n\n|Build Status| |Codecov| |Version| |License|\n\nTemplate based form rendering for Django\n\n--------------\n\nOverview\n--------\n\nDjango 1.11 recently introduced template-based widget rendering to allow\neasier customization of widgets by users. ``django-template-forms`` is\nthe logical extension of this feature, implementing template-based\nrendering for fields and forms.\n\nAt this point, simple block forms are supported for Bootstrap 3 & 4.\nHorizontal forms and check/radio field layouts are inbound.\n\nRequirements\n------------\n\n- **Python**: 3.4, 3.5, 3.6\n- **Django**: 1.11, 2.0b\n\nInstall with pip:\n\n.. code:: sh\n\n $ pip install django-template-forms\n\nConfiguration\n-------------\n\nOnce installed, add ``'template_forms'`` to your ``INSTALLED_APPS``.\n\n.. code:: python\n\n INSTALLED_APPS = [\n ...\n 'template_forms',\n ]\n\nUsage\n-----\n\nAll ``template_forms`` form classes inherit from\n``django.forms.BaseForm`` and are intended to be mixed with a concrete\n``forms.Form`` or ``froms.ModelForm``. Example usage:\n\n.. code:: python\n\n from django import forms\n from template_forms import bs3\n\n from .models import Article\n\n\n class ArticleForm(bs3.BlockForm, forms.ModelForm):\n class Meta:\n model = Article\n fields = ['title', 'author', 'published_date', ...]\n\nIn the *view* template:\n\n.. code:: html\n\n
\n {% csrf_token %}\n {{ form }}\n \n
\n\n**TODO:** Document creation of custom ``TemplateForm`` subclass.\n\nOverriding Templates\n--------------------\n\n``django-template-forms`` provides a default set of templates. To\noverride these, you first need to consider the\n```FORM_RENDERER`` `__\nsetting, then override the relevant template files. By default,\n``FORM_RENDERER`` uses the\n```DjangoTemplates`` `__\nrenderer, which loads templates from your installed apps.\n\nIf you want more control over template loading, you can use the\n```TemplatesSetting`` `__\nrenderer, which loads templates from using your configured ``TEMPLATES``\nsetting. If you use this renderer, you may need to add\n``'django.forms'`` to your ``INSTALLED_APPS``. See the `renderer\ndocs `__\nfor more information.\n\n.. code:: python\n\n INSTALLED_APPS = [\n ...\n 'django.forms',\n 'template_forms',\n ]\n\n FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'\n\n TEMPLATES = [\n {\n 'BACKEND': 'django.template.backends.django.DjangoTemplates',\n 'DIRS': [...],\n 'APP_DIRS': True,\n ...\n },\n ]\n\nTemplates are provided for each supported CSS framework.\n\n**Note:** - horizontal layouts do not exist yet for BS 4. - check &\nradio field templates do not exist yet.\n\n**BS3:**\n\n- ``template_forms/bs3/forms/block.html``\n- ``template_forms/bs3/forms/horizontal.html``\n- ``template_forms/bs3/fields/block.html``\n- ``template_forms/bs3/fields/block_checkbox.html``\n- [STRIKEOUT:``template_forms/bs3/fields/block_check_inline.html``]\n- [STRIKEOUT:``template_forms/bs3/fields/block_check_stacked.html``]\n- [STRIKEOUT:``template_forms/bs3/fields/block_radio_inline.html``]\n- [STRIKEOUT:``template_forms/bs3/fields/block_radio_stacked.html``]\n- ``template_forms/bs3/fields/horizontal.html``\n- ``template_forms/bs3/fields/horizontal_checkbox.html``\n- [STRIKEOUT:``template_forms/bs3/fields/horizontal_check_inline.html``]\n- [STRIKEOUT:``template_forms/bs3/fields/horizontal_check_stacked.html``]\n- [STRIKEOUT:``template_forms/bs3/fields/horizontal_radio_inline.html``]\n- [STRIKEOUT:``template_forms/bs3/fields/horizontal_radio_stacked.html``]\n\n**BS4:**\n\n- ``template_forms/bs4/forms/block.html``\n- [STRIKEOUT:``template_forms/bs4/forms/horizontal.html``]\n- ``template_forms/bs4/fields/block.html``\n- [STRIKEOUT:``template_forms/bs4/fields/block_checkbox.html``]\n- [STRIKEOUT:``template_forms/bs4/fields/block_check_inline.html``]\n- [STRIKEOUT:``template_forms/bs4/fields/block_check_stacked.html``]\n- [STRIKEOUT:``template_forms/bs4/fields/horizontal.html``]\n- [STRIKEOUT:``template_forms/bs4/fields/horizontal_checkbox.html``]\n- [STRIKEOUT:``template_forms/bs4/fields/horizontal_check_inline.html``]\n- [STRIKEOUT:``template_forms/bs4/fields/horizontal_check_stacked.html``]\n\nRunning the tests\n-----------------\n\nThe test suite requires ``tox`` and ``tox-venv``. The full list of\nbuilds is viewable with ``tox -l``.\n\n.. code:: sh\n\n $ pip install tox tox-venv\n $ tox -e py36-django111\n $ tox -e lint,isort\n\nRelease Process\n---------------\n\n- Update package version in setup.py\n- Create git tag for version\n- Upload release to PyPI\n ``sh $ pip install -U setuptools wheel pypandoc $ rm -rf dist/ build/ $ python setup.py bdist_wheel upload``\n\nCopyright & License\n-------------------\n\nCopyright \u00a9 2017 Ryan P Kilby. See LICENSE for details.\n\n.. |Build Status| image:: https://travis-ci.org/rpkilby/django-template-forms.svg?branch=master\n :target: https://travis-ci.org/rpkilby/django-template-forms\n.. |Codecov| image:: https://codecov.io/gh/rpkilby/django-template-forms/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/rpkilby/django-template-forms\n.. |Version| image:: https://img.shields.io/pypi/v/django-template-forms.svg\n :target: https://pypi.python.org/pypi/django-template-forms\n.. |License| image:: https://img.shields.io/pypi/l/django-template-forms.svg\n :target: https://pypi.python.org/pypi/django-template-forms\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rpkilby/django-template-forms/", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-template-forms", "package_url": "https://pypi.org/project/django-template-forms/", "platform": "", "project_url": "https://pypi.org/project/django-template-forms/", "project_urls": { "Homepage": "https://github.com/rpkilby/django-template-forms/" }, "release_url": "https://pypi.org/project/django-template-forms/0.3.1/", "requires_dist": null, "requires_python": "", "summary": "Template based form rendering for Django", "version": "0.3.1" }, "last_serial": 3555078, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ead209f3a6f700e5cfd8014642411634", "sha256": "9810f69e871f4d04a12d35d02e8ad676df0df9b96f43cc7022e0aa4632def138" }, "downloads": -1, "filename": "django_template_forms-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ead209f3a6f700e5cfd8014642411634", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 6217, "upload_time": "2017-11-20T09:22:38", "url": "https://files.pythonhosted.org/packages/17/2f/e64802ff71ac8cfb6501a368ac5c9c6cb06fa20cd952a7596a84dd7cac6a/django_template_forms-0.1.0-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2956137ee60e5c4733d624536951a4c8", "sha256": "c33df086177103672a66ca1044a5d4f58fd87c1bc7c4da9ae843f01e8fe67dc2" }, "downloads": -1, "filename": "django_template_forms-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2956137ee60e5c4733d624536951a4c8", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 9667, "upload_time": "2017-11-27T10:15:46", "url": "https://files.pythonhosted.org/packages/12/5c/10979e8f51f7cf6e28da22c21307d84744f0885d7587bdc9e5465d1b7680/django_template_forms-0.2.0-py2.py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "58e758495bb42a9a119b9a1f43483713", "sha256": "135b2808f16c3c523c5718816714ba9449655d42f17730136dd1be7fb8bc2139" }, "downloads": -1, "filename": "django_template_forms-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "58e758495bb42a9a119b9a1f43483713", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 11207, "upload_time": "2017-11-29T11:05:03", "url": "https://files.pythonhosted.org/packages/8d/2d/07cad0a159c3fa8321777843445db87bda620f06ca6e2e1e2a26a572920f/django_template_forms-0.2.1-py2.py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "7874600e37b85c6419394a168dc5de19", "sha256": "6f48d9ec338b695fced25912a26e64642fb5d89519fab9e80641d65ecfe3aba4" }, "downloads": -1, "filename": "django_template_forms-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7874600e37b85c6419394a168dc5de19", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 13193, "upload_time": "2017-11-29T13:08:10", "url": "https://files.pythonhosted.org/packages/7e/4a/5d190f1e3c3f116aaa87446302e3e7d57d63fdba3846138294a3e4aefa71/django_template_forms-0.3.0-py3-none-any.whl" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "99c65d42d71580d2ffc5336e5e7f6253", "sha256": "f21f9ecebabf2bc65f4af38b79e92d09bcaca2402a80421c2f1c6712e46ba4ab" }, "downloads": -1, "filename": "django_template_forms-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "99c65d42d71580d2ffc5336e5e7f6253", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 13258, "upload_time": "2018-02-05T23:40:12", "url": "https://files.pythonhosted.org/packages/f3/c7/e6be080eb289097a9004321889c98092b6fbca980e5ae4dc4ff837a5ba5b/django_template_forms-0.3.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99c65d42d71580d2ffc5336e5e7f6253", "sha256": "f21f9ecebabf2bc65f4af38b79e92d09bcaca2402a80421c2f1c6712e46ba4ab" }, "downloads": -1, "filename": "django_template_forms-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "99c65d42d71580d2ffc5336e5e7f6253", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 13258, "upload_time": "2018-02-05T23:40:12", "url": "https://files.pythonhosted.org/packages/f3/c7/e6be080eb289097a9004321889c98092b6fbca980e5ae4dc4ff837a5ba5b/django_template_forms-0.3.1-py3-none-any.whl" } ] }