Enabling cloudcms.context_processors.application in CONTEXT_PROCESSROS setting
let you can access the application object throughout the html templates.
"""
+
+ MESSAGE_TYPE_CHOICES = (
+ ('NM','No Message'),
+ ('success','Success'),
+ ('error','Error'),
+ ('warning','Warning'),
+ ('info','Info'),
+ )
+
+
code = models.CharField('Identifier', max_length=100, null=False, blank=False,
help_text="Just a codename of the application, to be used in "\
"several places where no free text is allowed"\
footer_top = models.TextField(default="", blank=True)
footer_bottom = models.TextField(default="", blank=True)
+ message_type = models.CharField(max_length=20,
+ choices= MESSAGE_TYPE_CHOICES,
+ default = 'NM' )
+ custom_message = models.TextField(default="", blank=True)
+
@classmethod
def current(cls):
return cls.objects.get(site__pk=settings.SITE_ID)