On Tue, Apr 03, 2007 at 04:42:58PM -0700, TaMeR wrote:
> On Apr 3, 7:10 pm, Forest Bond <[EMAIL PROTECTED]> wrote:
> > The way your view is written, if the user is not authenticated, no
> > HttpResponse is returned (since no return statement is executed).  You
> > probably want to just raise Http404 in that case.
> I am not sure what you mean
> I have a HttpResponseRedirect if the user is not authenticated.
> This error happens with an authenticated user.
> If the user is not authenticated he/she gets redirected to the login
> page and that works fine.
> See:
>     if not request.user.is_authenticated():
>         return HttpResponseRedirect('/account/login/?next=%s' %
> request.path)

Oh, you're right.

But, all of your other code is also in that if block.  So if the user is
authenticated, the view doesn't return anything.

Looks like you just have an indentation problem.  Remember, Python code is
whitespace-sensitive.

-Forest

Attachment: signature.asc
Description: Digital signature

Reply via email to