mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-07-25 15:03:22 +00:00

This PR performs the following changes: - update python in Dockerfile - updates all python libraries (including Django) - makes md5sum calculation redundant by default - updates Postgresql used in Docker. For new installations this is ok. For existing ones this is backwards incompatible, and restore through pg_dump+pg_restore has to be performed in order to utilize Postgres 17 (since its not compatible with previous versions and will complain) - fixes issues with HLS, and adds test to ensure they won't happen again - allows . and @ in usernames
16 lines
436 B
Python
16 lines
436 B
Python
import re
|
|
|
|
from django.core import validators
|
|
from django.utils.deconstruct import deconstructible
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
|
|
@deconstructible
|
|
class ASCIIUsernameValidator(validators.RegexValidator):
|
|
regex = r"^[\w.@]+$"
|
|
message = _("Enter a valid username. This value may contain only " "English letters and numbers")
|
|
flags = re.ASCII
|
|
|
|
|
|
custom_username_validators = [ASCIIUsernameValidator()]
|