summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Allen <flipper@peregrinesalon.com>2018-11-14 15:13:34 -0500
committerTim Graham <timograham@gmail.com>2018-11-14 15:13:34 -0500
commite81955401885a93a459bcc130642b6ea5bf4ba4d (patch)
tree96024c343e3b927d037c3e167bb87a10cc13e293
parent6d4e5feb79f7eabe8a0c7c4b87f25b1a7f87ca0b (diff)
Fixed #29939 -- Increased Group.name max_length to 150 characters.
-rw-r--r--django/contrib/auth/migrations/0010_alter_group_name_max_length.py16
-rw-r--r--django/contrib/auth/models.py2
-rw-r--r--docs/ref/contrib/auth.txt8
-rw-r--r--docs/releases/2.2.txt2
4 files changed, 25 insertions, 3 deletions
diff --git a/django/contrib/auth/migrations/0010_alter_group_name_max_length.py b/django/contrib/auth/migrations/0010_alter_group_name_max_length.py
new file mode 100644
index 0000000000..67ea0610ca
--- /dev/null
+++ b/django/contrib/auth/migrations/0010_alter_group_name_max_length.py
@@ -0,0 +1,16 @@
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('auth', '0009_alter_user_last_name_max_length'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='group',
+ name='name',
+ field=models.CharField(max_length=150, unique=True, verbose_name='name'),
+ ),
+ ]
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
index 6603fbafb8..a144589804 100644
--- a/django/contrib/auth/models.py
+++ b/django/contrib/auth/models.py
@@ -108,7 +108,7 @@ class Group(models.Model):
members-only portion of your site, or sending them members-only email
messages.
"""
- name = models.CharField(_('name'), max_length=80, unique=True)
+ name = models.CharField(_('name'), max_length=150, unique=True)
permissions = models.ManyToManyField(
Permission,
verbose_name=_('permissions'),
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
index 2f45dec574..5e40aa7fc2 100644
--- a/docs/ref/contrib/auth.txt
+++ b/docs/ref/contrib/auth.txt
@@ -382,8 +382,12 @@ Fields
.. attribute:: name
- Required. 80 characters or fewer. Any characters are permitted. Example:
- ``'Awesome Users'``.
+ Required. 150 characters or fewer. Any characters are permitted.
+ Example: ``'Awesome Users'``.
+
+ .. versionchanged:: 2.2
+
+ The ``max_length`` increased from 80 to 150 characters.
.. attribute:: permissions
diff --git a/docs/releases/2.2.txt b/docs/releases/2.2.txt
index a8bd9ab488..d00e2fe6f9 100644
--- a/docs/releases/2.2.txt
+++ b/docs/releases/2.2.txt
@@ -384,6 +384,8 @@ Miscellaneous
renders ``<option>`` values of ``unknown``, ``true``, and ``false`` instead
of ``1``, ``2``, and ``3``. For backwards compatibility, the old values are
still accepted as data.
+* :attr:`Group.name <django.contrib.auth.models.Group.name>` ``max_length``
+ is increased from 80 to 150 characters.
.. _deprecated-features-2.2: