~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wiki/management.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
from django.db.models import signals
 
2
 
 
3
from django.utils.translation import ugettext_noop as _
 
4
 
 
5
try:
 
6
    from notification import models as notification
 
7
 
 
8
    def create_notice_types(app, created_models, verbosity, **kwargs):
 
9
        notification.create_notice_type("wiki_article_edited",
 
10
                                        _("Article Edited"),
 
11
                                        _("your article has been edited"))
 
12
        notification.create_notice_type("wiki_revision_reverted",
 
13
                                        _("Article Revision Reverted"),
 
14
                                        _("your revision has been reverted"))
 
15
        notification.create_notice_type("wiki_observed_article_changed",
 
16
                                        _("Observed Article Changed"),
 
17
                                        _("an article you observe has changed"))
 
18
 
 
19
 
 
20
    signals.post_syncdb.connect(create_notice_types,
 
21
                                sender=notification)
 
22
except ImportError:
 
23
    print "Skipping creation of NoticeTypes as notification app not found"