On Mon, Jul 12, 2010 at 1:16 AM, David Larlet <lar...@gmail.com> wrote: > Hi, > > Le 11 juil. 2010 à 17:36, Russell Keith-Magee a écrit : >> {% load xhtml_p_forms %} >> {% form myform %} > > Just a personal feedback, to me the rendering strategy is related to a whole > project and should be defined in settings, it's too easy to forget a loading > in a template. I know that you can use the django.template.add_to_builtins > function but it in this case it should be documented.
This may be the case on many websites. However, in my experience, it isn't the case for all websites. I wouldn't consider it unusual to have different rendering strategies per-page, or even multiple strategies on a single page. >> Widgets >> ------- >> >> Chrome can also be parameterized; for example: >> >> {% form myform field name using autocomplete:"name_autocomplete" %} >> >> might define a chrome that implements an Ajax autocomplete widget >> using the named URL "name_autocomplete" as a data source. This has to >> potential to start giving an answer to the "Why doesn't Django do >> AJAX" monkey; Django won't provide an AJAX solution out of the box, >> but packaging a chrome that implements AJAX should be a lot easier. > > If it requires an extra {% form %} arg it will not be that easier if you need > to override all third-party apps' templates. Note that I haven't got any > solution, that's more to bring the discussion on that topic :-). I acknowledge that this is a weakness; however, I don't see it as a major concern. I'm of a similar mind to James Bennett on this: I don't generally consider templates to be reusable app elements, except when you're dealing with entire applications like admin. James doesn't ship templates with his reusable apps specifically because template aren't ever really reusable. If you're building a site, you can't just drop large chunks of someone else's markup into your site. The only time I've found templates truly reusable is when you are given the template for an entire page -- at which point, the issue of customizing the rendering scheme for an indiviual form is a non-issue, since you just use whatever the full page gives you. > Again, why not directly in settings in order to be project's specific? Is > there anybody mixing doctypes on the same website? (backward compatibility > maybe?) Although a single doctype across a site will be common, there's certainly no guarantee that this will be the case. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@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.