Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added the create_notice_type wrapper in models

In the docs it is advised to use create_notice_type to create a new NoticeType object. But this function was absent. Although it is possible to create a new NoticeType using the 'create' function of the class, this addition makes the code follow the docs and compatible with previous code and other apps.
  • Loading branch information...
commit 73176ecaba0e6ba926ef18420daf526efbdefb1e 1 parent 309aea4
Bastien authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 notification/models.py
View
4 notification/models.py
@@ -24,6 +24,10 @@ class LanguageStoreNotAvailable(Exception):
pass
+def create_notice_type(label, display, description, **kwargs):
+ NoticeType.create(label, display, description, **kwargs)
+
+
class NoticeType(models.Model):
label = models.CharField(_("label"), max_length=40)
Please sign in to comment.
Something went wrong with that request. Please try again.