You were right, Django didn't see any URLs in the URLconf file because
I wasn't using the right one.  I had another site also called
'testproject' in a different directory (deleted now).  So I was using
views.py and settings.py in the /web/django directory, but the urls.py
from a totally different one.  It was subtle, and I'm glad I caught it
sooner than later.  All is working fine now with this urls.py when
accessing http://localhost:8080/testproject/time

from django.conf.urls.defaults import *
from testproject.views import current_datetime

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    (r'^time/$', current_datetime),
    # Example:
    # (r'^testproject/', include('testproject.foo.urls')),

    # Uncomment the admin/doc line below and add
'django.contrib.admindocs'
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # (r'^admin/(.*)', admin.site.root),
)

Thanks again.

On Nov 16, 6:31 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-11-16 at 17:41 -0800, Adam Yee wrote:
>
> [...]
>
> Good debugging info snipped.
>
> > When enteringhttp://localhost:8080/testproject/timeI'm reading this
> > in the Apache error log:
>
> > [Sun Nov 16 17:27:37 2008] [info] mod_wsgi (pid=1768): Create
> > interpreter 'ADAMYEE.gateway.2wire.net:8080|/testproject'.
> > [Sun Nov 16 17:27:37 2008] [info] [client 127.0.0.1] mod_wsgi
> > (pid=1768, process='', application='ADAMYEE.gateway.2wire.net:8080|/
> > testproject'): Loading WSGI script 'C:/web/django/apache/django.wsgi'.
>
> >http://localhost:8080/testproject/timejust brings up 'It worked!'
>
> So the good news is that this means Django is handling the request and
> not exploding, since "it worked" is produced by Django. Which means your
> webserver configuration is correct (or at least very close to correct).
> You're not seeing an error saying something like "Apache doesn't know
> anything about Django".
>
> > Notice how it shows the process as just /testproject and not /
> > testproject/time.
>
> That's correct. The web server hands everything off to what you've
> called "testproject" and Django handles the rest of the stuff.
>
> What's interesting here is that it doesn't redirect to testproject/time/
> (with a trailing slash). Which means Django thinks your URL Conf file is
> empty. Did you just change it and save it without telling Apache to
> reload/restart, so it hasn't picked up the changes, perhaps?
>
> I can't immediately see anything wrong with the setup information you've
> posted, so it's something subtle (or I'm going blind in my old age,
> which is also a candidate).
>
> 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