Saravanan666/pypi-org huggingface dataset:
Package: django-form-copy
django-form-copyLibrary for quickly copying django objects from one to another project.How to use:Add library inINSTALLED_APPS.INSTALLED_APPS = [
    ...
    "django_form_copy",
]After added the application - just add a mixinCopyPasteMixinwhere you register your application
for the admin panel.# admin.py
from django_form_copy import CopyPasteMixin

@admin.register(YourModel)
class YourModelAdmin(CopyPasteMixin, admin.ModelAdmin):
    ...
    # your other attributesAfter you want to copy an object, go to edit the model object and click theCopybutton.Once the data is saved to the clipboard, you can go to any similar project and recreate this object.
For example, you use "stage" on another server or "localhost" on your personal computer.
Click on the "+" to add object in admin panel, click on thePastebutton to recreate this object with
all relations (including ForeignKey and ManyToMany - these will be created if not found on your other server).
Package: django-formed-cmsplugin
A DjangoCMS plugin which allows you to add a form created with django-formed to your page.Installationpip install django-formed django-formed-cmspluginThen add‘formed’and‘cmsplugin_formed_form’to yourINSTALLED_APPSsetting.ConfigurationTo make the form plugin available in a placeholder add it to the‘plugins’item of the placeholder
in theCMS_PLACEHOLDER_CONFsetting.For example:CMS_PLACEHOLDER_CONF = {
    'content': {
        'plugins': [
            'FormPlugin'
        ]
    }
}
Package: django-form-error-reporting
DEPRECATED: We have decided to not update this package to support GA4 and this is
no longer maintained.A form mixin that reports form errors as events to Google Analytics.NB: Only Universal Analytics is supported, which is now deprecated!UsageInstall usingpip installdjango-form-error-reporting.See examples in tests/forms.pyclassReportedForm(GAErrorReportingMixin,Form):ga_tracking_id='UA-12345678-0'...DevelopmentPlease report bugs and open pull requests onGitHub.To work on changes to this library, it’s recommended to install it in editable mode into a virtual environment,
i.e.pip install--editable.Usepython-mteststo run all tests locally.
Alternatively, you can usetoxif you have multiple python versions.[Only for GitHub team members] Distribute a new version toPyPIby:updating theVERSIONtuple inform_error_reporting.pyadding a note to theHistorypublishing a release on GitHub which triggers an upload to PyPI;
alternatively, runpython-mbuild; twine upload dist/*locallyHistory0.12Migrated test, build and release processes away from deprecated setuptools commands.
No significant library changes.0.11Warn that only Universal Analytics is supported at present.
Drop support for python 3.6 and 3.7.
Add support for python 3.11.
Add experimental support for Django versions 4.0 & 4.1.
Improve testing and linting.0.10Add support for python 3.9 and 3.10.
Improve testing and linting.0.9Drop support for python 3.5.
Improve linting.0.8Drop python 2 support (now compatible with 3.5 - 3.8).
Support Django 2.2 - 3.2 (both LTS).0.7Improve testing.0.6Fix versioning problem (module cannot be loaded until dependencies are installed).0.5Report user language preference.
Better IP address tracking for proxied requests.
Add error logging for failed requests.
Fix large payload bug.0.4Ignore all errors when reporting to Google Analytics.0.3Add python 2 compatibility.0.2Add convenience form mixin to get Google Analytics ids from request and settings.0.1Original release.CopyrightCopyright (C) 2023 HM Government (Ministry of Justice Digital & Technology).
See LICENSE.txt for further details.
Package: django-form-extensions
Django form extensions implements serveral usefull Field and Widget classes for Django forms.InstallationRunpip install django-form-extensionsFields###HoneypotField
Presents an alluring target for robo-spammers. Raises a form error if tampered with.###HTMLField
Whitelist HTML tags, attributes, and styles and return the resulting HTML with illegal items stripped out.###USCurrencyField
Take in all common forms of representing US currency and return a decimal value.###CreditCardField
Only accepts mathmatically correct credit card numbers.###MultiFileField
Allows a single field to take multiple file uploads.Widgets###DataList
Generates the HTML5 datalist element which is used for autocomplete.###MultiFileInput
Renders<input type=”file” multiple=”multiple” />and it’s Python value is a list of files.###FileMultiInput
Takes several instances of<input type=”file” />combines them for it’s Python value which is a list of files.###ImageInput
Renders a thumbnail of the image before theFileInputwidget.
Package: django-formfield
Version:0.4Docs:https://django-formfield.readthedocs.org/en/latest/Download:http://pypi.python.org/pypi/django-formfield/Source:https://github.com/jsoa/django-formfieldChange Log0.4*Django 1.9/1.10/1.11 compatibilityCleaner error messagesForm within a form fixes0.3Django 1.6/1.7/1.8 compatibilityPython 3.4 compatibilityForm argument can now be dynamic0.2Fix Django 1.5 install issue0.1.3Fixed bug when a form’s initial value evaludated toFalsepep8 related fixesGetting Starteddjango-formfield is a form field that accepts a django form as its first argument, and validates
as well as render’s each form field as expected. Yes a form within a form,within a dream? There
are two types of fields available,FormFieldandModelFormField. ForModelFormFieldthe data is stored in json. ForFormFielddata is simply
returned as a python dictionary (form.cleaned_data)InstallationInstallation is easy usingpiporeasy_install.pip install django-formfieldoreasy_install django-formfieldAdd to installed appsINSTALLED_APPS = (
    ...
    'formfield',
    ...
)Examplefrom django.db import models
from django import forms

from formfield import ModelFormField

class PersonMetaForm(forms.Form):
    age = forms.IntegerField()
    sex = forms.ChoiceField(choices=((1, 'male'), (2, 'female')), required=False)


class Person(models.Model):
    name = CharField(max_length=200)

    meta_info = ModelFormField(form=PersonMetaForm)Which will result in something like this (using the admin)TheModelFormFieldis automatically set tonull=True,blank=True, this is
because validation is done on the inner form. As a result you will see something like the
following if we hit save on the change form:If we supply the change for valid data you should get a python dictionary when retrieving
the data:>>> person = Person.objects.get(pk=1)
>>> person.meta_info
{u'age': 12, u'sex': u'1'}The form is the only thing forcing valid input, behind the scenes the
data is being serialized into json. Therefore on the python level we can supply meta_info
any valid json::>>> from sample_app.models import Person
>>> data = {'some': 'thing', 'is': 'wrong', 'here': 'help!'}
>>> p = Person.objects.create(name="Joan", meta_info=data)
>>> p.meta_info
{'is': 'wrong', 'some': 'thing', 'here': 'help!'}NoteIf the form field is being made available via a change form, such as the admin, any
unexpected value will be overridden by what the form returns . For example, thePersonMetaFormabove only expectsageandsex, so none of the values above
(‘is’, ‘some’ and ‘here’) match and will be overridden when the form submitted.We can however, make the field hidden or readonly and use it to supply any
valid json, but its not really the intension of this app.
Package: django-formfieldset
Attention!This package is no longer maintained.django-formfieldsetis a simple Django app that provides a mix-in class for admin-like fieldset rendering.FeaturesFieldset functionality similar toModelAdminShorthand rendering functions with fieldsets both for whole forms and for individual fieldsetsrender asPrender asTABLErender asULTemplate strings are class attributesOverrides nothing indjango.forms.FormInstallationAdd"django-formfieldset"directory to your Python path.Add"formfieldset"to yourINSTALLED_APPStuple found in
your settings file. (optional - to be able to run tests)Testing & ExampleThere is an example project in theexample/directory. To run
automated tests for django-formfieldset run the following command
inexample/directory:python example/manage.py test formfieldsetTo run the example project:python example/manage.py runserverThen you can visithttp://localhost:8000/to view the example.Example project also serves as detailed documentation for formfieldset.Code examples will be highlighted if you havepygmentsinstalled.UsageCreate your form withFieldsetMixin.Add afieldsetsattribute to your form. Seeadmin docsfor detailed explanation.Render your form with fieldset enabled methods:You can useiter_fieldsets()for custom form rendering. It
will yieldFieldsetobjects.Fieldsets act as iterators for
widgets in them.You can useas_fieldset_table(),as_fieldset_ul()andas_fieldset_p()methods that act like built-inas_*method
except fieldset support.Tutorials & How-to’sWhat’s New in django-formfieldset 1.1See Alsodjango-form-utils
Package: django-formhelper
Django FormHelper is a collection of templates and templatetags to ease the
pain in building out web forms. It does this by breaking the form down into
separate re-usable and customizable components. This allows you to only
customize the parts you want, and let the rest happen automatically.UsageAfter installing django-formhelper, addformhelperto yourINSTALLED_APPSin yoursettings.py.In your template, you need to loadformhelper:...
{% load formhelper %}
...Template Tagsform_fieldRender out a single form field. Uses the templateformhelper/includes/field.html.  Example usage:{% form_field contact_form first_name %}If your form is in your view’s context as the variable “form”, you can omit the first argument:{% form_field first_name %}Otherwise, you can use the “with” templatetag:{% with my_form as form %}
...
{% form_field first_name %}
...
{% endwith %}form_rowLike form_field, but renders out multiple fields.  Uses the templateformhelper/includes/form_row.html. Example usage:{% form_row first_name middle_name last_name %}error_listRender out the form error list as an unordered list.  Uses the templateformhelper/includes/error_list.htmlExample usage:{% error_list %}You may also render out only non-field errors or only field-specific errors:{% error_list non_field %}
... or ...
{% error_list field %}class_namesRenders a list of useful class names for a field that includes the field name, the widget type, whether or not the field is requried, and whether or not the field has an error.For example, if your field was a textinput named “first_name” and it was required:<div class="{% field|class_names %}">would result in:<div class="first_name text-input required">if the field has an error:<div class="first_name text-input required error">FormsetsFor easy formset support, complete with javascript (similar to django-admin), simply include the formset template:{% include "formhelper/includes/formset.html" %}This assumes that your formset is in a context variable called “formset”.  If not, you can use the “with” tag as described above.CustomizingYou may override any template within your own app’s template directory. Just make sure your app comes before the formhelper app in theINSTALLED_APPSsetting.The following is a list of templates available:formhelper/includes/form.htmlformhelper/includes/form_row.htmlformhelper/includes/field.htmlformhelper/includes/errorlist.htmlformhelper/includes/errorlist.html
Package: django-formidable
django-formidable is a full django application which allows you to create,
edit, delete and use forms.WarningsPython Compatibility : 3.6, 3.7, 3.8Django compatibility : Django 2.2.Django REST Framework : Compatible from the version 3.9.x to 3.11.xSee theDeprecation timelinedocument for more information on deprecated versions.LicenseMIT LicenseDocumentationLatest version of the documentation:http://django-formidable.readthedocs.io/en/latest/If you want to build the documentation locally, you can try to run one of the following:$makedocs$tox-edocsNoteA recent version oftoxmust be available on your system.You can also browse the documentation locally, using the following, for example:$makedocsserve-docsAbout the model graphOn the “intro” page of the documentation, you can see a graph of the different Django models defined in the application.To generate this graph, you’ll need to havegraphviz installedon your system.When you’re ready, you may initiate this generation using:$tox-edjango_graphQuick-StartInstall$pipinstalldjango-formidableConfigureDefine Rolesdjango-formidable allows access to a single form by different roles.
The same form can thus be rendered in different ways. If you don’t need
to handle multiple roles you must still define at least one default role.Define a method which returns a list of formidable.accesses.AccessObject:defget_roles(self):return[AccessObject(id='padawan',label='Padawan'),AccessObject(id='jedi',label='Jedi')]Fill the settings key:FORMIDABLE_ACCESS_RIGHTS_LOADER='yourproject.access_rights.get_roles'Get contextWhile accessing a form for a specific role, you need to provide a way in
which to get the correct context to use.requestandkwargsare fetched from the view (self.request,
self.kwargs)defget_context(request,kwargs):returnrequest.user.user_typeNext fill the setting keyFORMIDABLE_CONTEXT_LOADERFORMIDABLE_CONTEXT_LOADER='yourprojects.access_rights.get_context'Define URLsURLs are defined informidable.urls. You can load them with the
following line:url(r'^api/',include('formidable.urls',namespace='formidable'))By default, the views are not accessible, the permissions loaded are fully
restrictive. To allow any access to the view fill your settings withFORMIDABLE_DEFAULT_PERMISSION=['rest_framework.permissions.AllowAll']To handle special permissions, please refer to the online documentation.
Package: django-formit
# Formit[![Build Status](https://img.shields.io/travis/dinoperovic/django-formit.svg)](https://travis-ci.org/dinoperovic/django-formit)[![Codecov](https://img.shields.io/codecov/c/github/dinoperovic/django-formit.svg)](http://codecov.io/github/dinoperovic/django-formit)[![PyPI version](https://img.shields.io/pypi/v/django-formit.svg)](https://pypi.python.org/pypi/django-formit)**Smiple [Django] form formating.**Formit provides a template tag library for django to ease the formating of forms.---## Requirements* [Django] 1.11, 1.10* [django-classy-tags] for managing template tags.## InstallationInstall using *pip*:```bashpip install django-formit```Then add `formit` to `INSTALLED_APPS`.## UsageTo use **Formit** add your templates:```django{% load formit_tags %}{# To render the form pass in the string path or form instance. #}{% form 'contact.forms.ContactForm' action="/" method="get" button="Send" %}{# To render the form with custom contents. #}{% form_block instance %}<h3>Contact form</h3>{% fieldset %}{% endform_block %}{# To render a custom form without any formating. #}{% form_block instance blank=True %}{% csrf_token %}<h3>Contact form</h3><div class="column">{% fieldset fields=form.visible_fields|slice:":3" %}</div><div class="column">{% fieldset fields=form.visible_fields|slice:"3:" %}</div>{% fieldset fields=form.hidden_fields %}<button>Send</button>{% endform_block %}{# You can separate the rendering of visible and hidden fields. #}{% fieldset visible_fields=instance.visible_fields hidden_fields=instance.hidden_fields %}{# or to automatically extract them from a form. #}{% fieldset form=instance %}{# To render a single field #}{% field instance.visible_fields.0 placeholder="Enter your name" %}```Fieldset tags can also be used without any arguments. In that case ``form`` from the context will be used,which is automatically available inside the ``form`` or ``form_block`` tag.## TemplatesTemplates available to override in ``templates/formit/*``:* ``form.html``* ``fieldset.html``* ``field.html``You can specify custom templates for each field widget by adding a template with lowercase class name of the widget.For example ``formit/fields/textinput.html`` will render a `TextInput` widget.[Django]: https://www.djangoproject.com/[django-classy-tags]: https://github.com/ojii/django-classy-tags
Package: django_formrenderer
# Django Form RendererProvides template filters that allow you to give you power to render forms however you want.HTML 5 input types are automatically used for field types that are appropriate.If a field is required, the [required="required"] is automatically added to the element.More info at:https://github.com/humphrey/django_formrenderer## Installation`pip install django_formrenderer`## Examples### Simple HTML5 Example```HTML+Django/Jinja{% load renderform %}<form><legend>Your details</legend>{{ form|renderform:"formrenderer/default.html, name, email, phone" }}<legend>Extra info</legend>{{ form|renderform:"formrenderer/default.html, dealer, comments" }}</form>```### Or use HTML 4 (but why would you?)```HTML+Django/Jinja{{ form|renderform_html4:"formrenderer/default.html, name, email, phone" }}```### Add a class name to a fieldAppend the field name with the class name. Eg. `my_field.class_name````HTML+Django/Jinja{{ form|renderform:"formrenderer/default.html, name.class_name" }}```### Add an attributeAppend the field name with the attribute. Eg. `my_field[key=value]````HTML+Django/Jinja{{ form|renderform:"formrenderer/default.html, comments[rows=3]" }}{{ form|renderform:"formrenderer/default.html, comments[rows=3,disabled=disabled]" }}```### Add class names and attributesAppend the field name with the class name. Eg. `my_field[key=value]````HTML+Django/Jinja{{ form|renderform:"formrenderer/default.html, comments.my_class[rows=3]" }}```### Complicated Example```HTML+Django/Jinja{% load renderform %}<form>{{ form|renderform:"formrenderer/bootstrap_horizontal.html, name.input-block-level, email.input-block-level" }}<hr/>{{ form|renderform:"formrenderer/bootstrap_horizontal.html, phone, dealer[class=myClass]" }}<hr/>{{ form|renderform:"formrenderer/bootstrap_horizontal.html, comments.input-block-level[rows=3]" }}</form>```
Package: django-form-renderers
Django Form RenderersSometimes form.as_p doesn’t cut it. This app adds more render methods to all forms.ContentsDjango Form RenderersInstallationWhat it doesDefining your own renderersReplace as_p and / or as_table globallyBEMAuthorsChangelog0.3.20.3.10.30.20.1.10.1InstallationInstall or adddjango-form-renderersto your Python path.Addform_renderersto yourINSTALLED_APPSsetting.What it doesEvery form receives a div-based render method calledas_div.If a field is required then an attributerequired="required"is rendered for every widget.
This is a safe blanket assumption.Optional - every field and input gets extra BEM CSS classes.Defining your own renderersCreate eitherform_renderers.pyorform_renderers/__init__.pyin your app. Each renderer must
be a function:def as_some_renderer(form):
    return form._html_output(
        ...
    )

def as_another_renderer(form):
    return form._html_output(
        ...
    )You can override the defaultas_divby creating a renderer calledas_divin your app.
The same rules that apply for Django template overriding apply to renderer overriding.Replace as_p and / or as_table globallyMost third party apps useas_poras_tablefor rendering. Replace it globally by setting:FORM_RENDERERS = {"replace-as-p": True, "replace-as-table": True}BEMBEM is a CSS naming convention that advocates explicit naming over inheritance. Django
forms, fields and widgets are not BEM aware. To enabled BEM classes from settings do:FORM_RENDERERS = {"enable-bem-classes": True}AuthorsPraekelt ConsultingHedley RoosChangelog0.3.2Django 1.10 tests pass. Handle Django 1.11 widget refactor gracefully.0.3.1Add a setting allowing as_p and as_table to be overridden globally.0.3Add a span tag hook for choice inputs. This allows CSS selectors to target the text inside the label tag.0.2Optional BEM classes.Standardize as_div.0.1.1Allow apps to specify custom renderers.0.1First release.
Package: django-formrenderingtools
Customize layout of Django forms in templates, not in Python code.Rather than using {{ form.as_p }}, set up and reuse templates to render
Django’s form elements.As an example, to reproduce Django’s{{ form.as_p }}:{% load form_layouts %}
<form>
  {% form layout="as_p" %}
  <input type="submit">
</form>ResourcesOnline documentation:http://packages.python.org/django-formrenderingtools/PyPI page:http://pypi.python.org/pypi/django-formrenderingtoolsSource code repository:http://bitbucket.org/benoitbryon/django-formrenderingtoolsBugtracker:http://bitbucket.org/benoitbryon/django-formrenderingtools/issues
Package: django-formset-bootstrap
A jQuery plugin for managing Django formsetsThisjQueryplugin helps you create more usableDjangoformsets by allowing clients
add and remove forms on the client-side.The latest versions of these documents can be found on the Github web
site for this application, which is located athttps://github.com/mbourqui/django-dynamic-formset.RequirementsPython>= 3.4Django>= 1.8jQuery>= 1.2.6InstallationUsing PyPIRunpip installdjango-formset-bootstrapUsing the source codeMake surePandocis installedRun./pypi_packager.shRunpip installdist/django_formset_bootstrap-x.y.z-[...].wheel,
wherex.y.zmust be replaced by the actual version number and[...]depends on your packaging configurationConfigurationAddformset-bootstrapto theINSTALLED_APPSin your project’s
settings (usuallysettings.py). This is required in order to be
able to load the script from the static files of your project.UsageIn your templates using formsets, be sure to load the static files:{%loadstatic%}Then include the script:<script src="{%static'formset_bootstrap/js/jquery.formset.js'%}" type="text/javascript"></script>Finally, set up your dynamic formset:<script type="text/javascript">
    $(function () {
        $('#formset-id fieldset').formset();
    });
</script>Setting up the demo projectOnce you’ve got the source code, run the following commands to set up
the SQLite3 database and start the development server:::cd demo
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
chmod a+x manage.py
./manage.py syncdb
./manage.py runserverYou can now browse tohttp://localhost:8000/and view the examples.CreditsThis is a fork ofdjango-dynamic-formsetfromelo80ka.
Package: django-formsetfield
Django’s form wizard allows you to have only one form or one formset
(since 1.4) per step. Usingdjango-formfieldyou can have more forms per
step. Using this app you can have moreformsetsper step.Or maybe you will find other use cases for it :)InstallationInstalldjango-formsetfieldwith pip:$ pip install django-formsetfieldAddformsetfieldtoINSTALLED_APPS.Usage examplefrom django import forms
from formsetfield.fields import FormSetField


class AdultForm(forms.Form):

    fullname = forms.CharField()
    passport = forms.CharField()


class ChildForm(forms.Form):

    fullname = forms.CharField()
    birth_certificate = forms.CharField()


class PassengersForm(forms.Form):

    adults = FormSetField(formset_factory(AdultForm))
    children = FormSetField(formset_factory(ChildForm))ContributingFeel free to fork, send pull requests or report bugs and issues ongithub.