I'm a new user to Django, hi everyone. My system: Windows XP Python 2.5 Apache 2.2 >>configured for mod_wsgi MySQL, MySQLdb #Irrelevant at this point
My issue: Having trouble getting the through the first example. Basically, when directing the browser to '.../time/' I'm still at the 'It worked!' beginning page. I haven't been able to bring up the view with current_datetime. Some things you might ask to know: - For Apache: WSGIScriptAlias /testproject "C:/web/django/apache/django.wsgi" <Directory "C:/web/django/apache"> Order allow,deny Allow from all </Directory> - For my app: ## django.wsgi import os, sys sys.path.append('C:/web/django') os.environ['DJANGO_SETTINGS_MODULE'] = 'testproject.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() ## views.py 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) ## urls.py 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'^testproject/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), ) When entering http://localhost:8080/testproject/time I'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/time just brings up 'It worked!' Notice how it shows the process as just /testproject and not / testproject/time. Is this supposed to be that way? Is there something I'm missing in the 'testproject.settings.py' that is preventing me from seeing the /time URL? I think everything is setup correctly. I've spent a little time looking for an issue related to this, but couldn't find a post. Does anybody have any suggestions? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---