request.user.is_anonymous() and django.contrib.auth.logout()
respectively.
On Feb 24, 2:36 pm, CrabbyPete wrote:
> I have code that allows an anonymous user to look at some elses page,
> but I want to limit what they can do so I have the following code
>
> def show(request):
> u = request.
On Feb 24, 2:36 pm, CrabbyPete wrote:
> I have code that allows an anonymous user to look at some elses page,
> but I want to limit what they can do so I have the following code
>
> def show(request):
> u = request.GET['friend']
> user = User.objects.get(pk=u)
> visit = user.is_auth
Whoops. I figured it out. Even though the user is None, it is failing the
form.is_valid() check and so skipping the if statements. So I just need to
include an else clause for the form.is_valid() check to catch the blank
password situation.
Here's hoping this helps someone else.
On Wed, Feb 17, 2
3 matches
Mail list logo