misagorequirements.py 557 B

12345678910111213141516
  1. import os
  2. from django.core.management.base import BaseCommand
  3. class Command(BaseCommand):
  4. help = 'Shows requirements.txt for current Misago version'
  5. def handle(self, *args, **options):
  6. APP_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
  7. MISAGO_DIR = os.path.dirname(APP_DIR)
  8. PROJECT_DIR = os.path.join(MISAGO_DIR, 'project_template')
  9. REQUIREMENTS_PATH = os.path.join(PROJECT_DIR, 'requirements.txt')
  10. with open(REQUIREMENTS_PATH, 'r') as resq:
  11. self.stdout.write(resq.read())