Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.186.518 Times

django-form-utils 0.1.8

Company: Carl Meyer
Date Added: August 04, 2013  |  Visits: 550

django-form-utils

Report Broken Link
Printer Friendly Version


Product Homepage
Download (47 downloads)



django-form-utils is a Django application that provides BetterForm and BetterModelForm classes which are subclasses of django.forms.Form and django.forms.ModelForm, respectively. BetterForm and BetterModelForm allow subdivision of forms into fieldsets which are iterable from a template, and also allow definition of row_attrs which can be accessed from the template to apply attributes to the surrounding container (< li >, < tr >, or whatever) of a specific form field.<br /><br />Installation:<br /><br />Once installed on your Python path (see INSTALL.txt), just include form_utils in your INSTALLED_APPS setting. django-form-utils does not provide any models, but including it in INSTALLED_APPS makes the form_utils template tag library available.<br /><br />You may also want to override the default form rendering templates by providing alternate templates at templates/form_utils/better_form.html and templates/form_utils/form.html.<br /><br />Usage:<br /><br />Simply inherit your form class from form_utils.forms.BetterForm (rather than django.forms.Form), or your modelform class from form_utils.forms.BetterModelForm, and define the fieldsets and/or row_attrs attributes of the inner Meta class:<br /><br />class MyForm(BetterForm):<br /> one = forms.CharField()<br /> two = forms.CharField()<br /> three = forms.CharField()<br /> class Meta:<br /> fieldsets = (('main', {'fields': ('two',), 'legend': ''}),<br /> ('Advanced', {'fields': ('three', 'one'),<br /> 'description': 'advanced stuff'}))<br /> row_attrs = {'one': {'style': 'display: none'}}<br /><br />Fieldset definitions are similar to ModelAdmin fieldset definitions: each fieldset is a two-tuple with a name and an options dictionary. Valid fieldset options in the dictionary include:<br /><br />fields<br /> (required) A tuple of field names to display in this fieldset.<br />classes<br /> A list of extra CSS classes to apply to the fieldset.<br />legend<br /> This value, if present, will be the contents of a legend tag to open the fieldset. If not present the name of the fieldset will be used (so a value of '' for legend must be used if no legend is desired.)<br />description<br /><br /> A string of optional extra text to be displayed under the legend of the fieldset.<br /><br />When iterated over, the fieldsets attribute of a BetterForm (or BetterModelForm) yields Fieldset s. Each Fieldset has a name attribute, a legend attribute, and a description attribute, and when iterated over yields its BoundField s.<br /><br />For backwards compatibility, a BetterForm or BetterModelForm can still be iterated over directly to yield all of its BoundField s, regardless of fieldsets.<br /><br />For more detailed examples, see the doctests in tests/__init__.py.<br /><br />Rendering:<br /><br />A possible template for rendering a BetterForm:<br /><br />{% if form.non_field_errors %}{{ form.non_field_errors }}{% endif %}<br />{% for fieldset in form.fieldsets %}<br /> < fieldset class="fieldset_{{ fieldset.name }}" ><br /> {% if fieldset.legend %}<br /> < legend >{{ fieldset.legend }}< /legend ><br /> {% endif %}<br /> {% if fieldset.description %}<br /> < p class="description" >{{ fieldset.description }}< /p ><br /> {% endif %}<br /> < ul ><br /> {% for field in fieldset %}<br /> {% if field.is_hidden %}<br /> {{ field }}<br /> {% else %}<br /> < li{{ field.row_attrs }} ><br /> {{ field.errors }}<br /> {{ field.label_tag }}<br /> {{ field }}<br /> < /li ><br /> {% endif %}<br /> {% endfor %}<br /> < /ul ><br /> < /fieldset ><br />{% endfor %}<br /><br />django-form-utils also provides a convenience template filter, render. It is used like this:<br /><br />{{ form|render }}<br /><br />By default, it will check whether the form is a BetterForm, and if so render it using the template form_utils/better_form.html. If not, it will render it using the template form_utils/form.html. (In either case, the form object will be passed to the render template's context as form).<br /><br />The render filter also accepts an optional argument, which is a template name or comma-separated list of template names to use for rendering the form:<br /><br />{{ form|render:"my_form_stuff/custom_form_template.html" }}<br /><br />Please report bugs to the official home page: http://launchpad.net/django-form-utils

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Attribute Betterform Bettermodelform Class Dja Django Djangoformutils Endif Field Fieldset Fieldsetlegend Fieldsets Filter Form Form Utils Formnon Field Errors Formscharfield Iterated Legend Render Rendering Row Attrs Template Utils
Users rating: 0/10

License: Freeware Size: 1.23 MB
USER REVIEWS
More Reviews or Write Review


DJANGO-FORM-UTILS RELATED
Utilities  -  django-honeypot 0.1.2
Django honeypot field utilities django-honeypot is a Django plugin that provides utilities for preventing automated form spam. Provides template tags, view decorators, and middleware to add and verify honeypot fields to...
10.24 KB  
Utilities  -  MooseX::AttributeTree 0.03
MooseX::AttributeTree allows you to apply the TreeInherit trait to any attribute in your class. This changes the way the attribute's accessor method works. When reading the attribute's value, if no value has been set for the attribute in this...
10.24 KB  
File Management  -  Progress bar class 1.0
Here is a little class that lets you present percent complete information in the form of a progress bar using the '#' character to represent completed portions, space to represent incomplete portions, and the actual percent done (rounded to...
 
Web Browser Tools  -  django-formrenderingtools 0.1
django-formrenderingtools is an Django app that provides tools for the template designer to customize forms. Rather than using {{ form.as_p }}, set up and reuse templates to render form elements. Currently, this application...
163.84 KB  
Network & Internet  -  django-immutablefield 0.1.1
django-immutablefield is inspired by a Google search that didn't turn up a reusable solution for making fields immutable inside of a Django model. Installing One of the following: Via the ole' standby:
10.24 KB  
Network & Internet  -  django-admin-filters 0.1.3
django-admin-filters allows you to use generic filters for the admin changelist view. Example: from adminfilters.admin import GenericFilterAdmin from django.contrib.admin.filterspec import FilterSpec ...
10.24 KB  
Network & Internet  -  django-templated-email 0.4.4
django-templated-email is oriented towards sending templated emails intended for use with transactional mailers (ala mailchimp, silverpop, etc.), but currently comes out of the box with a backend class which uses django's templating system, and...
10.24 KB  
Networking  -  Set IMG Class 1.0.0
TxTu Set Image Class is a WordPress plugin. The plugin is a filter for images found on your WordPress posts / pages. Before displaying a post or page on your WordPress blog, it will search for images (identified by the tag). It will then remove...
10 KB  
Specialized Tools  -  django-comments-spamfighter 0.4
django-comments-spamfighter is a Django application that contributes a moderation class to Django???*a*?s comment app that provides: * Check incoming comments against the Akismet spam database and either block them directly or add them...
10.24 KB  
Libraries  -  Class::DBI::FormBuilder 0.481
Class::DBI::FormBuilder is a Perl module with Class::DBI/CGI::FormBuilder integration. SYNOPSIS package Film; use strict; use warnings; use base Class::DBI; use Class::DBI::FormBuilder; # for indented output: # use...
46.08 KB  
NEW DOWNLOADS IN NETWORK & INTERNET, TELEPHONE UTILITIES
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB  
Network & Internet  -  SQL Inject Me 0.4.5
SQL Inject Me is a Firefox extension used to test for SQL Injection vulnerabilities. The tool works by submitting your HTML forms and substituting the form value with strings that are representative of an SQL Injection attack.
133.12 KB  
Telephone Utilities  -  ScopServ-VoIP 2.1.3 Beta
ScopServ-VoIP is a Web-based GUI management interface for the Asterisk system which can be accessed by any XHTML 1.0 browser. It supports a lot of features like: multiple languages, multiple users, reporting tools, personal IVR, and an...
10.24 KB  
Telephone Utilities  -  Funambol SOGo Connector 1.0.6
Funambol SOGo Connector project allows any SyncML enabled devices to fully synchronize contacts, events and tasks with SOGo. The connector is fast and reliable. Here are some key features of "Funambol SOGo Connector": ?*A*...
3.34 MB  
Telephone Utilities  -  efone 20000723
Efone is a distributed internet phone system. It features a voice sending/receiving client (aka internet phone) and a central server (administered via the web) where users information (name, nick, password, current ip) are stored.
286.72 KB  
Telephone Utilities  -  KAlcatel 0.3.3
KAlcatel is program for KDE (K Desktop Environment) 3.x (KDE 2.x was supported till 0.3.1) to manage Alcatel 50x or 70x phone (only 501 is currently tested). It is known to work on Linux, but as well it may work anywhere where KDE 3.x work. Please...
972.8 KB  
Telephone Utilities  -  gsm-ussd 0.4.0-25
gsm-ussd is a small command-line tool to send USSD queries via your UMTS or GSM modem. USSD queries can tell you your current prepaid account balance, the phone number of the SIM card in your modem, and a lot more, depending on your GSM net provider.
61.44 KB