Skip to content

Commit

Permalink
Add run server IDE command
Browse files Browse the repository at this point in the history
  • Loading branch information
kdsuneraavinash committed Sep 16, 2023
1 parent b7f06cc commit a677307
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .run/Run Server.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Server" type="Python.DjangoServer" factoryName="Django server">
<module name="django-api-template" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
<env name="DJANGO_SETTINGS_MODULE" value="config.settings" />
</envs>
<option name="SDK_HOME" value="$USER_HOME$/.virtualenvs/django-api-template/bin/python" />
<option name="SDK_NAME" value="Python 3.11 (django-api-template)" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="launchJavascriptDebuger" value="false" />
<option name="port" value="8001" />
<option name="host" value="" />
<option name="additionalOptions" value="" />
<option name="browserUrl" value="" />
<option name="runTestServer" value="false" />
<option name="runNoReload" value="false" />
<option name="useCustomRunCommand" value="false" />
<option name="customRunCommand" value="runserver_plus" />
<method v="2" />
</configuration>
</component>
4 changes: 2 additions & 2 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
CONSTANCE_CONFIG: OrderedDict = OrderedDict()

# ---------------------------------------------------------- Django Toolbar --------------------------------------------
USE_DEBUG_TOOLBAR = env.bool("USE_DEBUG_TOOLBAR", default=True)
USE_DEBUG_TOOLBAR = env.bool("USE_DEBUG_TOOLBAR", default=DEBUG)
if USE_DEBUG_TOOLBAR:
INSTALLED_APPS += ["debug_toolbar"]
INTERNAL_IPS = ["127.0.0.1", "localhost"]
Expand Down Expand Up @@ -352,6 +352,6 @@
)

# ---------------------------------------------------------- Django Extensions -----------------------------------------
USE_DJANGO_EXTENSIONS = env.bool("USE_DJANGO_EXTENSIONS", default=False)
USE_DJANGO_EXTENSIONS = env.bool("USE_DJANGO_EXTENSIONS", default=DEBUG)
if USE_DJANGO_EXTENSIONS:
INSTALLED_APPS += ["django_extensions"]

0 comments on commit a677307

Please sign in to comment.