Re: at django login my request.POST.get data are all empty, I struggle with what I missed there

2014-09-29 Thread Collin Anderson
Use a login view like this: @sensitive_post_parameters('password') def login_view(request): form = LoginForm(initial={'email': request.order.email}) if request.POST.get('login'): form = LoginForm(data=request.POST) if form.is_valid(): if user.is_active:

Re: at django login my request.POST.get data are all empty, I struggle with what I missed there

2014-09-26 Thread Sabine Maennel
Thank you Alejandro, it must be the template somehow: I had a seperate login form: *{% extends "base/base.html" %}* *{% load crispy_forms_tags %}* *{% block head_content %}* ** ** ** *Anmeldung bei Netteachers* ** ** *{% endblock %}* *{% block main_content %}* *{% if

Re: at django login my request.POST.get data are all empty, I struggle with what I missed there

2014-09-26 Thread Alejandro Varas G.
Hi Sabine, Your code looks good. Can you post you template code? Why are you not using form `is_valid`? [0] What version of Django are you using? You can be facing that your request.POST is empty! [1] This may be not what you are looking for but you can use Django Authentication System [2]

at django login my request.POST.get data are all empty, I struggle with what I missed there

2014-09-26 Thread Sabine Maennel
This is my login view: def login_view(request,template_name='userauth/login.html'): if request.method == 'POST': username = request.POST.get('username') password = request.POST.get('password') print username print password user =