reg/views.py
changeset 25 17966ca75ca9
parent 23 42e2a810e1c8
child 27 ea6aef4b379d
equal deleted inserted replaced
24:31d37d0cf557 25:17966ca75ca9
    43             user = authenticate(username=username, password=password)
    43             user = authenticate(username=username, password=password)
    44             if user.is_active:
    44             if user.is_active:
    45                 login(request, user)
    45                 login(request, user)
    46                 return redirect('/reg')
    46                 return redirect('/reg')
    47             else:
    47             else:
    48                 return render_to_response('account_inactive.html', {'user':user, 'email':email})
    48                 return render_to_response('account_inactive.html', {'email':email})
    49         else:
    49         else:
    50             return render_to_response('login.html', {'user':user, 'form':form})
    50             return render_to_response('login.html', {'user':user, 'form':form})
    51     else:
    51     else:
    52         form = reg_forms.LoginForm()
    52         form = reg_forms.LoginForm()
    53         return render_to_response('login.html', {'user':user, 'form':form})
    53         return render_to_response('login.html', {'user':user, 'form':form})