Re: Generic import

2008-02-11 Thread Malcolm Tredinnick
On Mon, 2008-02-11 at 04:30 -0600, James Bennett wrote: > On Feb 11, 2008 3:41 AM, Rozita <[EMAIL PROTECTED]> wrote: > > Can I test another way instead of moving my files? > > You can hack around with your Python import path (Google will teach > you what that means). > > But you really ought to

Re: Generic import

2008-02-11 Thread Rozita
Thanks a lot for your help. Appending the path to python import path worked!!! Thanks again. On Feb 11, 1:30 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Feb 11, 2008 3:41 AM, Rozita <[EMAIL PROTECTED]> wrote: > > > Can I test another way instead of moving my files? > > You can hack aroun

Re: Generic import

2008-02-11 Thread James Bennett
On Feb 11, 2008 3:41 AM, Rozita <[EMAIL PROTECTED]> wrote: > Can I test another way instead of moving my files? You can hack around with your Python import path (Google will teach you what that means). But you really ought to be developing apps that can live independently of a project folder.

Re: Generic import

2008-02-11 Thread Rozita
Thanks.This is a good solution but the last solution :-). I want to have the file structure hiararchy as it is now and I don't want to change it. In fact I want to have a folder named as mySite and two folder in it named as firstApp and secondApp and views.py and models.py files in these folders.

Re: Generic import

2008-02-11 Thread James Bennett
On Feb 11, 2008 3:33 AM, Rozita <[EMAIL PROTECTED]> wrote: > Is there any way that I can omit project name from import statements? Yes. Refactor your code so that the applications are no longer in the project folder, and put them directly on the Python import path instead. This is generally what

Generic import

2008-02-11 Thread Rozita
I want to know if there is a way to omit name of project from import statements. For example I have some imports in my views.py as below: from mySite.firstApp.models import Cls1 from mySite.secondApp.models import Cls2 and I want to change them to below: from firstApp.models import Cls1 from se