~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wiki/apps.py

  • Committer: franku
  • Date: 2018-04-03 06:34:54 UTC
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: somal@arcor.de-20180403063454-yjy6pkwkhrx8nw81
added apps.py; post_migrate not working though

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from django.apps import AppConfig
 
2
from django.db.models import signals
 
3
 
 
4
 
 
5
class WikiConfig(AppConfig):
 
6
    
 
7
    name = 'wiki'
 
8
    verbose_name = 'The widelands wiki'
 
9
    
 
10
    def ready(self):
 
11
        from wiki.management import create_notice_types
 
12
        from notification import models as notification
 
13
        print("trying to ")
 
14
        signals.post_migrate.connect(create_notice_types, sender=notification)