diff options
Diffstat (limited to 'django/db/models/fields/__init__.py')
| -rw-r--r-- | django/db/models/fields/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 8fe1c9e4e4..022de52134 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -25,6 +25,18 @@ from django.utils.encoding import smart_text, force_text, force_bytes from django.utils.ipv6 import clean_ipv6_address from django.utils import six +# Avoid "TypeError: Item in ``from list'' not a string" -- unicode_literals +# makes these strings unicode +__all__ = [str(x) for x in ( + 'AutoField', 'BLANK_CHOICE_DASH', 'BigIntegerField', 'BinaryField', + 'BooleanField', 'CharField', 'CommaSeparatedIntegerField', 'DateField', + 'DateTimeField', 'DecimalField', 'EmailField', 'Empty', 'Field', + 'FieldDoesNotExist', 'FilePathField', 'FloatField', + 'GenericIPAddressField', 'IPAddressField', 'IntegerField', 'NOT_PROVIDED', + 'NullBooleanField', 'PositiveIntegerField', 'PositiveSmallIntegerField', + 'SlugField', 'SmallIntegerField', 'TextField', 'TimeField', 'URLField', +)] + class Empty(object): pass |
