Thank you doug for your feedbacks. I am happy to see that I am not the
first one facing this dilemma.
I try to go the {{form.fieldname}} way but my issue with this approach
was that since my forms was dynamically built it was difficult for me
to find a a generic way to write my template to express all the cases.

I think your advise of reading the newforms and the test suite is very
good. I have already tryied but I guess I haven't spent enough time on
it yet.

Maybe be I should not consider the newfroms library  as a silverbullet
but as a very convenient tool weel suited for simple forms. At least
until I drastically increase my skill on how to use them

Thank you


On Jul 28, 1:20 am, Doug B <[EMAIL PROTECTED]> wrote:
> > So my question is am I missing something or I was just expecting too
> > much from the newforms?
>
> I had similar problems initially, and after hundreds of forms built I
> still get annoyed every time I have to build a newforms form.  On the
> other hand, I can't really think of a better way to do it either (and
> I've tried, oh how I tried).  Building a form from just a raw template
> IS easier, but rendering is only part of newforms... its the
> consistent way of doing validation in the view (or writing the
> template) without knowing about the form details that are important as
> far as I'm concerned.
>
> The best advice I can give is to take a few minutes and read all of
> the newforms code (especially the fields and widgets), and the
> regression tests.  It's extremely well commented, and will probably
> help a lot.  It did for me.
>
> http://code.djangoproject.com/browser/django/trunk/tests/regressionte...
>
> >My last question is would it be absurd to have a form field called
> >TemplateField to which we can give a template string that will be
> >dynamically inserted and substituted in the template?
>
> You could do that if you want to.  Override one of that
> form.as_table,as_ul, etc methods to render from a template attribute.
> I'm not sure why you would though since it's pretty easy to do
> {{ form.fieldname }} in your view template if you don't like the
> default newforms layouts.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to