Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   [python] django User.objects.filter (https://forum.antichat.xyz/showthread.php?t=159745)

optimazer 28.11.2009 16:58

[python] django User.objects.filter
 
Код:

from django.contrib.auth.models import User

def MailChecking( request ):
  if User.objects.filter(email=request.POST['email']).count() != 0 :
    return HttpResponse('-1')
  return HttpResponse('0')

def LoginChecking( request ):
  if User.objects.filter(username = request.POST['login']).count() != 0 :
    return HttpResponse('-1')
  return HttpResponse('0')

странно не работают две функции не пойму почему

при этом пост-параметры валидны и не пусты

почему?


Время: 17:01