Hi Harro,

2011/6/23 Harro <hvdkl...@gmail.com>:
> Two things:
> - Will the as_* methods on forms be deprecated? They seem to be a nice
> shorter version then the new way to do it.

The plan is to deprecate them. First reason is that the new approach
is more explicit of what happens. The second and main reason is, that
as_* are methods on the form. IMO the form shouldn't know much about
its representation or how it's rendered. I see it like a model that
doesn't know about its view (in the MVC sense, not model in django
sense).

> - I assume the formconfig calls are for the current context, but can I set
> them in the base.html and then automatically have them used in all templates
> extending the base.html and templates included in a template?

They are limitted in the scope of the tag where they are used. So
formconfig tags cannot break out of a form tag, or the template that
is included by the form tag. You are not able to set global defaults
as of configuring all forms in your base.html, since using them
outside of a {% form %} will raise a TemplateSyntaxError. However you
can achieve something similiar for having a generic base template for
all your form layouts.

--
Servus,
Gregor Müllegger

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to