We are a small, intelligent App development studio. We love "Building Amazing Apps", solving problems and cultivating strong relationships with our clients.
Doing things with Django forms
By : Shabda Raaj
Forms are one of the best features of Django. (After models, admin, url routing etc :) ). Here is a quick tutorial describing how to do things with Django forms.
- Basic form
Prob. You want to show a form, validate it and display it.
Ans. Create a simple form.
class UserForm(forms.Form):
username = forms.CharField()
joined_on = forms.DateField()
This wil take care that the form is displayed with two text field, and a value for them are filled in, and the second field has correct formatting for a date.
2.
Prob. Create a form which has values populated depending upon a ...
more info..Dynamic forms with Django
By : Shabda Raaj
Newforms, (or forms now) are without doubt one of the coolest features of Django. (Of course after Admin, Localflavor, and many others). Here is some sample code.
class EmployeeForm(forms.Form):
name = forms.CharField()
age = forms.IntegerField()
resume = forms.FileField()
Just this code gives you
- A form which knows how to render itself as Html.
- A form which knows how to validate data on the server side.
- A form which knows how to show the relevant errors.
However think of this scenario,
You need to customise your form depending on values in the Database.
What you want to do is ...
more info..- Deploying django using docker
- Common testing scenarios for Django app.
- Logging in Django
- Serving static files in Django
- Two Scoops of Django: Review
- Introduction to Python Workshop on February 15th, 2013
- Easy client side form validations for Django: Django Parsley
- MoreApps - Android Library Project: Open Sourced
- Tutorial: Building a Chrome app
- Password Generator App: Open Sourced
- June 2013
- April 2013
- March 2013
- February 2013
- January 2013
- November 2012
- October 2012
- September 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- October 2011
- September 2011
- July 2011
- June 2011
- April 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- June 2010
- April 2010
- March 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- April 2009
- March 2009
- February 2009
- November 2008
- October 2008
- June 2008
- May 2008
- April 2008
Not exactly, not exactly tim the enchanter
By : Javed Khan
I've been putting off writing about my experience with django form wizard for some time now. I came across this blog post by Kenneth Love which finally compelled me to write this down.
About Django Form Wizard:
Form Wizard can be handy when you have a huge form, and you want to make it less intimidating to the user by splitting it into multiple steps.
If you have glued multiple forms together with
sessionsor whatnot and it turned out to be a mess, you now what I'm talking about :)Think surveys, checkouts, lengthy registrations etc.
The class ...
more info..