mirror of
https://github.com/Superredstone/patrickcanal.it.git
synced 2026-09-20 09:41:14 +02:00
feat(portfolio): add company color
This commit is contained in:
@@ -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/'),
|
||||
),
|
||||
]
|
||||
@@ -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):
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<p class="text-primary mb-0">{{ je.start }} - {% if je.end %}{{ je.end }}{% else %}{% trans "today" %}{% endif %}</p>
|
||||
<h2 class="fs-2">{{ je.position }}</h2>
|
||||
<div>
|
||||
<div class="text-danger">{{ je.company.name }}</div>
|
||||
<div style="color: #{{ je.company.color }};">{{ je.company.name }}</div>
|
||||
<div class="text-secondary">{{ je.company.location }}</div>
|
||||
<div class="mt-2 text-white">
|
||||
{% for jt in je.job_tasks.all %}
|
||||
|
||||
Reference in New Issue
Block a user