Skip to content

Commit 4f0cf22

Browse files
author
student
committed
fixed imagefield
1 parent 8495987 commit 4f0cf22

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

media/alemenor.webp

35.7 KB
Loading
178 KB
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.24 on 2025-10-03 07:38
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("user", "0001_initial"),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name="user",
15+
name="profile_picture",
16+
field=models.ImageField(blank=True, null=True, upload_to=""),
17+
),
18+
]

user/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class User(AbstractUser):
2828
first_name = models.CharField(max_length=20, blank=False, null=False)
2929
last_name = models.CharField(max_length=20, blank=False, null=False)
3030
email = models.EmailField(unique=True)
31-
profile_picture = models.URLField(blank=True, null=True)
31+
profile_picture = models.ImageField(upload_to='profiles',blank=True, null=True)
3232
ROLE = [
3333
('recycler', 'Recycler'),
3434
('buyer', 'Buyer'),

0 commit comments

Comments
 (0)