2

i have a simple question, but i've not found any solution, neither in the docs nor the web...

How do i properly setup a source-files for Django-Project inside intellij-idea python-plugin? I'm wondering if i should "mark" the folders containing my settings.py and my app-code "blue" so that intellij treats them as source-files?

Project-Setup screenshot

Intellij seems to behave differently in Package-View and in sourcecode-completion when importing things.

Which is the correct setting?

4
  • Marking the directories as Sources is not required. What specific problems do you have with completion? Commented Jun 5, 2013 at 7:49
  • for example: when i add these directories as sourcefolders, completion suggests the following line to import a Class from views.py into settings.py (stupid example; just to show imports from different packages): from views import ViewClass when disabling directories as sources it suggests the following (which looks correct for me, but i wasn't sure): from testApplication.views import ViewClass Commented Jun 5, 2013 at 12:06
  • Configuring directories as Sources adds them to the PYTHONPATH explicitly. Commented Jun 5, 2013 at 12:11
  • That clarifies things!!! Submit as answer and i'll accept Commented Jun 5, 2013 at 12:23

1 Answer 1

3

Marking directories as Sources is not required. The effect is that the directory is added to PYTHONPATH.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.