Re: Django Set HTTP Error manually

2007-04-11 Thread Jesse Lovelace
Or: from django.http import HttpResponseNotAllowed return HttpResponseNotAllowed() On 4/9/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 4/9/07, johnny <[EMAIL PROTECTED]> wrote: > > At a particular url, my view is looking for XML document to be sent > > over http, by post. If a request c

Re: Django Set HTTP Error manually

2007-04-09 Thread Ivan Sagalaev
johnny wrote: > What I want to do is set HTTP Error manually in my view, when a > request is made to certain url, without post data. > > At a particular url, my view is looking for XML document to be sent > over http, by post. If a request come in without post, I want to > raise an error "405 Me

Re: Django Set HTTP Error manually

2007-04-09 Thread James Bennett
On 4/9/07, johnny <[EMAIL PROTECTED]> wrote: > At a particular url, my view is looking for XML document to be sent > over http, by post. If a request come in without post, I want to > raise an error "405 Method Not Allowed". How do I do this? response = HttpResponse('some output here') response

Django Set HTTP Error manually

2007-04-09 Thread johnny
What I want to do is set HTTP Error manually in my view, when a request is made to certain url, without post data. At a particular url, my view is looking for XML document to be sent over http, by post. If a request come in without post, I want to raise an error "405 Method Not Allowed". How do