Solved. This was due to a missing directory under django/templates. On May 26, 3:04 pm, octopusgrabbus <old_road_f...@verizon.net> wrote: > There is a lot of detail for this question, so I'll summarize. I have > two Django projects, each running on a different virtual site and > using a separate wsgi_handler. The first works fine, including logging > in. The second one fails with TemplateDoesNotExist registration/ > login.html, but I can reach the first page. > > It would help me to get suggestions on troubleshooting this, given the > first Django project can log in fine. The second Django project is > being built, and I pretty much built its login the same way. The > environments are configured identically except with differences in > paths, project names, and so on. > > Here are the details. In both projects login is a directory under the > project, in the first project amr and the second project webdev_proj. > The first project's wsgi_handler is configured like this in /etc/ > apache2/sites-available/amr > > Listen 8002 > <VirtualHost _default_:8002> > > AliasMatch ^/([^/]*\.css) /usr/local/www/documents/media/$1 > > Alias /media/ /usr/local/www/documents/media/media/ > > Alias /static/ /usr/local/www/documents/media/ > <Directory /usr/local/www/documents/media/> > Order deny,allow > Allow from all > </Directory> > > WSGIScriptAlias / /usr/local/www/wsgi-scripts/wsgi_amr_handler.py > <Directory /usr/local/www/wsgi-scripts> > Order allow,deny > Allow from all > </Directory> > # > > </VirtualHost> > > Here are the pertinent configuration details from urls.py > -------------------------------------------------------------------------------- > from django.conf.urls.defaults import * > from django.contrib.auth.views import login > > # Uncomment the next two lines to enable the admin: > from django.contrib import admin > admin.autodiscover() > > urlpatterns = patterns('', > (r'^$', main_page), > (r'^login/$', 'django.contrib.auth.views.login'), > > Here are the pertinent configuration details from settings.py > -------------------------------------------------------------------------------------- > # List of callables that know how to import templates from various > sources. > TEMPLATE_LOADERS = ( > 'django.template.loaders.filesystem.Loader', > 'django.template.loaders.app_directories.Loader', > # 'django.template.loaders.eggs.Loader', > ) > > MIDDLEWARE_CLASSES = ( > 'django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > # 'django.middleware.csrf.CsrfViewMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.contrib.messages.middleware.MessageMiddleware', > ) > > ROOT_URLCONF = 'amr.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. > '/home/amr/django/templates', > ) > > INSTALLED_APPS = ( > 'django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.messages', > 'amr.login', > . > . > . > # Uncomment the next line to enable the admin: > 'django.contrib.admin', > # Uncomment the next line to enable admin documentation: > 'django.contrib.admindocs', > ) > > Here are the details from the second project which is getting this > error when trying to login: TemplateDoesNotExist registration/ > login.html. > > Here is its apache2 configuration from /etc/apache2/sites-available/ > webdev_proj > > Listen 8030 > <VirtualHost _default_:8030> > > AliasMatch ^/([^/]*\.css) /usr/local/www/documents/media/$1 > > Alias /media/ /usr/local/www/documents/media/media/ > > Alias /static/ /usr/local/www/documents/media/ > <Directory /usr/local/www/documents/media/> > Order deny,allow > Allow from all > </Directory> > > WSGIScriptAlias / /usr/local/www/wsgi-scripts/ > wsgi_webdev_proj_handler.py > <Directory /usr/local/www/wsgi-scripts> > Order allow,deny > Allow from all > </Directory> > # > > </VirtualHost> > > Here are the pertinent configuration details from urls.py > -------------------------------------------------------------------------------- > from django.conf.urls.defaults import * > from django.contrib.auth.views import login > > from login.views import * > > from django.conf.urls.defaults import * > > # Uncomment the next two lines to enable the admin: > from django.contrib import admin > admin.autodiscover() > > urlpatterns = patterns('', > (r'^$', main_page), > (r'^login/$', 'django.contrib.auth.views.login'), > (r'^logout/$', logout_page), > > # Uncomment the admin/doc line below to enable admin > documentation: > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > # Uncomment the next line to enable the admin: > (r'^admin/', include(admin.site.urls)), > ) > > Here are the pertinent configuration details from settings.py > -------------------------------------------------------------------------------------- > TEMPLATE_LOADERS = ( > 'django.template.loaders.filesystem.Loader', > 'django.template.loaders.app_directories.Loader', > # 'django.template.loaders.eggs.Loader', > ) > > MIDDLEWARE_CLASSES = ( > 'django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > # 'django.middleware.csrf.CsrfViewMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.contrib.messages.middleware.MessageMiddleware', > ) > > ROOT_URLCONF = 'webdev_proj.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. > '/home/webdev/django/templates', > ) > > INSTALLED_APPS = ( > 'django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.messages', > > 'webdev_proj.login', > > # Uncomment the next line to enable the admin: > 'django.contrib.admin', > # Uncomment the next line to enable admin documentation: > 'django.contrib.admindocs', > ) > > If you need more details, I'll gladly post them. > Thank you.
-- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.