Create EmailConfirmNotification class
"""Project notifications"""
from __future__ import absolute_import
-from readthedocs.notifications import Notification
+
+from django.utils.translation import ugettext_lazy as _
+from messages_extends.constants import ERROR_PERSISTENT
+
+from readthedocs.notifications import Notification, SiteNotification
from readthedocs.notifications.constants import REQUIREMENT
@@ -11,3 +15,12 @@ class ResourceUsageNotification(Notification):
context_object_name = 'project'
subject = 'Builds for {{ project.name }} are using too many resources'
level = REQUIREMENT
+
+
+class EmailConfirmNotification(SiteNotification):
+
+ failure_level = ERROR_PERSISTENT
+ failure_message = _(
+ 'Add/Verify your primary email address. '
+ 'Click <a href="{% url "account_email" %}">here</a>.'
+ )
