~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to pybb/management/pybb_notifications.py

  • Committer: franku
  • Date: 2016-12-13 18:28:51 UTC
  • mto: This revision was merged to the branch mainline in revision 443.
  • Revision ID: somal@arcor.de-20161213182851-bo5ebf8pdvw5beua
run the script

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
    from notification import models as notification
7
7
 
8
8
    def create_notice_types(app, created_models, verbosity, **kwargs):
9
 
        notification.create_notice_type("forum_new_topic",
10
 
                                        _("Forum New Topic"),
11
 
                                        _("a new topic has been added to the forum"),
 
9
        notification.create_notice_type('forum_new_topic',
 
10
                                        _('Forum New Topic'),
 
11
                                        _('a new topic has been added to the forum'),
12
12
                                        default=1)
13
 
        notification.create_notice_type("forum_new_post",
14
 
                                        _("Forum New Post"),
15
 
                                        _("a new comment has been posted to a topic you observe"))
 
13
        notification.create_notice_type('forum_new_post',
 
14
                                        _('Forum New Post'),
 
15
                                        _('a new comment has been posted to a topic you observe'))
16
16
 
17
17
    signals.post_syncdb.connect(create_notice_types,
18
18
                                sender=notification)
19
19
except ImportError:
20
 
    print "Skipping creation of NoticeTypes as notification app not found"
 
20
    print 'Skipping creation of NoticeTypes as notification app not found'