Fix #294 -- Blacklist for slug validation (#325)

* Fix #294 - blacklist for slug validation

* Fix #294 - blacklist for slug validation

* fix for failing test
This commit is contained in:
Christopher Dambamuromo
2016-11-21 10:57:52 +00:00
committed by Raphael Michel
parent 4820a8423f
commit 9662b956ed
5 changed files with 82 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ from django.utils.translation import ugettext_lazy as _
from pretix.base.models.base import LoggedModel
from pretix.base.settings import SettingsProxy
from pretix.base.validators import OrganizerSlugBlacklistValidator
from .auth import User
from .settings import OrganizerSetting
@@ -34,7 +35,8 @@ class Organizer(LoggedModel):
RegexValidator(
regex="^[a-zA-Z0-9.-]+$",
message=_("The slug may only contain letters, numbers, dots and dashes.")
)
),
OrganizerSlugBlacklistValidator()
],
verbose_name=_("Slug"),
)