Commit 980575dc authored by Lucas Serrano's avatar Lucas Serrano

[printer] Affiche le nom des statut plutôt que le numéro

parent f0d91cfa
......@@ -14,7 +14,7 @@
</div>
<div class="six columns">
<label>Statut :</label>
{{ printer.status }}
<span class="{% if printer.status == 5 %}bad-thing{% endif %}">{{ printer.get_status_display }}</span>
</div>
</div>
......
......@@ -6,9 +6,11 @@ from snimpy.manager import load
class Printer(models.Model):
STATUS_CHOICES = (
('???', 1),
('running', 2),
('warning', 3),
(1, '1???'),
(2, 'running'),
(3, 'warning'),
(4, '4???'),
(5, 'down'),
)
name = models.CharField(max_length=255, editable=False)
domain_name = models.CharField(max_length=255, unique=True)
......
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