This function work under dev server but not ander prod 
Technical server contact said me that there are a problem because at SSH

[28/Feb/2013 23:58:04] "GET /login/ HTTP/1.1" 200 15710
[28/Feb/2013 23:58:12] "POST /login/ HTTP/1.1" 500 6965

def login_test(request):
    state = "Ingreso de usuarios registrados:"
    current_date=datetime.datetime.now()
    #ua=request.META('HTTP_USER_AGENT', 'unknown')
    ip=request.META['REMOTE_ADDR']
    #user=request.user
    username = password = ''
    if request.POST:
        username = request.POST['username']
        password = request.POST['password']
        user = authenticate(username=username, password=password)
        if user is not None and user.is_active:
            login(request, user)
            state = "You're successfully logged in!"
            return render(request, 
'xxxxxxxx_xxxxxxx.html',{'username':username, 'password':password})
        else:
            state = "Su usuario ha sido desactivado!. Contacte al administrador 
del sitio para recuperar sus credenciales"
            return render_to_response('xxxxxx.html',locals())
    else:
        state = "Su usuario o contraseƱa son incorrectos! Contacte al 
administrador del sitio"
    return render_to_response('xxxxx.html',{'state':state, 'username': 
username,'current_date': current_date, 'ip': ip})

At dev when submit can reach app ok
At prod when submit reply is 500.html

Server: Apache, debian

<form action="/login/" method="post"> at html

Any comment would be great

Thanks

Ana


-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to