Skip to content

Commit

Permalink
feat: add workplace to teacher model (#14)
Browse files Browse the repository at this point in the history
* feat: Teacher Workplace field

* migrations

* fix: resolve comment
  • Loading branch information
azare242 authored Nov 23, 2023
1 parent d020562 commit 3b67abf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions backend/backend_api/migrations/0046_teacher_workplace.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.4 on 2023-11-23 09:02

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("backend_api", "0045_teacher_workplace_logo"),
]

operations = [
migrations.AddField(
model_name="teacher",
name="workplace",
field=models.CharField(blank=True, max_length=255),
),
]
3 changes: 2 additions & 1 deletion backend/backend_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ class Teacher(models.Model):
name = models.CharField(max_length=SMALL_MAX_LENGTH)
pic = models.ImageField(blank=True)
workplace_logo = models.ImageField(blank=True)
workplace = models.CharField(max_length=SMALL_MAX_LENGTH, blank=True)
cv_path = models.CharField(max_length=511, blank=True, default="")
bio = models.CharField(max_length=BIG_MAX_LENGTH)
order = models.SmallIntegerField(default=0)
year = models.IntegerField(blank=False, default=2020)

def __str__(self):
return f"Teacher with id {self.id}: {self.name}"

Expand Down

0 comments on commit 3b67abf

Please sign in to comment.