Wednesday, April 29, 2015 (permalink)
I'm pleased to announce the "Early Release" of the Two Scoops of Django: Best Practices for Django 1.8 PDF ebook.Read more ...
Monday, September 15, 2014 (permalink)
Sometimes in the clean(), clean_FOO or save() methods of a Django form, you need to have additional form instance attributes available. A sample case for this is having user_id available. This is a simple example of how to do it in Class-Based Views.
Assuming this form:
from django import forms ...
Thursday, June 13, 2013 (permalink)
Friday, March 29, 2013 (permalink)
In my opinion, the concepts behind Django's non-model forms can be listed in just three (3) bullets:
- Forms render HTML.
- Forms are "just" Python constructs.
- Forms validate dictionaries (Python's Key/Value structure).
Let's dig in!
Forms render HTML.
If I construct a Django form:
# myapp/forms.py ...
Wednesday, March 27, 2013 (permalink)