这并非始终是这一法典的空白,而是最新的。 看来是随机的,任何想法?
try:
u = User.objects.get(email__iexact=useremail)
except User.DoesNotExist:
...
Throws this error, randomly.
File "/srv/myapp/registration/models.py", line 23, in get_or_create_user
u = User.objects.get(email__iexact=useremail)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 349, in get
% self.model._meta.object_name)
TypeError: ‘DoesNotExist’ object is not callable