Skip to content

Commit

Permalink
Added the category field in the Artist model
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenshiv committed Dec 7, 2023
1 parent 44659dc commit 1c72e0b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
Binary file modified backend/artistsmgmt/__pycache__/models.cpython-310.pyc
Binary file not shown.
Binary file modified backend/artistsmgmt/__pycache__/serializers.cpython-310.pyc
Binary file not shown.
18 changes: 18 additions & 0 deletions backend/artistsmgmt/migrations/0005_artist_category.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.7 on 2023-12-07 03:27

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('artistsmgmt', '0004_artist_photo_artist_profession'),
]

operations = [
migrations.AddField(
model_name='artist',
name='category',
field=models.CharField(choices=[('', 'Select Category'), ('visual artists', 'Visual Artists'), ('performing artists', 'Performing Artists'), ('literary artists', 'Literary Artists'), ('fashion artists', 'Fashion Artists')], default='', max_length=100),
),
]
Binary file not shown.
11 changes: 11 additions & 0 deletions backend/artistsmgmt/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@

class Artist(AbstractUser):
# Any additional fields or methods for the User model

CATEGORY_CHOICES = [
('', 'Select Category'),
('visual artists', 'Visual Artists'),
('performing artists', 'Performing Artists'),
('literary artists', 'Literary Artists'),
('fashion artists', 'Fashion Artists'),
]

profession = models.CharField(max_length=100, null=True, blank=True)
photo = models.ImageField(
upload_to='profile_photos/', null=True, blank=True)
category = models.CharField(
max_length=100, choices=CATEGORY_CHOICES, default='')
pass

class Meta:
Expand Down

0 comments on commit 1c72e0b

Please sign in to comment.