~widelands-dev/widelands-website/django_staticfiles

11 by Holger Rapp
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages)
1
from django.utils.translation import ugettext_noop as _
2
3
try:
4
    from notification import models as notification
5
6
    def create_notice_types(sender, **kwargs):
489.1.3 by franku
fixed creation of noticetypes -> convert post_syncdb to post_migrate
7
        print("Creating noticetypes for wiki ...")
8
        notification.create_notice_type('wiki_revision_reverted',
438.1.6 by franku
run the script
9
                                        _('Article Revision Reverted'),
10
                                        _('your revision has been reverted'))
11
        notification.create_notice_type('wiki_observed_article_changed',
12
                                        _('Observed Article Changed'),
13
                                        _('an article you observe has changed'))
14
11 by Holger Rapp
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages)
15
except ImportError:
16
    print 'Skipping creation of NoticeTypes as notification app not found'
438.1.6 by franku
run the script
17