<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: newforms</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/newforms.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2008-06-27T01:02:30+00:00</updated><author><name>Simon Willison</name></author><entry><title>CookBookNewFormsFieldOrdering</title><link href="https://simonwillison.net/2008/Jun/27/cookbooknewformsfieldordering/#atom-tag" rel="alternate"/><published>2008-06-27T01:02:30+00:00</published><updated>2008-06-27T01:02:30+00:00</updated><id>https://simonwillison.net/2008/Jun/27/cookbooknewformsfieldordering/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.djangoproject.com/wiki/CookBookNewFormsFieldOrdering"&gt;CookBookNewFormsFieldOrdering&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Handy tip—change the order of fields in a Django newforms instance by over-riding form.fields.keyOrder (since fields is a SortedDict).


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tip"&gt;tip&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="newforms"/><category term="python"/><category term="tip"/></entry><entry><title>Multiple inheritance of newforms and modelforms</title><link href="https://simonwillison.net/2008/Apr/12/django/#atom-tag" rel="alternate"/><published>2008-04-12T12:54:51+00:00</published><updated>2008-04-12T12:54:51+00:00</updated><id>https://simonwillison.net/2008/Apr/12/django/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.djangosnippets.org/snippets/703/"&gt;Multiple inheritance of newforms and modelforms&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
If you ever see “Error when calling the metaclass bases metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases” when trying multiple inheritance with newforms and modelforms, here’s a scary solution I found.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/inheritance"&gt;inheritance&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/metaclasses"&gt;metaclasses&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/modelforms"&gt;modelforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/multipleinheritance"&gt;multipleinheritance&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="inheritance"/><category term="metaclasses"/><category term="modelforms"/><category term="multipleinheritance"/><category term="newforms"/><category term="python"/></entry><entry><title>Quoting Google App Engine docs</title><link href="https://simonwillison.net/2008/Apr/8/forms/#atom-tag" rel="alternate"/><published>2008-04-08T13:48:18+00:00</published><updated>2008-04-08T13:48:18+00:00</updated><id>https://simonwillison.net/2008/Apr/8/forms/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://code.google.com/appengine/articles/djangoforms.html"&gt;&lt;p&gt;The Google App Engine model class, db.Model, is not the same as the model class used by Django. As a result, you cannot directly use the Django forms framework with Google App Engine. However, Google App Engine includes a module, db.djangoforms, which casts between the datastore models used with Google App Engine and the Django models specification. In most cases, you can use db.djangoforms.ModelForm in the same manner as the Django framework.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://code.google.com/appengine/articles/djangoforms.html"&gt;Google App Engine docs&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google"&gt;google&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/google-app-engine"&gt;google-app-engine&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/modelforms"&gt;modelforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="google"/><category term="google-app-engine"/><category term="modelforms"/><category term="newforms"/><category term="python"/></entry><entry><title>Better Use of Newforms</title><link href="https://simonwillison.net/2008/Mar/25/django/#atom-tag" rel="alternate"/><published>2008-03-25T22:53:28+00:00</published><updated>2008-03-25T22:53:28+00:00</updated><id>https://simonwillison.net/2008/Mar/25/django/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://lincolnloop.com/blog/2008/mar/13/better-newforms/"&gt;Better Use of Newforms&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Two really neat techniques: using an inclusion tag template to DRY your custom form templates, and adding what-to-do-next methods to the form class itself to cut down on the application code in your views.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/dry"&gt;dry&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/peter-baumgartner"&gt;peter-baumgartner&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="dry"/><category term="newforms"/><category term="peter-baumgartner"/><category term="python"/></entry><entry><title>Django Tip: Complex Forms</title><link href="https://simonwillison.net/2008/Jan/6/defying/#atom-tag" rel="alternate"/><published>2008-01-06T22:14:47+00:00</published><updated>2008-01-06T22:14:47+00:00</updated><id>https://simonwillison.net/2008/Jan/6/defying/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.pointy-stick.com/blog/2008/01/06/django-tip-complex-forms/"&gt;Django Tip: Complex Forms&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Malcolm demonstrates some advanced tricks with newforms.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/malcolm-tredinnick"&gt;malcolm-tredinnick&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="malcolm-tredinnick"/><category term="newforms"/><category term="python"/></entry><entry><title>Filtering foreign key choices in newforms-admin</title><link href="https://simonwillison.net/2008/Jan/6/technobabble/#atom-tag" rel="alternate"/><published>2008-01-06T20:31:52+00:00</published><updated>2008-01-06T20:31:52+00:00</updated><id>https://simonwillison.net/2008/Jan/6/technobabble/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.technobabble.dk/2008/jan/06/filtering-foreign-key-choices-newforms-admin/"&gt;Filtering foreign key choices in newforms-admin&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A nice introduction to the Django newform-admin branch, including an example of how to easily implement row-level permissions.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/christian-joergensen"&gt;christian-joergensen&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/django-admin"&gt;django-admin&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newformsadmin"&gt;newformsadmin&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="christian-joergensen"/><category term="django"/><category term="django-admin"/><category term="newforms"/><category term="newformsadmin"/><category term="python"/></entry><entry><title>Chapter 7: Form Processing</title><link href="https://simonwillison.net/2007/Dec/16/chapter/#atom-tag" rel="alternate"/><published>2007-12-16T21:44:44+00:00</published><updated>2007-12-16T21:44:44+00:00</updated><id>https://simonwillison.net/2007/Dec/16/chapter/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.djangobook.com/en/1.0/chapter07/"&gt;Chapter 7: Form Processing&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The chapter on newforms I contributed to “The Definitive Guide to Django” is now online, along with the rest of the published book.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/django-book"&gt;django-book&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/writing"&gt;writing&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="django-book"/><category term="newforms"/><category term="python"/><category term="writing"/></entry><entry><title>Using django.newforms with Pylons</title><link href="https://simonwillison.net/2007/Nov/27/max/#atom-tag" rel="alternate"/><published>2007-11-27T15:01:50+00:00</published><updated>2007-11-27T15:01:50+00:00</updated><id>https://simonwillison.net/2007/Nov/27/max/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://maxischenko.in.ua/blog/entries/130/using-djangonewforms-with-pylons/"&gt;Using django.newforms with Pylons&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
It’s always good to see Django components used outside of the framework itself. For the record, you can avoid the DJANGO_SETTINGS_MODULE environment variable entirely using django.conf.settings.configure (search for it).


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pylons"&gt;pylons&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/settings"&gt;settings&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="newforms"/><category term="pylons"/><category term="python"/><category term="settings"/></entry><entry><title>Newforms, part 1</title><link href="https://simonwillison.net/2007/Nov/23/blist/#atom-tag" rel="alternate"/><published>2007-11-23T23:54:28+00:00</published><updated>2007-11-23T23:54:28+00:00</updated><id>https://simonwillison.net/2007/Nov/23/blist/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.b-list.org/weblog/2007/nov/22/newforms/"&gt;Newforms, part 1&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
James Bennett provides a detailed description of Django’s newforms (not so new now though, they’ve been around for over a year), complete with attractive diagrams.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/james-bennett"&gt;james-bennett&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="james-bennett"/><category term="newforms"/><category term="python"/></entry><entry><title>Advanced Django</title><link href="https://simonwillison.net/2007/Sep/8/advanced/#atom-tag" rel="alternate"/><published>2007-09-08T13:00:06+00:00</published><updated>2007-09-08T13:00:06+00:00</updated><id>https://simonwillison.net/2007/Sep/8/advanced/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.slideshare.net/simon/advanced-django/"&gt;Advanced Django&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Slides from my hour long tutorial at PyCon UK this morning. Most of the material was adapted from OSCON, but I also added a new section covering newforms.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pyconuk"&gt;pyconuk&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pyconuk2007"&gt;pyconuk2007&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/slides"&gt;slides&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/slideshare"&gt;slideshare&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/my-talks"&gt;my-talks&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/tutorial"&gt;tutorial&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="newforms"/><category term="pyconuk"/><category term="pyconuk2007"/><category term="python"/><category term="slides"/><category term="slideshare"/><category term="my-talks"/><category term="tutorial"/></entry><entry><title>Django version 0.96 release notes</title><link href="https://simonwillison.net/2007/Mar/23/django/#atom-tag" rel="alternate"/><published>2007-03-23T23:47:32+00:00</published><updated>2007-03-23T23:47:32+00:00</updated><id>https://simonwillison.net/2007/Mar/23/django/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.djangoproject.com/documentation/release_notes_0.96/"&gt;Django version 0.96 release notes&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The two big improvements are the newforms library and the ability to use callables directly in your URLconfs, enabling a bunch of useful new tricks.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/urlconfs"&gt;urlconfs&lt;/a&gt;&lt;/p&gt;



</summary><category term="django"/><category term="newforms"/><category term="urlconfs"/></entry><entry><title>The Django newforms-admin branch</title><link href="https://simonwillison.net/2007/Jan/15/newforms/#atom-tag" rel="alternate"/><published>2007-01-15T02:43:48+00:00</published><updated>2007-01-15T02:43:48+00:00</updated><id>https://simonwillison.net/2007/Jan/15/newforms/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://code.djangoproject.com/wiki/NewformsAdminBranch"&gt;The Django newforms-admin branch&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
This should make customising the Django admin application a whole lot easier.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/admin"&gt;admin&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/branch"&gt;branch&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/django-admin"&gt;django-admin&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/newforms"&gt;newforms&lt;/a&gt;&lt;/p&gt;



</summary><category term="admin"/><category term="branch"/><category term="django"/><category term="django-admin"/><category term="newforms"/></entry></feed>