|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
from django.core import validators
|
|
|
|
|
from django.utils import six
|
|
|
|
|
from django.utils.deconstruct import deconstructible
|
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
|
|
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
@ -13,7 +12,8 @@ class CallUsernameValidator(validators.RegexValidator):
|
|
|
|
|
'Enter a valid Callsign as Username, ALL UPPERCASE, if needed with -1 / -2,'
|
|
|
|
|
'e.g. DL7BST, DN1BER-1, DL/OE1FOO.'
|
|
|
|
|
)
|
|
|
|
|
flags = re.ASCII if six.PY3 else 0
|
|
|
|
|
flags = re.ASCII
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@deconstructible
|
|
|
|
|
class CallLogValidator(validators.RegexValidator):
|
|
|
|
@ -22,4 +22,4 @@ class CallLogValidator(validators.RegexValidator):
|
|
|
|
|
'Enter a valid callsign, ALL UPPERCASE, if needed with -1 / -2,'
|
|
|
|
|
'e.g. DL7BST, DN1BER-1, DL/OE1FOO, DN1FTW-1/p'
|
|
|
|
|
)
|
|
|
|
|
flags = re.ASCII if six.PY3 else 0
|
|
|
|
|
flags = re.ASCII
|
|
|
|
|