pp upload: size limit in django settings

This commit is contained in:
AdrienLSH
2024-02-08 08:54:13 +01:00
parent f910dc5a5b
commit c94cc41343
3 changed files with 9 additions and 3 deletions

View File

@ -14,7 +14,7 @@ def upload_to(instance, filename: str):
# Create your models here.
class ProfileModel(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
avatar_url = models.ImageField(upload_to=upload_to, default="./profiles/static/avatars/default.avif") #blank=True, null=True)
avatar_url = models.ImageField(upload_to=upload_to, default="./profiles/static/avatars/default.avif")
def get_game(self) -> int:
for game in game_manager._game_list: