I personally like the rendering methods being attached to the form, as
they don't make sense as a universal template filter/tag. I do
however, use a filter as "as_p" doesn't do much :)
On Jun 28, 8:33 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2008-06-28 at 06:12 -0700, ionut wro
On Sat, 2008-06-28 at 06:12 -0700, ionut wrote:
> I do'nt consider to be a MVC good pattern rendering form html inside
> newforms class.
A form class is purely presentational, so there's no "MVC" (or whatever
you might want to call it -- you can't do MVC on the web, after all)
violation going on
I do'nt consider to be a MVC good pattern rendering form html inside
newforms class.
I think a better proach while rendering html forms is to use a
template file
A proff of concept:
class BaseForm(StrAndUnicode):
...
def __unicode__(self):
t = get_template('default_form.html')