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 to www.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.

> 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 to www.mysite.com/ depends on the
configuration of your site.

Regards,
Malcolm


> 
> 
> > 
> 


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