Hi, After developing my app, i want to serve it from apache. Apache & mod_python work but my app doesn't behave like it should. Probably a urls.py error? I searched the archive but haven't been able to solve it.
It seems to find my settings (judging from the params displayed on the error page) but it can't find my views so something must be wrong with my urls.py I only use gema/urls.py not gema/main/urls.py When i copied the tutorial dir over, after some tweaking, that worked. Again a hint that my urls.py is wrong I can get it to work (almost perfect, only http://gema fails) when i copy settings.py, manage.py, urls.py to the dir above (D:\sitesdjango). Also, the admin part (http://gema/admin) always works. App root: D:\sitesdjango Gema app root: D:\sitesdjango\gema Gema Media D:\sitesdjango\gema\media setting.py, urls.py, manage.py in D:\sitesdjango\gema http://gema/admin/ works http://gema/ returns a Page not found (404), http://gema/patient/lijst/ returns a ViewDoesNotExist Any ideas ViewDoesNotExist on http://gema/patient/lijst/: ================================== ViewDoesNotExist at /patient/lijst/ Could not import gema.main.views. Error was: No module named settings Request Method: GET Request URL: http://gema/patient/lijst/ Exception Type: ViewDoesNotExist Exception Value: Could not import gema.main.views. Error was: No module named settings Exception Location: C:\Python24\Lib\site-packages\django\core\urlresolvers.py in _get_callback, line 127 excerpt from httpd-vhosts.conf ====================== <VirtualHost *> ServerName gema DocumentRoot D:/sitesdjango/gema DirectoryIndex index.html index.htm ErrorLog logs/gema-error.log CustomLog logs/gema-access.log common TransferLog logs/gema_access.log SetEnv DJANGO_SETTINGS_MODULE gema.settings SetHandler mod_python PythonHandler django.core.handlers.modpython PythonPath "[r'D:\sitesdjango'] + sys.path" PythonDebug On Alias /media "D:/sitesdjango/gema/media" <Location "/media/"> SetHandler None </Location> </VirtualHost> excerpt from urls.py ============== urlpatterns = patterns('', (r'^gema_media/(.*)$', 'django.views.static.serve', {'document_root': 'D:/sitesdjango/gema/media', 'show_indexes': True}), (r'^admin/', include('django.contrib.admin.urls')), # Index (r'^/$', 'gema.main.views.index'), # Patient (r'^patient/lijst/$', 'gema.main.views.patient_lijst', dict(type="lijst") ), (r'^patient/ontslag/$', 'gema.main.views.patient_lijst', dict(type="ontslag") ), ) excerpt from settings.py ================= MEDIA_ROOT = "D:/sitesdjango/gema/media" MEDIA_URL = "/gema_media/" APP_BASE = "D:/sitesdjango/gema/" ADMIN_MEDIA_PREFIX = '/media/' ROOT_URLCONF = 'gema.urls' TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. "D:/sitesdjango/templates/gema", "D:/sitesdjango/templates", ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'gema.main', ) As said before, going to http://gema/ returns an 404 page not found Page not found (404) Request Method: GET Request URL: http://gema/ Using the URLconf defined in gema.urls, Django tried these URL patterns, in this order: 1. ^gema_media/(.*)$ 2. ^admin/ 3. ^/$ 4. ^patient/etiket/$ 5. ^patient/opname/$ Thanks, Benedict --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---