我需要检查是否Model.objects.filter(...)
出现了任何东西,但不需要插入任何东西。到目前为止,我的代码是:
user_pass = log_in(request.POST) # form class
if user_pass.is_valid():
cleaned_info = user_pass.cleaned_data
user_object = User.objects.filter(email = cleaned_info['username'])