I gave django a try at work to develop a survey application. Turned out pretty sweet, I felt very productive and spent most of my time concentrating on survey tasks. I felt frustrated twice, these are the hurdles I faced that I feel I have probably missed obvious solutions
- Parsing data from the users. I decided not to use the admin framework to get the answers from the questions. I needed fine grained control over user input and it looked too complicated and not geared towards what I was doing. So I made my own function that turned the ID's of checkboxes, radio buttons etc, into ID's to lookup in the question table. It worked o.k. but was a bit of a hack in parts. - Printing questions. I wanted to have a question template that defined how questions should be printed, then I could print them in multiple contexts. Except I couldn't find an easy way to do this. I saw I could define a filter and pass the question object into a "printQuestion" filter but this seemed counterintuitive. Perhaps I could have pre-rendered and passed rendered questions to the templates but this didn't seem right either. When I used Mason we componentized everything and plugged bits and pieces back together in all kinds of ways. Obviously, to get that level of control you need to have code at the template level, and I understand django's aims of moving the code away from the templates (and I agree with it). What is the right way to define a standard way you want an object to be printed? One more quick one, sometimes I wanted data in the objects but not in the tables. What I wanted was to have an error message associated with each Question, but I didn't want that stored in the database. How would you do that? Django is an awesome project. I have been spreading the word. Joel