My answer was to create the application above. It incorporates the wonderful uni-form css and javascript combination to create disability-friendly yet attractive forms. Turn off JavaScript, CSS styles, or access it from a mobile phone and these forms should still work. Which is critical in my job. Best of all, you don't have to touch much HTML at all.
I tried to make it as Django generic as I could, but as a Django newbie it is probably a bit rough around the edges. The code, if you examine it, is really clean. I like that about Django efforts - there is no boilerplate!
Anyway, after a bit of setup, you do an easy modification of the form templates that are presenting your Django forms. You should also style it a bit to match your preferences.
Some final notes and comparisons:
- Time to get a basic version running was about 45 minutes.
- Time to get the styling working was about 1 hour (mostly a stupid mistake on my part).
- I'm hoping the Pinax project will incorporate my efforts! ;)
- The Django docs were very clear on everything I needed to do. I did not have to leave http://docs.djangoproject.com to accomplish my chosen task. I cannot stress enough that this is something I really enjoy about Django.
- This was fun and easy.
Edit on 7/15/2010: Changed the link to django-uni-form on github.
2 comments:
Thanks a lot, this kicks ass!
John, please use the github version, not the google code version!
Post a Comment