mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
unify album name length
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from io import BytesIO
|
||||
from typing import Self
|
||||
from typing import ClassVar, Self
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.cache import cache
|
||||
@ -203,6 +203,20 @@ class SASAlbumManager(models.Manager):
|
||||
|
||||
|
||||
class Album(SasFile):
|
||||
NAME_MAX_LENGTH: ClassVar[int] = 50
|
||||
"""Maximum length of an album's name.
|
||||
|
||||
[SithFile][core.models.SithFile] have a maximum length
|
||||
of 256 characters.
|
||||
However, this limit is too high for albums.
|
||||
Names longer than 50 characters are harder to read
|
||||
and harder to display on the SAS page.
|
||||
|
||||
It is to be noted, though, that this does not
|
||||
add or modify any db behaviour.
|
||||
It's just a constant to be used in views and forms.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
proxy = True
|
||||
|
||||
|
Reference in New Issue
Block a user