Commit 7e22c0ae authored by Émile's avatar Émile Committed by Élie Bouttier

information de contact pour chaque type de service

parent 2e88ea11
......@@ -570,7 +570,7 @@ class TunnelAdmin(admin.ModelAdmin):
class ServiceTypeAdmin(admin.ModelAdmin):
fields = ('name',)
fields = ('name', 'contact')
def get_actions(self, request):
actions = super().get_actions(request)
......
# Generated by Django 2.0.2 on 2018-06-02 11:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('services', '0050_auto_20180216_0016'),
]
operations = [
migrations.AlterModelOptions(
name='route',
options={'ordering': ['name']},
),
migrations.AddField(
model_name='servicetype',
name='contact',
field=models.CharField(blank=True, default='', max_length=64, verbose_name='Contact en cas de problème'),
),
]
......@@ -130,6 +130,7 @@ class IPResource(models.Model):
class ServiceType(models.Model):
name = models.CharField(max_length=64, verbose_name='Nom', unique=True)
contact = models.CharField(max_length=64, verbose_name='Contact en cas de problème', blank=True, default='')
class Meta:
ordering = ['name']
......
......@@ -41,6 +41,9 @@
{% endfor %}
</p>
{% endif %}
{% if service.service_type.contact %}
<p>En cas de problème, contactez {{ service.service_type.contact }}.</p>
{% endif %}
</div>
</div>
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment