misagorequirements.py 619 B

1234567891011121314151617
  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. #MISAGO_DIR = os.path.join(os.path.dirname(__file__))
  7. APP_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
  8. MISAGO_DIR = os.path.dirname(APP_DIR)
  9. PROJECT_DIR = os.path.join(MISAGO_DIR, 'project_template')
  10. REQUIREMENTS_PATH = os.path.join(PROJECT_DIR, 'requirements.txt')
  11. with open(REQUIREMENTS_PATH, 'r') as resq:
  12. self.stdout.write(resq.read())