On 5/10/2009 4:27 PM, Martin wrote:
> Hi,
> 
> I'm trying to check in a template if the form on this page was sent or
> not (in other words if the page was accessed by POST or GET). Is there
> a build-in way to do something like that down on the template. Or do I
> have to add a extra 'flag' for this in my view?
> Another possible solution for me would be to check if one of the
> 'required' fields of the form has a value.
> I stumbled upon http://code.djangoproject.com/ticket/10427
> So, I checked out the trunk, but MyForm.MyField.value still doesn't
> work. Did I misinterpret the status of the ticket? It's sometimes hard
> for me to understand the history.

The ticket doesn't appear to be what you're asking for. I think the 
easiest way is for you to insert an extra context variable in your view, 
since `GET` and `POST` are verbs associated with a request, not a response.

-- 
George

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

Reply via email to