Skip to content

Commit dac8276

Browse files
committed
Set slug max length to 63
A valid DNS label can contain up to 63 characters Closes readthedocs#2600
1 parent bc248aa commit dac8276

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

readthedocs/projects/models.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ class Project(models.Model):
8181
users = models.ManyToManyField(User, verbose_name=_('User'),
8282
related_name='projects')
8383
name = models.CharField(_('Name'), max_length=255)
84-
slug = models.SlugField(_('Slug'), max_length=255, unique=True)
84+
# A DNS label can contain up to 63 characters.
85+
slug = models.SlugField(_('Slug'), max_length=63, unique=True)
8586
description = models.TextField(_('Description'), blank=True,
8687
help_text=_('The reStructuredText '
8788
'description of the project'))

0 commit comments

Comments
 (0)