Hello again Amit,

I'm trying to get the Zen of Django, by using methods I used to use in
Zope ;)

Essentially, I used to have statements like this <dtml-var
some_variable_from_my_form> sprinkled around my pages to check that
form-based variables where being passed through correctly. Zope put
into a namespace called 'form', but also made them available in the
main namespace. The request namespace was populated with all POST and
GET variables. Django presents POST as POST:<MultiValueDict: {}>, so I
don't know what variables are in the POST namespace.

In Zope, what I'd do is this;
<form method="post" action="dostuff">
<input type="text" name="surname">
...
</form>

then in 'dostuff', I'd do;

<dtml-var surname>

or more likely <dtml-var REQUEST> and get the whole namespace -
actually I'd use PageTemplates, but they're more verbose than dtml ;

With Django I need to know what's in the REQUEST variable and display
it explicitly, eg {{ request.FILES.file.filename }}

Simply doing a {{ request }} doesn't show the variables that are passed
through from a form - something I used to rely on heavily in Zope-land.

I guess my Django Zen level isn't high enough (yet).

Cheers,
Tone

Reply via email to