On Mon, May 25, 2009 at 1:32 PM, notcourage wrote:
>
> @require_GET
> def forbiddenView(request):
>return HttpResponseForbidden()
>
So the login requirement isn't directly decorating the view. It's still
there somewhere, based on your curl results. Given this view:
from
@require_GET
def forbiddenView(request):
return HttpResponseForbidden()
--~--~-~--~~~---~--~~
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
On Sun, May 24, 2009 at 2:10 PM, notcourage wrote:
>
> curl -v http://localhost:8000/resources/users999/forbbidenView/
> * About to connect() to localhost port 8000 (#0)
> * Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 8000 (#0)
> > GET
curl -v http://localhost:8000/resources/users999/forbbidenView/
* About to connect() to localhost port 8000 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET /resources/users999/forbbidenView/ HTTP/1.1
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu)
On Sun, May 24, 2009 at 11:33 AM, notcourage wrote:
>
> I'm accustomed to seeing the browser present an error message instead
> of a blank page.
>
> curl shows a 301:
>
> curl -v http://localhost:8000/resources/users999/forbbidenView
> * About to connect() to localhost port
I'm accustomed to seeing the browser present an error message instead
of a blank page.
curl shows a 301:
curl -v http://localhost:8000/resources/users999/forbbidenView
* About to connect() to localhost port 8000 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port
On 5/23/2009 9:07 AM, ken keller wrote:
> When my view returns:
>
> return HttpResponseForbidden()
>
> the browser doesn't show the non-200 status.
How are you determining that the browser is not receiving a 403 status?
--
George
--~--~-~--~~~---~--~~
You
When my view returns:
return HttpResponseForbidden()
the browser doesn't show the non-200 status.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
8 matches
Mail list logo