1. indifex
  2. transifex


Andreas Loupasakis  committed 524a611

txstatsrefresh command has been setup to correctly register addon handlers.

- Now we trigger autodiscover on Command class initialization, before the command
starts running.

  • Participants
  • Parent commits f7623c4
  • Branches default

Comments (0)

Files changed (1)

File transifex/projects/management/commands/txstatsrefresh.py

View file
  • Ignore whitespace
 from optparse import make_option, OptionParser
 from django.core.exceptions import ObjectDoesNotExist
 from django.core.management.base import LabelCommand, CommandError
+from django_addons.autodiscover import autodiscover
 from projects.models import Project, Component
 _HELP_TEXT = """Refresh translation statistics of registered components.
     # Validation is called explicitly each time the server is reloaded.
     requires_model_validation = False
+    def __init__(self):
+        autodiscover()
+        super(Command, self)
     def handle(self, *comps, **options):
         """Override default method to make it work without arguments."""
         _continue = options.get('continue')