Re: [Pydev-users] Setting up Eclipse pydev on existing django projects
Brought to you by:
fabioz
From: Fabio Z. <fa...@gm...> - 2016-01-12 09:55:09
|
On Mon, Jan 11, 2016 at 10:59 PM, Gary Roach <gar...@ve...> wrote: > Hi all; > > My first post to this site. Hope I don't screw it up. > > I am working on an archiving project for an organization. To facilitate > the learning process, I have set up multiple virtual environments using > pyvenv. I was using Ninja-ide but found it wanting (no development or > bug fixing). I have switched over to Eclipse with the PyDev plugin. > > System: > Debian Stretch (9 ?) > Kde desktop > Python 3.4 (In venv) > Django 1.8 (In venv) > Eclipse Mars.1 > > One venv is being used for my project, another is used for the mysite > tutorial and third was being used for Tango With Django. I quit the > third because of problems using Django 1.7 and Python 2.7. > > I have the original files in /root/MySiteHowto and /root/UUArchive. Both > these projects work but I got bogged down because of IDE problems. > The project structures are standard layouts. If you need this info the > easiest way is to look at the djangoproject.com documentation. > > I wish to change the projects to /home/gary/workspace/(mysite and > UUArchive) and put them under Eclipse project control. > > I have tried several times to transpose the mysite project but with poor > results. I get tangled up in the virtual environment and the project > preferences. > > I can't believe that I am the first person to encounter this problem. A > cook book method would be really nice but all help will be appreciated. > > Gary R > Hi Gary, I haven't understood very well how you structured things... can you push that to GitHub so that I can take a look at the structure? As for the virtualenvs, which libraries you have in each virtualenv? If you're getting tangled up in the virtualenvs, my initial suggestion would be just keeping a single virtualenv with the libraries for all the projects you need and use that as the interpreter in PyDev and then or each project create a new pydev project pointing to existing sources initially without any PYTHONPATH configured and then configure the project source folders (i.e.: folders to be added to the PYTHONPATH: http://www.pydev.org/manual_101_project_conf2.html) and to finish, set the project as a Django Project in PyDev (right-click project > PyDev > Set as Django Project). By doing so, you should be able to right-click the project > run as > pydev: django (and things as code-completion, etc should be working). If you still have problems, pointing to github with your project contents would help a lot (don't forget to commit the .project and the .pydevproject files so that I can actually inspect how you configured things there). Best Regards, Fabio |