mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Replace occurrences of "blacklist" with "banlist" (#1434)
* Rename blacklist to banlist * Rename more cases of blacklist to banlist * Rename Blacklist -> Banlist in migrations
This commit is contained in:
@@ -4,13 +4,13 @@ from django.utils.deconstruct import deconstructible
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
class BlacklistValidator:
|
||||
class BanlistValidator:
|
||||
|
||||
blacklist = []
|
||||
banlist = []
|
||||
|
||||
def __call__(self, value):
|
||||
# Validation logic
|
||||
if value in self.blacklist:
|
||||
if value in self.banlist:
|
||||
raise ValidationError(
|
||||
_('This field has an invalid value: %(value)s.'),
|
||||
code='invalid',
|
||||
@@ -19,9 +19,9 @@ class BlacklistValidator:
|
||||
|
||||
|
||||
@deconstructible
|
||||
class EventSlugBlacklistValidator(BlacklistValidator):
|
||||
class EventSlugBanlistValidator(BanlistValidator):
|
||||
|
||||
blacklist = [
|
||||
banlist = [
|
||||
'download',
|
||||
'healthcheck',
|
||||
'locale',
|
||||
@@ -39,9 +39,9 @@ class EventSlugBlacklistValidator(BlacklistValidator):
|
||||
|
||||
|
||||
@deconstructible
|
||||
class OrganizerSlugBlacklistValidator(BlacklistValidator):
|
||||
class OrganizerSlugBanlistValidator(BanlistValidator):
|
||||
|
||||
blacklist = [
|
||||
banlist = [
|
||||
'download',
|
||||
'healthcheck',
|
||||
'locale',
|
||||
@@ -60,8 +60,8 @@ class OrganizerSlugBlacklistValidator(BlacklistValidator):
|
||||
|
||||
|
||||
@deconstructible
|
||||
class EmailBlacklistValidator(BlacklistValidator):
|
||||
class EmailBanlistValidator(BanlistValidator):
|
||||
|
||||
blacklist = [
|
||||
banlist = [
|
||||
settings.PRETIX_EMAIL_NONE_VALUE,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user