elpy icon indicating copy to clipboard operation
elpy copied to clipboard

Use a decent default for django settings path

Open galaunay opened this issue 6 years ago • 2 comments

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):

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

galaunay avatar Aug 06 '19 16:08 galaunay

@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 ?

galaunay avatar Aug 06 '19 16:08 galaunay

Coverage Status

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

coveralls avatar Aug 06 '19 16:08 coveralls