skip to navigation
skip to content

Not Logged In

formica 1.2.1

Django form rendering helpers

Package Documentation

Overview

Rendering forms with Django can be painful and not very rewarding. There are some nice solutions arround like django-floppyforms or django-crispy-forms but you may want something a bit less complex.

Formica design is heavily based on Formulation, a very lightweight, yet powerful, solution based on template blocks. All credits should go to Curtis Maloney for this impressive and simple idea.

A simple example

Say we have a form somewhere and want to render it in a template.

from django import forms
class MyForm(forms.Form):
  email = forms.EmailField(label='Email')
  check = forms.BooleanField(label='I really love spam', required=False)

Rendering the form is as simple as:

{% load formica %}

<form method="post">
  {% form "formica/base_form.html" %}
    {% fields %}
  {% endform %}

  <p><input type="submit" value="save" /></p>
</form>

Pretty cool isn’t it? Read the documentation to learn more.

Sources & license

Formica sources are hosted on Github: https://github.com/olivier-m/formica

Formica is released under the FreeBSD license.

 
File Type Py Version Uploaded on Size
formica-1.2.1.tar.gz (md5) Source 2014-08-22 6KB
  • Downloads (All Versions):
  • 6 downloads in the last day
  • 49 downloads in the last week
  • 199 downloads in the last month