Made company description optional

This commit is contained in:
eeintech 2021-04-08 13:24:17 -04:00
parent 0bb2507dd6
commit f8d1ee8805
3 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.0.7 on 2021-04-08 17:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('company', '0034_supplierpart_update'),
]
operations = [
migrations.AlterField(
model_name='company',
name='description',
field=models.CharField(blank=True, help_text='Description of the company', max_length=500, verbose_name='Company description'),
),
]

View File

@ -97,7 +97,7 @@ class Company(models.Model):
help_text=_('Company name'),
verbose_name=_('Company name'))
description = models.CharField(max_length=500, verbose_name=_('Company description'), help_text=_('Description of the company'))
description = models.CharField(max_length=500, blank=True, verbose_name=_('Company description'), help_text=_('Description of the company'))
website = models.URLField(blank=True, verbose_name=_('Website'), help_text=_('Company website URL'))

View File

@ -21,11 +21,13 @@
<td>{% trans "Company Name" %}</td>
<td>{{ company.name }}</td>
</tr>
{% if company.description %}
<tr>
<td><span class='fas fa-info'></span></td>
<td>{% trans "Description" %}</td>
<td>{{ company.description }}</td>
</tr>
{% endif %}
<tr>
<td><span class='fas fa-globe'></span></td>
<td>{% trans "Website" %}</td>