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 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.status_code = 405
> return response
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to