webcomm wrote:
[Please don't top-post ... I've moved your answer down]
> On Nov 16, 1:01 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>> webcomm wrote:
>>> Maybe I'm starting to get the idea... can apps be installed anywhere,
>>> as long as they are on the python path?  Are there any restrictions at
>>> all with respect to where apps are installed?
>> You've got it. There are no restriction (by Django) on where apps are
>> installed, as long as their base directories end up on sys.path[].
>>
>> Some apps have their own templates with them (typically extending some
>> notional basic template called "base.html", some apps expect you to
>> provide templates.
>>
>> In the former case you can pick them up by having
>>
>> 'django.template.loaders.app_directories.load_template_source'
>>
>> in your settings.TEMPLATE_LOADERS, in the latter case you can put the
>> templates pretty much wherever you want.
>>
> Hmm.  I've created several apps using the startapp command, but I
> don't see any references to those apps when I print sys.path.
>
> Does something happen behind the scenes when I use the startapp
> command that isn't visible when I print sys.path?  If so, why not run
> the startapp command for all apps?  For example, to install the
> tagging app, I could create an app called "tagging" with startapp.
> Then I could replace the contents of that directory with the tagging
> app I download from code.google.com.  Would that work?
>
Well, startapp just creates a directory suitable for use a local app.

You are running manage.py to start the test server. Python by default
puts the directory containing the program you run at the start of
sys.path. You will notice that all the apps you installed contain an
__init__.py file, which means they are packages. and can be imported
from the directory containing them (which is also the directory
containing manage.py). So the mere act of running manage.py ensures that
all your app packages can be loaded.

But they can also be loaded from any other directory on sys.path ...

regards
 Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to