Skip to content

Use a decent default for django settings path #1630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

galaunay
Copy link
Collaborator

@galaunay galaunay commented Aug 6, 2019

PR Summary

When using Django, Elpy needs the user to set the environment variable DJANGO_SETTINGS_MODULE to know where the setting file is.
This can be cumbersome, as the user will have to change this environment variable every time he switches projects.

With this PR, Elpy will use the default setting path (gathered from manage.py) if DJANGO_SETTINGS_MODULE is not set.

PR checklist

Please make sure that the following things have been addressed (and check the relevant checkboxes):

  • Commits respect our guidelines
  • Tests are passing properly (see here on how to run Elpy's tests)

@galaunay
Copy link
Collaborator Author

galaunay commented Aug 6, 2019

@gopar, I tried to make Django slightly easier to use in Elpy with this PR.
But don't use Django a lot, so I am not sure I did it right...
Could you give me you opinion ?

@coveralls
Copy link

coveralls commented Aug 6, 2019

Coverage Status

Coverage remained the same at 92.145% when pulling a7b47f3 on galaunay:Fix1629 into 7e8181d on jorgenschaefer:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants