diff --git a/musician/templates/musician/dashboard.html b/musician/templates/musician/dashboard.html
index 90c8811..c6de4e3 100644
--- a/musician/templates/musician/dashboard.html
+++ b/musician/templates/musician/dashboard.html
@@ -62,9 +62,9 @@
{{ domain.mails|length }} {% trans "mail addresses created" %}
- {% if domain.address_left.alert %}
+ {% if domain.address_left.alert_level %}
- {{ domain.address_left.count }} mail address left
+ {{ domain.address_left.count }} mail address left
{% endif %}
diff --git a/musician/views.py b/musician/views.py
index bbff6a0..e96fa24 100644
--- a/musician/views.py
+++ b/musician/views.py
@@ -66,16 +66,16 @@ class DashboardView(CustomContextMixin, UserTokenRequiredMixin, TemplateView):
# TODO(@slamora): validate concept of limits with Pangea
profile_type = context['profile'].type
for domain in domains:
- address_left = ALLOWED_RESOURCES[profile_type]['mailbox'] - len(domain.mails)
- alert = None
- if address_left == 1:
- alert = 'warning'
- elif address_left < 1:
- alert = 'danger'
+ addresses_left = ALLOWED_RESOURCES[profile_type]['mailbox'] - len(domain.mails)
+ alert_level = None
+ if addresses_left == 1:
+ alert_level = 'warning'
+ elif addresses_left < 1:
+ alert_level = 'danger'
- domain.address_left = {
- 'count': address_left,
- 'alert': alert,
+ domain.addresses_left = {
+ 'count': addresses_left,
+ 'alert_level': alert_level,
}
context.update({