initmisago.py 569 B

123456789101112131415
  1. from django.core.management import call_command
  2. from django.core.management.base import BaseCommand, CommandError
  3. class Command(BaseCommand):
  4. """
  5. Builds Misago database from scratch
  6. """
  7. help = 'Install Misago to database'
  8. def handle(self, *args, **options):
  9. self.stdout.write('\nInstalling Misago to database...')
  10. call_command('syncdb')
  11. call_command('migrate')
  12. call_command('syncfixtures')
  13. self.stdout.write('\nInstallation complete! Don\'t forget to run adduser to create first admin!\n')