On Apr 14, 11:04 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 4/15/07, mtrier <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm new to Django and working my way through the tutorials.  At the
> > end of Tutorial 3 there is an explanation about how to copy the
> > urls.py file to the polls directory and replace the urls in the site
> > directory with an include.  What confuses me about this is that I
> > still must reference my application urls with the mysite designation.
> > If this application is decoupled and I move it into another site
> > called foo, will I not need to change my patterns statement from
> > 'mysite.polls.views' to 'foo.polls.views'?  Here is the current code
> > in polls/urls.py
>
> > urlpatterns = patterns('mysite.polls.views',
>
> Although the pattern references 'mysite.polls.views' which includes a
> reference to the 'mysite' project, you need to keep in mind that this
> string is just an indication of where Django can import the 'polls'
> application.
>
> By default, Django will put a new application as a subdirectory of a
> given project. However, there is nothing stopping you from moving an
> application to a project-neutral location (e.g., into a local
> repository of applications, or even into site-packages). As long as
> Python can import the named module using the provided name, you can
> put the application module anywhere you want on your system.

Thanks so much. I'm sure it will become clearer as I get into it.

Michael


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [EMAIL PROTECTED]
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