예제 #1
0
def main():
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'localshop.settings')
    os.environ.setdefault('DJANGO_CONFIGURATION', 'Localshop')

    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)
예제 #2
0
def main():
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "beehve.settings")
    os.environ.setdefault("DJANGO_CONFIGURATION", "Dev")

    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)
예제 #3
0
파일: cli.py 프로젝트: ribozz/cratis
def cratis_cmd():
    """
    Command that executes django ./manage.py task + adds cratis wrapping things
    """

    os.environ.setdefault("CRATIS_APP_PATH", os.getcwd())
    os.environ.setdefault('DJANGO_CONFIGURATION', 'Dev')

    load_env()

    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)
예제 #4
0
    def handle(self, *args, **options):
        if len(args) == 0:
            _args = ["manage.py", "test", "users", "concepts", "orgs", "oclapi", "sources", "collection", "mappings"]
        else:
            _args = ["manage.py", "test"]

        for item in args:
            print("Appending argument: {0}".format(item))
            _args.append(item)

        if options["failfast"]:
            _args.append("--failfast")

        execute_from_command_line(_args)
예제 #5
0
    def run(self):
        if self.distribution.install_requires:
            self.distribution.fetch_build_eggs(
                self.distribution.install_requires)
        if self.distribution.tests_require:
            self.distribution.fetch_build_eggs(self.distribution.tests_require)

        for env_name, env_value in self.extra_env.items():
            os.environ[env_name] = str(env_value)

        this_dir = os.getcwd()
        testproj_dir = os.path.join(this_dir, 'localshop')
        os.chdir(testproj_dir)
        sys.path.append(testproj_dir)

        os.environ['DJANGO_SETTINGS_MODULE'] = os.environ.get(
            'DJANGO_SETTINGS_MODULE', 'localshop.settings')
        os.environ['DJANGO_CONFIGURATION'] = os.environ.get(
            'DJANGO_CONFIGURATION', 'Localshop')

        from configurations.management import execute_from_command_line
        execute_from_command_line([__file__, 'test'])
예제 #6
0
#!/usr/bin/env python
import os
import sys

import dotenv


if __name__ == '__main__':
    # Load a .env file
    dotenv.load_dotenv(dotenv.find_dotenv())

    # Set up configuration modules
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
    configuration_name = os.getenv('ENVIRONMENT', 'Development')
    os.environ.setdefault('DJANGO_CONFIGURATION', configuration_name)

    # Call the Django command
    from configurations.management import execute_from_command_line
    execute_from_command_line(sys.argv)
예제 #7
0
#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault('DJANGO_SETTINGS_MODULE',
                          '{{ project_name }}.settings')
    os.environ.setdefault('DJANGO_CONFIGURATION', 'Dev')

    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)
예제 #8
0
def run():
    from configurations.management import execute_from_command_line
    execute_from_command_line(sys.argv)
예제 #9
0
파일: manage.py 프로젝트: cageyv/otus_web
def main():
    os.environ.setdefault('DJANGO_SETTINGS_MODULE',
                          'coursera_webpack.settings')
    os.environ.setdefault('DJANGO_CONFIGURATION', 'Dev')
    from configurations.management import execute_from_command_line
    execute_from_command_line(sys.argv)
예제 #10
0
def main():
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings')
    os.environ.setdefault('DJANGO_CONFIGURATION', 'Test')
    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)
예제 #11
0
def run():
    from configurations.management import execute_from_command_line

    execute_from_command_line(sys.argv)
예제 #12
0
# -*- coding: utf-8 -*-
import os
import sys

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
    os.environ['DJANGO_CONFIGURATION'] = "Testing"

    from configurations.management import execute_from_command_line

    args = ['manage.py', 'test'] + sys.argv[1:]
    execute_from_command_line(args)