On Mon, 2006-02-27 at 00:29 +0100, gabor wrote: > Max Battcher wrote: > > gabor wrote: > >> i actually got around this problem by adding the project-dir to the > >> PYTHONPATH, but it seems a little as a hack... > > > > I'd have to disagree. I don't think it's a hack at all, as far as I'm > > concerned it makes sense if you think of the project directory as a > > "library namespace" > > i see... > my problem is then maybe... a phylosophical one.. > how to explain.. > > i have a bad feeling when i'm doing something differently than the > official tutorial :) > it makes me feel that i'm doing it not the django way :) > > > or to formulate it differently: > > why is the tutorial doing it the way it does? > wouldn't it make more sense to do it the project-dir-on-pythonpath way?
Take the wider view: both methods are possible. Which way is more appropriate? Well that depends upon circumstances. It's not really a question of making more or less sense, since there are pros and cons of both methods (trivial transplanting versus ease of creation, for example). The Django tutorial (tutorial01.txt) mentions that applications are just packages on the Python path (at the start of the section called "Creating Models") and that the way it demonstrates is a convenience path that lets the developer focus on creating applications rather than directory structures. For applications that are intended to be redistributed, the separate directory structure makes a lot of sense: have a look at http://code.djangoproject.com/wiki/DosAndDontsForApplicationWriters Not every application is going to be redistributed -- or at least initially envisioned as redistributable -- and using the separate directory structure adds some complexity, so using this system as the default is not as clear as win as you might think at the moment. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---