==================
django-simple-form
==================
Django-simple-form is a simple way to build your forms in HTML-level.
Installation
~~~~~~~~~~~~
You can get Django simple form by using pip::
$ pip install django-simple-form
To enable the package you need to add it to `INSTALLED_APPS`::
INSTALLED_APPS = [
...
'simple_form',
...
]
Usage
~~~~~
Render all fields form::
{% load simple_form %}
...
{{ form|render_form }}
Render field by field::
{% load simple_form %}
...
{{ form.name|render_field }}
{{ form.email|render_field }}
Custom the template
~~~~~~~~~~~~~~~~~~~
Create a folder with name `simple_form` in your template dir::
templates/
...
simple_form/
field.html
...
In HTML file you define the structure for each field the form::
<div>
<label for="{{ field.auto_id }}">
{{ field.label }}
</label>
{{ field }}
{% if field.errors %}
{% for error in field.errors %}
<span>{{ error }}</span>
{% endfor %}
{% endif %}
</div>
{% if field.help_text %}
<p title="{{ field.help_text }}">
{{ field.help_text }}
</p>
{% endif %}
If you need to customize the rendering for the type field, create an HTML file to the specific type of his widget::
templates/
...
simple_form/
field.html
checkboxinput.html
...
Raw data
{
"_id": null,
"home_page": "https://github.com/daniellbastos/django-simple-form/",
"name": "django-simple-form",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "django,widget,form,field",
"author": "Daniel Bastos",
"author_email": "danielfloresbastos@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f1/cd/76ee113f2f0b35aebd7362918f8579dce457cce643d980c762cb6ad9a2bf/django-simple-form-0.0.2.tar.gz",
"platform": null,
"description": "==================\ndjango-simple-form\n==================\n\nDjango-simple-form is a simple way to build your forms in HTML-level.\n\n\nInstallation\n~~~~~~~~~~~~\n\nYou can get Django simple form by using pip::\n\n $ pip install django-simple-form\n\n\nTo enable the package you need to add it to `INSTALLED_APPS`::\n\n INSTALLED_APPS = [\n ...\n 'simple_form',\n ...\n ]\n\n\nUsage\n~~~~~\n\nRender all fields form::\n\n {% load simple_form %}\n\n ...\n\n {{ form|render_form }}\n\n\nRender field by field::\n\n {% load simple_form %}\n\n ...\n\n {{ form.name|render_field }}\n {{ form.email|render_field }}\n\n\n\nCustom the template\n~~~~~~~~~~~~~~~~~~~\n\n\nCreate a folder with name `simple_form` in your template dir::\n\n templates/\n ...\n simple_form/\n field.html\n ...\n\nIn HTML file you define the structure for each field the form::\n\n\n <div>\n <label for=\"{{ field.auto_id }}\">\n {{ field.label }}\n </label>\n\n {{ field }}\n\n {% if field.errors %}\n {% for error in field.errors %}\n <span>{{ error }}</span>\n {% endfor %}\n {% endif %}\n </div>\n\n {% if field.help_text %}\n <p title=\"{{ field.help_text }}\">\n {{ field.help_text }}\n </p>\n {% endif %}\n\n\nIf you need to customize the rendering for the type field, create an HTML file to the specific type of his widget::\n\n templates/\n ...\n simple_form/\n field.html\n checkboxinput.html\n ...\n",
"bugtrack_url": null,
"license": "",
"summary": "Django-simple-form is a simple way to build your forms in HTML-level",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/daniellbastos/django-simple-form/"
},
"split_keywords": [
"django",
"widget",
"form",
"field"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d822a288448f7e6f0483d427c190fa3f5d925500b450ae4888abb1908cb37044",
"md5": "790d0729296b5aacab43174ed3a826a5",
"sha256": "ae38f1d32f6a5c8751d95679b607c18ffc0db0f229b491d025e5928c4ea15112"
},
"downloads": -1,
"filename": "django_simple_form-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "790d0729296b5aacab43174ed3a826a5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4163,
"upload_time": "2024-03-14T23:01:49",
"upload_time_iso_8601": "2024-03-14T23:01:49.447790Z",
"url": "https://files.pythonhosted.org/packages/d8/22/a288448f7e6f0483d427c190fa3f5d925500b450ae4888abb1908cb37044/django_simple_form-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f1cd76ee113f2f0b35aebd7362918f8579dce457cce643d980c762cb6ad9a2bf",
"md5": "da6748143e113f5c18b643750e3f6f64",
"sha256": "03a7be73e01201d8d7fd693944f4e48363fdff0a85c38da42f6727c292b9c664"
},
"downloads": -1,
"filename": "django-simple-form-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "da6748143e113f5c18b643750e3f6f64",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3857,
"upload_time": "2024-03-14T23:01:51",
"upload_time_iso_8601": "2024-03-14T23:01:51.075318Z",
"url": "https://files.pythonhosted.org/packages/f1/cd/76ee113f2f0b35aebd7362918f8579dce457cce643d980c762cb6ad9a2bf/django-simple-form-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-14 23:01:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "daniellbastos",
"github_project": "django-simple-form",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "django-simple-form"
}