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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...