NewForms is one of my favorite feature in Django, and I am getting addicted to it. The first thing that comes our mind on the newforms' usage is for adding or updating records. Being a newforms addict, I also use it for doing search and even for forms that has one input element (not including the input type = submit)
When doing search, i need the inputs to be validate and that's easy with newforms. Just choose appropriate field if the input needs to be a number, a date, and etc. I am really happy with what MultipleChoiceField provide to make my search more flexible.
Item.objects.filter(status__in=form.cleaned_data['status'])
Sometimes a simple form as having a one input element needs a complicated validation. With newforms you can do almost do anything you can with python. It's every extensible and I'll try to show you on my next post.
Showing posts with label django. Show all posts
Showing posts with label django. Show all posts
Monday, January 7, 2008
Addicted to Django's NewForms
Posted by
james_027
at
11:06 AM
157
comments
Tuesday, July 31, 2007
Django or Rails for Grails user
I had a wonderful experience with Grails after finishing two projects. If you are a new Java programmer who's looking for a good web frameworks, Grails will be your savior just like what it was to me.
Here's what I like about Grails
- Relatively easy to learn compared to other Java web frameworks.
- Provides the basic things that one need, it's all there and there's not much
to configure (ex. No XML). - It's agile!
- Good ORM built on top of Hibernate.
- Grails was developed mostly in Java so it's enterprise-ready and it scales well.
- Uses groovy. Easy to learn Java scripting language
- Although it's not really Java, it does take advantage of the massive amount of Java libraries available, including ones I use like the Java Excel API and JFreeChart.
- I like database stored procedure programming, and calling stored procedurefrom Grails is easy as well as executing complex sql queries.
- Integrate my choice of Javascript framework easily. I use jQuery.
- Grails helps me code properly because of its MVC pattern and servicesconcept.
- Grails plug-in are so cool like Quartz and Searchable
One of the requirements of my next project is that it be hosted on the internet. My client doesn't care what technology I use but wants the hosting fee to be as low as possible. And as we all know, Java web hosting is not cheap compared to others.
I hope to use a non-Java web framework, Django or Ruby on Rails, that I could be comfortable with because of the knowledge and experience I have with Grails. I'd like to see the things that I like in Grails on them. Right now, I'm gearing towards Django because I know a little of Python.
Comments & Suggestions?
Subscribe to:
Posts (Atom)