Jump to content

Recommended Posts

Posted

Hi! My views.py is:

 

from django.http import HttpResponse
from django.shortcuts import render_to_response
def hello(request):
   menu_list = create_menu()
   try:
       return render_to_response('hello.html', locals())
   except Exception, e:
       return HttpResponse(e)

 

So it results exception: Module "django.template.loaders.filesystem" does not define a "Loader", instead of loading the hello.html.

 

settings.py:

TEMPLATE_LOADERS = (
   'django.template.loaders.filesystem.Loader',
   'django.template.loaders.app_directories.Loader',
   'django.template.loaders.eggs.Loader',
)



ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = ("/home/pavlok31/public_html/templates/",
   # 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.
)

 

Would you be so kind to suggest where can be the problem?

Thanks.

Posted

Solved!

 

I forgot that at home I use the newest django instead of on Heliohost.

 

So, I needed to change settings.py to fit with the django version installed on Heliohost.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...