~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to pybb/management/pybb_notifications.py

  • Committer: Holger Rapp
  • Date: 2009-02-20 12:25:18 UTC
  • Revision ID: holgerrapp@gmx.net-20090220122518-feaq34ta973snnct
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
from django.utils.translation import ugettext_noop as _
3
 
 
4
 
try:
5
 
    from notification import models as notification
6
 
 
7
 
    def create_notice_types(sender, **kwargs):
8
 
        print("Creating noticetypes for pybb ...")
9
 
        notification.create_notice_type('forum_new_topic',
10
 
                                        _('Forum New Topic'),
11
 
                                        _('a new topic has been added to the forum'),
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'))
16
 
except ImportError:
17
 
    print 'Skipping creation of NoticeTypes as notification app not found'