<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>muhuk.com &#187; forms</title>
	<atom:link href="http://www.muhuk.com/tag/forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.muhuk.com</link>
	<description>know thyself</description>
	<lastBuildDate>Thu, 29 Dec 2011 05:05:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>What&#8217;s New in django-formfieldset 1.1</title>
		<link>http://www.muhuk.com/2010/03/whats-new-in-django-formfieldset-1-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=whats-new-in-django-formfieldset-1-1</link>
		<comments>http://www.muhuk.com/2010/03/whats-new-in-django-formfieldset-1-1/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 20:40:04 +0000</pubDate>
		<dc:creator>Atamert Ölçgen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django-formfieldset]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://www.muhuk.com/?p=352</guid>
		<description><![CDATA[I have just released 1.1 version of (http://github.com/muhuk/django-formfieldset/). I has been almost a year since (http://www.muhuk.com/2009/05/django-formfieldset/). Here is a summary of changes for this version:

<h3>New Example Project</h3>

There is a new and improved example project. It is designed to be some sort of documentation at the same time. When you run the example ...]]></description>
			<content:encoded><![CDATA[<p>I have just released 1.1 version of <a href="http://github.com/muhuk/django-formfieldset/">django-formfieldset</a>. I has been almost a year since <a href="http://www.muhuk.com/2009/05/django-formfieldset/">version 1.0</a>. Here is a summary of changes for this version:</p>

<h3>New Example Project</h3>

<p>There is a new and improved example project. It is designed to be some sort of documentation at the same time. When you run the example project and visit different pages you will see, for each examle, Python code, template code, text of rendered result and finally the result embedded.</p>

<p>If you have <a href="http://pygments.org/">Pygments</a> installed all the code will be nicely highlighted.</p>

<h3>Fieldset &amp; FieldsetMixin Improvements</h3>

<p>Fieldset definitions are validated now. An exception will be raised if all of your fields are not included exactly once.</p>

<p>Template strings that are used by <code>as_table</code>, <code>as_p</code> and <code>as_ul</code> methods are now class attributes. You can simply override them instead of writing your own <code>as_*</code> method.</p>

<p><code>FieldsetMixin</code> provides a <code>fieldset_dict</code> attribute. This dictionary has <strong>slugified</strong> fieldset names as keys and <code>Fieldset</code> instances as values. Your fieldset declarations can still be accessed from <code>fielsets</code> attribute.</p>

<h3>Rendering Improvements</h3>

<p>There are two rendering related improvements: individual fieldset rendering and <code>renderform</code> template filter.</p>

<p><code>Fieldset</code> objects have <code>as_table</code>, <code>as_p</code>, <code>as_ul</code> methods just like forms. Errors from hidden fields are handled correctly, but you still need to call <code>non_field_errors()</code> to get the top level errors. Also it is template author&#8217;s responsibility to make sure all the fieldsets are rendered.</p>

<p>If <code>as_*</code> methods are not enough for you, with <code>renderform</code> filter you can render your forms or <code>Fieldset</code>s through a custom template. It works like this:</p>

<pre><code>{{ form.fieldset_dict.mytitlerenderform:"myapp/mytitle_fieldset.html" }}
</code></pre>

<p>If you call it without an argument <code>formfieldset/form.html</code> template will be used.</p>
<div><a class="addthis_button" href="http://www.muhuk.com//addthis.com/bookmark.php?v=250" addthis:url='http://www.muhuk.com/2010/03/whats-new-in-django-formfieldset-1-1/' addthis:title='What&#8217;s New in django-formfieldset 1.1 '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div><p>Related posts:<ol>
<li><a href='http://www.muhuk.com/2011/11/working-with-files-in-django/' rel='bookmark' title='Working with files in Django &#8211; Part 1'>Working with files in Django &#8211; Part 1</a></li>
<li><a href='http://www.muhuk.com/2011/11/working-with-files-in-django-part-2/' rel='bookmark' title='Working with files in Django &#8211; Part 2'>Working with files in Django &#8211; Part 2</a></li>
<li><a href='http://www.muhuk.com/2011/11/working-with-files-in-django-part-3/' rel='bookmark' title='Working with files in Django &#8211; Part 3'>Working with files in Django &#8211; Part 3</a></li>
</ol></p><p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.muhuk.com/2010/03/whats-new-in-django-formfieldset-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>django-formfieldset</title>
		<link>http://www.muhuk.com/2009/05/django-formfieldset/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=django-formfieldset</link>
		<comments>http://www.muhuk.com/2009/05/django-formfieldset/#comments</comments>
		<pubDate>Thu, 28 May 2009 07:20:40 +0000</pubDate>
		<dc:creator>Atamert Ölçgen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django-formfieldset]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://www.muhuk.com/?p=234</guid>
		<description><![CDATA[(http://github.com/muhuk/django-formfieldset/) is a Django application that allows you define and render your forms with fieldsets. Just like in <code>admin</code>. To enable fieldset rendering you need to add <code>FieldsetMixin</code> as a parent class to your form and define a <code>fieldsets</code> attribute:

from django import forms
from formfieldset.forms import FieldsetMixin

class MyForm(forms.Form, FieldsetMixin):
    # Fields etc...

...]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/muhuk/django-formfieldset/">django-formfieldset</a> is a Django application that allows you define and render your forms with fieldsets. Just like in <code>admin</code>. To enable fieldset rendering you need to add <code>FieldsetMixin</code> as a parent class to your form and define a <code>fieldsets</code> attribute:</p>

<pre><span style="color:#000000; font-weight:bold">from</span> django <span style="color:#000000; font-weight:bold">import</span> forms
<span style="color:#000000; font-weight:bold">from</span> formfieldset<span style="color:#000000">.</span>forms <span style="color:#000000; font-weight:bold">import</span> FieldsetMixin


<span style="color:#000000; font-weight:bold">class</span> <span style="color:#010181">MyForm</span><span style="color:#000000">(</span>forms<span style="color:#000000">.</span>Form<span style="color:#000000">,</span> FieldsetMixin<span style="color:#000000">):</span>
    <span style="color:#838183; font-style:italic"># Fields etc...</span>

    fieldsets <span style="color:#000000">= ((</span>u<span style="color:#ff0000">'Fieldset Title'</span><span style="color:#000000">,</span>
                  <span style="color:#000000">{</span><span style="color:#ff0000">'fields'</span><span style="color:#000000">: (</span><span style="color:#ff0000">'foo'</span><span style="color:#000000">,</span> <span style="color:#ff0000">'bar'</span><span style="color:#000000">,</span> <span style="color:#ff0000">'baz'</span><span style="color:#000000">),</span>
                   <span style="color:#ff0000">'description'</span><span style="color:#000000">:</span> u<span style="color:#ff0000">'This is the description for fieldset.'</span><span style="color:#000000">}),</span>
                 <span style="color:#000000">(</span><span style="color:#000000; font-weight:bold">None</span><span style="color:#000000">,</span>
                  <span style="color:#000000">{</span><span style="color:#ff0000">'fields'</span><span style="color:#000000">: (</span><span style="color:#ff0000">'some_field'</span><span style="color:#000000">,),</span>
                   <span style="color:#ff0000">'description'</span><span style="color:#000000">:</span> u<span style="color:#ff0000">'This fieldset has no title.'</span><span style="color:#000000">}),</span>
                 <span style="color:#000000">(</span>u<span style="color:#ff0000">'Fieldset With No Description'</span><span style="color:#000000">,</span>
                  <span style="color:#000000">{</span><span style="color:#ff0000">'fields'</span><span style="color:#000000">: (</span><span style="color:#ff0000">'some_other_field'</span><span style="color:#000000">,)}))</span></pre>

<p>Then you can render your form with fieldset enabled methods:</p>

<pre><code>&lt;form method="POST" action=""&gt;&lt;table&gt;{{ form.as_fieldset_table }}&lt;/table&gt;&lt;/form&gt;
</code></pre>

<p>It is far from complete<sup>1</sup>, but feel free to <a href="http://github.com/muhuk/django-formfieldset/tree/master">download</a> and play with it.</p>

<hr />

<p><strong>1</strong>: Not released yet.</p>
<div><a class="addthis_button" href="http://www.muhuk.com//addthis.com/bookmark.php?v=250" addthis:url='http://www.muhuk.com/2009/05/django-formfieldset/' addthis:title='django-formfieldset '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div><p>Related posts:<ol>
<li><a href='http://www.muhuk.com/2011/11/working-with-files-in-django/' rel='bookmark' title='Working with files in Django &#8211; Part 1'>Working with files in Django &#8211; Part 1</a></li>
<li><a href='http://www.muhuk.com/2011/11/working-with-files-in-django-part-2/' rel='bookmark' title='Working with files in Django &#8211; Part 2'>Working with files in Django &#8211; Part 2</a></li>
<li><a href='http://www.muhuk.com/2011/11/working-with-files-in-django-part-3/' rel='bookmark' title='Working with files in Django &#8211; Part 3'>Working with files in Django &#8211; Part 3</a></li>
</ol></p><p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.muhuk.com/2009/05/django-formfieldset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

