Collection/item uid: allow base64-url not just base62.

This commit is contained in:
Tom Hacohen
2020-06-24 10:48:47 +03:00
parent 2da49bb95e
commit 1bed39af9d
2 changed files with 20 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ from django.utils.crypto import get_random_string
Base64Url256BitlValidator = RegexValidator(regex=r'^[a-zA-Z0-9\-_]{42,43}$', message='Expected a base64url.')
UidValidator = RegexValidator(regex=r'^[a-zA-Z0-9]*$', message='Not a valid UID')
UidValidator = RegexValidator(regex=r'^[a-zA-Z0-9\-_]*$', message='Not a valid UID')
class Collection(models.Model):