mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
Added DATABASE_URL & CELERY_BROKER_URL (when selected) to the django console startup script of pycharm. Fixes #1766.
This commit is contained in:
parent
ea00f656da
commit
9e10eb7ae5
14
{{cookiecutter.project_slug}}/.idea/workspace.xml
Normal file
14
{{cookiecutter.project_slug}}/.idea/workspace.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
{%- if cookiecutter.use_celery == 'y' %}
|
||||
<component name="DjangoConsoleOptions"
|
||||
custom-start-script="import sys; print('Python %s on %s' % (sys.version, sys.platform)) import django; print('Django %s' % django.get_version()) import os os.environ.setdefault("DATABASE_URL","postgres://{}:{}@{}:{}/{}".format(os.environ['POSTGRES_USER'], os.environ['POSTGRES_PASSWORD'], os.environ['POSTGRES_HOST'], os.environ['POSTGRES_PORT'], os.environ['POSTGRES_DB'])) os.environ.setdefault("CELERY_BROKER_URL", os.environ['REDIS_URL']) sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) if 'setup' in dir(django): django.setup() import django_manage_shell; django_manage_shell.run(PROJECT_ROOT)"
|
||||
module-name="{{ cookiecutter.project_slug }}" is-module-sdk="true">
|
||||
</component>
|
||||
{%- else %}
|
||||
<component name="DjangoConsoleOptions"
|
||||
custom-start-script="import sys; print('Python %s on %s' % (sys.version, sys.platform)) import django; print('Django %s' % django.get_version()) import os os.environ.setdefault("DATABASE_URL","postgres://{}:{}@{}:{}/{}".format(os.environ['POSTGRES_USER'], os.environ['POSTGRES_PASSWORD'], os.environ['POSTGRES_HOST'], os.environ['POSTGRES_PORT'], os.environ['POSTGRES_DB'])) sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) if 'setup' in dir(django): django.setup() import django_manage_shell; django_manage_shell.run(PROJECT_ROOT)"
|
||||
module-name="{{ cookiecutter.project_slug }}" is-module-sdk="true">
|
||||
</component>
|
||||
{%- endif %}
|
||||
</project>
|
Loading…
Reference in New Issue
Block a user