Re: Proper way of importing projects modules

2009-09-11 Thread Filip Gruszczyński
Thanks for your answers, I'll try to choose a solution that suits our needs best :-) 2009/9/10 Andrew Gwozdziewycz : > > This whole discussion is pretty much what virtualenv solves > http://pypi.python.org/pypi/virtualenv > > Basically, for each package that you wanna reuse,

Re: Proper way of importing projects modules

2009-09-10 Thread Andrew Gwozdziewycz
This whole discussion is pretty much what virtualenv solves http://pypi.python.org/pypi/virtualenv Basically, for each package that you wanna reuse, install it into the virtualenv for the project your working on. It works great. On Sep 10, 2:00 pm, Brian Jones wrote: > Well,

Re: Proper way of importing projects modules

2009-09-10 Thread Brian Jones
Well, it's not a solution you'd use in a larger team environment, because it causes confusion, but if you're just trying to put off the renaming issue (which really isn't that hard - what's wrong with that solution?), you can just create a symbolic link to the directory on your PYTHONPATH instead

Re: Proper way of importing projects modules

2009-09-10 Thread Filip Gruszczyński
> Your choice. I prefer the first method. Changing the imports isn't > terribly difficult (global find and replace) for the few times the > project folder gets renamed. Unless of course, you are using distributed source control and want to have seperate repo for every larger feature. Then it

Re: Proper way of importing projects modules

2009-09-10 Thread Tim
Well there are really two options I think. The first option is how you were doing it: from project_folder.app_name.models import SomeModel You also found out the problem with this method. If you rename project_folder, you have to change all the imports in your project. The other option is to

Proper way of importing projects modules

2009-09-10 Thread Filip Gruszczyński
I would like to ask, what is the blessed way of importing different modules inside django project. Until this moment I have used something like this: from ..models import SomeModel However, this is no good for me. When I changed name of the directory holding the project (I have created branch