Browse Source

fix max length user account

master
mortezaei 9 months ago
parent
commit
c475b58f45
  1. 18
      apps/account/migrations/0004_alter_user_avatar.py
  2. 2
      apps/account/models/user.py

18
apps/account/migrations/0004_alter_user_avatar.py

@ -0,0 +1,18 @@
# Generated by Django 5.1.8 on 2025-09-02 18:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0003_locationhistory'),
]
operations = [
migrations.AlterField(
model_name='user',
name='avatar',
field=models.ImageField(blank=True, max_length=512, null=True, upload_to='users/avatars/%Y/%m/'),
),
]

2
apps/account/models/user.py

@ -33,7 +33,7 @@ class User(AbstractUser):
fullname = models.CharField(max_length=255, verbose_name="Full Name", help_text="Enter the full name of the user.", null=True, blank=True)
birthdate = models.DateField(verbose_name=_('birthdate'), null=True, blank=True)
avatar = models.ImageField(null=True, blank=True, upload_to='users/avatars/%Y/%m/')
avatar = models.ImageField(max_length=512, null=True, blank=True, upload_to='users/avatars/%Y/%m/')
phone_number = PhoneNumberField(
validators=[validate_possible_number],
null=True,

Loading…
Cancel
Save