Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

magic-removal: Fixed #1296 (allow SlugFields longer than 50)

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 213b6a6905ad86f05a2217005b6c140660d3ff5f 1 parent 2f7c4d5
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/fields/__init__.py
View
2  django/db/models/fields/__init__.py
@@ -695,7 +695,7 @@ def get_manipulator_field_objs(self):
class SlugField(Field):
def __init__(self, *args, **kwargs):
- kwargs['maxlength'] = 50
+ kwargs['maxlength'] = kwargs.get('maxlength', 50)
kwargs.setdefault('validator_list', []).append(validators.isSlug)
# Set db_index=True unless it's been set manually.
if not kwargs.has_key('db_index'):
Please sign in to comment.
Something went wrong with that request. Please try again.