Skip to content

Commit

Permalink
Allow numbers in blog titles
Browse files Browse the repository at this point in the history
  • Loading branch information
diemuzi committed Jan 13, 2020
1 parent 72d1b00 commit 1a5f8ce
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions diemuzi/blog/migrations/0003_auto_20200113_1417.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 3.0.2 on 2020-01-13 20:17

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('blog', '0002_auto_20200105_1719'),
]

operations = [
migrations.AlterField(
model_name='blog',
name='name',
field=models.CharField(help_text='Name of the blog.', max_length=255, validators=[django.core.validators.RegexValidator("^[a-zA-Z0-9 .'-]+$")], verbose_name='Name'),
),
]
2 changes: 1 addition & 1 deletion diemuzi/blog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Blog(models.Model):
name = models.CharField(
max_length=255,
validators=[
validators.RegexValidator('^[a-zA-Z .\'-]+$')
validators.RegexValidator('^[a-zA-Z0-9 .\'-]+$')
],
verbose_name=_('Name'),
blank=False,
Expand Down

0 comments on commit 1a5f8ce

Please sign in to comment.