diff --git a/portfolio/migrations/0004_company_color_alter_company_logo.py b/portfolio/migrations/0004_company_color_alter_company_logo.py new file mode 100644 index 0000000..d8e341f --- /dev/null +++ b/portfolio/migrations/0004_company_color_alter_company_logo.py @@ -0,0 +1,23 @@ +# Generated by Django 6.1.1 on 2026-09-15 17:48 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('portfolio', '0003_project_alter_jobtask_job'), + ] + + operations = [ + migrations.AddField( + model_name='company', + name='color', + field=models.CharField(default='000000', max_length=6, verbose_name='Color (hex)'), + ), + migrations.AlterField( + model_name='company', + name='logo', + field=models.FileField(upload_to='portfolio/companies_logo/'), + ), + ] diff --git a/portfolio/models.py b/portfolio/models.py index f839a0a..fab38c9 100644 --- a/portfolio/models.py +++ b/portfolio/models.py @@ -9,6 +9,13 @@ class Company(models.Model): location = models.CharField( verbose_name=_("Location"), max_length=255, blank=False, null=False ) + color = models.CharField( + verbose_name=_("Color (hex)"), + max_length=6, + null=False, + blank=False, + default="000000", + ) logo = models.FileField(upload_to="portfolio/companies_logo/") def __str__(self): diff --git a/portfolio/templates/index.html b/portfolio/templates/index.html index 16a214e..39309fd 100644 --- a/portfolio/templates/index.html +++ b/portfolio/templates/index.html @@ -97,7 +97,7 @@

{{ je.start }} - {% if je.end %}{{ je.end }}{% else %}{% trans "today" %}{% endif %}

{{ je.position }}

-
{{ je.company.name }}
+
{{ je.company.name }}
{{ je.company.location }}
{% for jt in je.job_tasks.all %}