On Feb 17, 11:04 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2007-02-17 at 20:51 -0800, kbochert wrote:
> > On a deployed django site, what url does Django use when scanning
> > urls.py when user browses towww.mysite.com ?
>
> > When I access my (non-django) site with
> >  www.mysite.com
> > my host serves up the file that i see as   html/index.html
>
> Only if your webserver is configured to serve up that file in response
> to requests for the root of the URL heirarchy. This isn't a compulsory
> thing.

That is what my host happens to do. Does that give me any clue as to
what urls Django will see?

>
> > If  the polls tutorial is deployed to my host, does the mapping in
> > urls.py work?
>
> > urls.py has a line:
> >     (r'^polls/$', 'mysite.polls.views.index'),
> > which i think means that  "www.mysite.com/polls" will get the index
> > page, but "www.mysite.com" will fail
>
> That's correct.
>
>
>
> > Shouldn't urls.py have something like
> >  (r'^index.html$' , 'mysite.polls.views.index' ),
>
> > or perhaps:
> >  (r'^$' , 'mysite.polls.views.index' ),
>
> > or perhaps (in my case)
> >  (r'^html/index.html$' , 'mysite.polls.views.index' ),
>
> > or will this vary with my host??
>
> It will very much vary on a per-host basis. Django code may not be
> responsible for serving all of the URLs for a particular site, for
> example. Somewhere in the web server's configuration (regardless of
> which web server is being used), there will be a setting that says
> "everything under this part of the URL tree gets passed off to that
> Django process over there for processing". Different parts of the URL
> tree may be passed off to different Django instances. So whether Django
> is responsible for serving a response towww.mysite.com/depends on the
> configuration of your site.
>
Do you mean the configuration of my site, or my host's configuration
of the server?

Do I need to talk to my host to find this out, and then have different
url.py
files for development  and deployment?

I.E., how do I design and test a url.py which will work on my host?





--~--~---------~--~----~------------~-------~--~----~
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