# This code needs to be in management.py from django.contrib.auth import models as auth_models # Related ticket http://code.djangoproject.com/ticket/4748 def alter_django_auth_permissions(sender, **kwargs): if not auth_models.Permission in kwargs['created_models']: return SIZE_NAME=128 cursor=connection.cursor() cursor.execute("SELECT * FROM auth_permission LIMIT 1") for desc in cursor.description: # See http://www.python.org/dev/peps/pep-0249/ name, type_code, display_size, internal_size, precision, scale, null_ok = desc if not name=='name': continue if internal_size