So, I added this to the urlpatterns var: (r'^$', 'mysite.polls.views.current_datetime'),
...and this to views.py located in the polls directory from django.http import HttpResponse import datetime def current_datetime(request): now = datetime.datetime.now() html = "<html><body>It is now %s.</body></html>" % now return HttpResponse(html) When I open a browser and go to http://www.mysite.com I wind up in the mysite.com directory on my Dreamhost server, rather than the url being mapped to the django site located at /home/username/projects/mysite. Thanks, Jason On Nov 3, 4:10 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I understand the mapping of urls.py but I guess I'm not clear on a few > > things to begin with, like what is the equivalent to an index.html > > page in django? I know that the system works off of a template system > > like using "base.html" as the design skeleton for a site and extending > > that system with calls to different views, but what happens when I > > want to just request the index page for a django site? Let's say I > > register and add a subdomain to my Dreamhost account say... > > mysite.com, when I issue the startproject command as django-admin.py > > startproject mysite is there some sort of connection between the two? > > Do I scrap the Dreamhost generated directory "mysite.com" and the > > actual command I should be issuing is django-admin.py startproject > > mysite.COM? What is returned for an index page if there is no > > ndex.html or index.php? > > Your site's root page is whatever is mapped to r"^$", the empty URL. > > It's the same for directories. If you *want* to map something on to > .../something.html you can, but there is no need to. When a > "directory-like URL" is passed by a browser the returned result is > whatever is generated by the view the the URL is mapped to. Or a 404 if > no such mapping can be found. > > regards > Steve --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---