Using Eclipse with an existing Satchmo shop-- help please!

61 views
Skip to first unread message

Nick Mellor

unread,
Jul 25, 2012, 8:47:04 PM7/25/12
to Satchmo users
Hi all,

I'm working on my first Satchmo shop and having a spot of trouble with
Eclipse.

Django 1.4, Satchmo re-installed last week, Eclipse 3.7.2 with pydev
2.5. Ubuntu 12.04.

(1) I generate the shop ("shop") using clonesatchmo.py. All is well, I
can get the shop home page using the development server

(2) When I try to mark folder "shop" as a Django project in Eclipse
(using instructions at http://vaboone.wordpress.com/2010/11/22/import-a-django-project-into-eclipse/)
the Satchmo shop no longer works. I get the "Congratulations...get to
work!" Django page as if there's a newly-created Django project with
no code. Eclipse/Pydev have written a new project over "shop" and now
pay attention only to their own, newly-created "shop/shop/settings.py"
file. I want Eclipse to notice and use my existing "shop/settings.py"
file

(3) If I now say, ok, you win, I'll copy my settings files to "shop/
shop" python manage.py runserver complains that there's no module
named "localsite." And I can't run python manage.py runserver from
shop/shop either-- "'manage.py': [Errno 2] no such file or directory"

(4) No major worries to undo the damage. I make a copy of my shop,
delete the original shop, run clonesatchmo.py again. This resets all
the pointers which is great. Now Satchmo can find itself again.
I copy back in my settings.py and local_settings.py and delete the
unwanted shop/shop folder including the new settings.py

(4) But now Eclipse complains that there's no shop.settings resource.
It's clearly missing shop/shop/settings.py which I've got rid of.

Can anyone tell me my mistake? How can I get Satchmo and Pydev/Eclipse
to talk to each other?

Thanks for any help,

Nick

Orion Vianna

unread,
Aug 5, 2012, 4:16:14 PM8/5/12
to satchm...@googlegroups.com
Hi Nick,

On 07/25/2012 08:47 PM, Nick Mellor wrote:
> Django 1.4, Satchmo re-installed last week, Eclipse 3.7.2 with pydev
> 2.5. Ubuntu 12.04.

I'm using the same versions.

> (2) When I try to mark folder "shop" as a Django project in Eclipse
> (using instructions at http://vaboone.wordpress.com/2010/11/22/import-a-django-project-into-eclipse/)
> the Satchmo shop no longer works. I get the "Congratulations...get to
> work!" Django page as if there's a newly-created Django project with
> no code. Eclipse/Pydev have written a new project over "shop" and now
> pay attention only to their own, newly-created "shop/shop/settings.py"
> file. I want Eclipse to notice and use my existing "shop/settings.py"
> file

I think you are supposed to import a project instead of creating a new
django project. Go to file > import then select the version control
system you are using or just the folder where the source is. The project
should show up on project explorer. Right click on the project name and
enable as a pydev project and then again as a django project.

> (4) But now Eclipse complains that there's no shop.settings resource.
> It's clearly missing shop/shop/settings.py which I've got rid of.

Right click the project name and go to properties and try some different
"PyDev - Django" settings, maybe shop.settings? Try it even if it says
that the module could not be found.
If you are using virtualenv you will need to go to "Pydev -
Interpreter/Grammar" in that same properties window and "click here to
configure an interpreter not listed" to use the virtualenv site-packages
python path.

I will be in the IRC channel today and may be able to answer more
questions...

Good luck.
Orion

Nick Mellor

unread,
Sep 2, 2012, 6:53:00 PM9/2/12
to satchm...@googlegroups.com
Hi Orion,

Many thanks for the help. I've since moved to Pycharm and a different PC but I'll bear this in mind.

Thanks,

Nick
Reply all
Reply to author
Forward
0 new messages