Add public profile to user model
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0.8 on 2024-09-06 23:46
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='customuser',
|
||||
name='public_profile',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
@@ -6,6 +6,7 @@ from django_resized import ResizedImageField
|
||||
class CustomUser(AbstractUser):
|
||||
profile_pic = ResizedImageField(force_format="WEBP", quality=75, null=True, blank=True, upload_to='profile-pics/')
|
||||
uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)
|
||||
public_profile = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return self.username
|
||||
Reference in New Issue
Block a user