Loading django/contrib/auth/migrations/0002_alter_permission_name_max_length.py 0 → 100644 +19 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.AlterField( model_name='permission', name='name', field=models.CharField(max_length=255, verbose_name='name'), ), ] django/contrib/auth/models.py +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ class Permission(models.Model): Three basic permissions -- add, change and delete -- are automatically created for each Django model. """ name = models.CharField(_('name'), max_length=50) name = models.CharField(_('name'), max_length=255) content_type = models.ForeignKey(ContentType) codename = models.CharField(_('codename'), max_length=100) objects = PermissionManager() Loading django/contrib/auth/tests/test_management.py +2 −2 Original line number Diff line number Diff line Loading @@ -503,8 +503,8 @@ class PermissionTestCase(TestCase): permission_content_type = ContentType.objects.get_by_natural_key('auth', 'permission') models.Permission.objects.filter(content_type=permission_content_type).delete() models.Permission._meta.verbose_name = "some ridiculously long verbose name that is out of control" models.Permission._meta.verbose_name = "some ridiculously long verbose name that is out of control" * 5 six.assertRaisesRegex(self, exceptions.ValidationError, "The verbose_name of permission is longer than 39 characters", "The verbose_name of permission is longer than 244 characters", create_permissions, auth_app_config, verbosity=0) docs/releases/1.8.txt +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ Minor features * :class:`~django.contrib.auth.forms.PasswordResetForm` now has a method :meth:`~django.contrib.auth.forms.PasswordResetForm.send_email` that can be overridden to customize the mail to be sent. * The ``max_length`` of :attr:`Permission.name <django.contrib.auth.models.Permission.name>` has been increased from 50 to 255 characters. Please run the database migration. :mod:`django.contrib.formtools` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Loading Loading
django/contrib/auth/migrations/0002_alter_permission_name_max_length.py 0 → 100644 +19 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.AlterField( model_name='permission', name='name', field=models.CharField(max_length=255, verbose_name='name'), ), ]
django/contrib/auth/models.py +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ class Permission(models.Model): Three basic permissions -- add, change and delete -- are automatically created for each Django model. """ name = models.CharField(_('name'), max_length=50) name = models.CharField(_('name'), max_length=255) content_type = models.ForeignKey(ContentType) codename = models.CharField(_('codename'), max_length=100) objects = PermissionManager() Loading
django/contrib/auth/tests/test_management.py +2 −2 Original line number Diff line number Diff line Loading @@ -503,8 +503,8 @@ class PermissionTestCase(TestCase): permission_content_type = ContentType.objects.get_by_natural_key('auth', 'permission') models.Permission.objects.filter(content_type=permission_content_type).delete() models.Permission._meta.verbose_name = "some ridiculously long verbose name that is out of control" models.Permission._meta.verbose_name = "some ridiculously long verbose name that is out of control" * 5 six.assertRaisesRegex(self, exceptions.ValidationError, "The verbose_name of permission is longer than 39 characters", "The verbose_name of permission is longer than 244 characters", create_permissions, auth_app_config, verbosity=0)
docs/releases/1.8.txt +3 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ Minor features * :class:`~django.contrib.auth.forms.PasswordResetForm` now has a method :meth:`~django.contrib.auth.forms.PasswordResetForm.send_email` that can be overridden to customize the mail to be sent. * The ``max_length`` of :attr:`Permission.name <django.contrib.auth.models.Permission.name>` has been increased from 50 to 255 characters. Please run the database migration. :mod:`django.contrib.formtools` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Loading