Hi Jonas,

2011/6/23 Jonas H. <jo...@lophus.org>:
> On 06/23/2011 02:11 PM, Harro wrote:
>>
>> - Will the as_* methods on forms be deprecated? They seem to be a nice
>> shorter version then the new way to do it.
>
> I'd rather provide a shorter version of {% form %} for built-in layouts:
>
> {% form foobar 'table' %}
> as shorthand for
> {% form foobar 'forms/layouts/table.html' %}
>
> This behaviour could even be extended to automagic template selection, so if
> you do {% form ... 'foo' %} Django searches for a 'foo.html' template in
> "project/current_app/templates/current_app/forms/layouts/", then
> "project/templates/forms/layouts/", falling back to
> "django/forms/templates/forms/layouts/" if none of those directories
> contains the desired file.  Your proposal doesn't tell anything about where
> form templates are searched, is something similar to this intended?

Basically we wanted to avoid automagical behavior. The plan is to load the
templates like any another template, just with the installed template loaders.
We will add a form-template-loader that you can add to your TEMPLATE_LOADERS
setting that is simply a directory based template loader looking for
templates in
django/forms/templates -- making the default "shipped with django" form
layouts available.

--
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