Hi. I'm trying add custom templateloader to my google-app .

main.py start with

import os
import random
import string
import sys
import wsgiref.handlers
import datetime
import simplejson
import re
from django.conf import settings
settings.configure(
    TEMPLATE_LOADERS=(
        'django.template.loaders.filesystem.load_template_source',
        'templateloader.load_template_source',
    ),
)
...

where templateloader.py:

from django.template import TemplateDoesNotExist
def load_template_source(template_name, template_dirs=None):
    ...
    return xxx                                            # e.g. let
xxx===template_name
load_template_source.is_usable = True


Unfortunally it doesn't work. If file-template isn't exists then {%
include xxx%} area remain empty.
But code
    self.response.out.write(settings.TEMPLATE_LOADERS)
take: (
        'django.template.loaders.filesystem.load_template_source',
        'templateloader.load_template_source',
    )
Where I'm wrong? I fill my mistake is in using settings.configure().
Can anybody help me?

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to