Django Console and custom settings

I have a settings module with a for production, and then my overrriding some settings.
This works fine for unit tests and for running django, but not for tasks nor for the Django console.

I tried the DJANGO_SETTINGS_MODULE environment:
>>> os.getenv("DJANGO_SETTINGS_MODULE","")

but it has no effect. It still tries to connect to the production server...
I notice in django_manage_shell, PYCHARM_DJANGO_MANAGE_MODULE is referenced, but I could not find any documentation.

How can I tell PyCharm to use settings.localmysql for and Django console?
Comment actions Permalink
Did you select the correct settings file in Settings | Django Support?
Comment actions Permalink
But I suspect the culprit:
settings\ should be settings.localmysql
That is not possible to enter though... :-(
Comment actions Permalink

I have the same issue here. I tried to set the DJANGO_SETTINGS_MODULE environment variable in the Django Console settings tab with no success. I assume something in does not respect this variable and the corresponding settings in the Django integration tab too.


Please sign in to leave a comment.