Wednesday, December 30, 2015

Re: Migrate django project to eclipse/pydev ide

On 30/12/15 02:00 PM, Gary Roach wrote:
On 12/22/2015 04:53 PM, Clifford Ilkay wrote:
On 22/12/15 07:05 PM, Andrew Farrell wrote:
Could you also tell us:
1) Why you need to switch to Eclipse specifically rather than PyCharmSublimeText, or (the one I use) Atom?

Andrew, there are things Eclipse does that those three editors don't do. For example, the Mylyn plugin and how it integrates Eclipse with Trac is unparalleled. I also find debugging with Eclipse to be quite good for the odd time that I need to step through code as opposed to prototyping in iPython.

Gary, move your existing project to some directory outside of wherever your default workspace is and create a new Django PyDev project with the same name as your existing project. Look inside the directory that got created and you'll see a couple of hidden files, .project and .pydevproject. Move those somewhere safe, delete the new project directory, move the existing project directory to the default workspace, and move the hidden files to the project directory.

You can also import an existing project.

As for virtualenv or venv, all you have to do is go to the project properties, select "PyDev - Interpreter/Grammar", "Click here to configure an interpreter not listed." and add the Python binary for your venv.
Thanks for the help. I am still a little confused about venv. Since I lock the interpreter to the specific copy of python in the virtual environment for a specific project, do I still have to activate and deactivate venv on the command line or can I ignore this step.

As long as you've done the "Click here to configure an interpreter not listed." noted above, you don't have to activate/deactivate the venv at a shell. All you're doing with activate/deactivate is changing $PYTHONPATH on that particular shell.

Regards,

Clifford Ilkay

+1 647-778-8696

No comments:

Post a Comment