X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/a9eef437702d5df7a2f97010e6798c689371808c..052a64d5a899eea7f0d86b42951bc410fba2ed3e:/forum/management/__init__.py diff --git a/forum/management/__init__.py b/forum/management/__init__.py index 8266592..49ad8d5 100644 --- a/forum/management/__init__.py +++ b/forum/management/__init__.py @@ -1,3 +1,13 @@ -from forum.modules import get_modules_script - +from forum.modules import get_modules_script +from django.db.models.signals import post_syncdb +import forum.models + +def setup_badges(sender, **kwargs): + from forum.badges import ALL_BADGES + + for badge in ALL_BADGES: + badge.install() + +post_syncdb.connect(setup_badges, sender=forum.models) + get_modules_script('management') \ No newline at end of file