I was setting up Django-Notification for a project, and I was trying to create notice types like it mentions on their wiki . Their wiki says that you should add the following code to your management.py file in your app.
fromdjango.conf importsettings
fromdjango.db.models importsignals
fromdjango.utils.translation importugettext_noop as_
if“notification”insettings.INSTALLED_APPS:fromnotification importmodels asnotification
defcreate_notice_types(app,created_models,verbosity,*kwargs):notification.create_notice_type(“friends_invite”,_(“Invitation Received”),_(“you have received an invitation”))notification.create_notice_type(“friends_accept”,_(“Acceptance Received”),_(“an invitation you sent has been accepted”))signals.post_syncdb.connect(create_notice_types,sender=notification)else:print“Skipping creation of NoticeTypes as notification app not found”
Read more