You should be able to do something like foo = db.get(templatekey).templatetext # or however else you want to fetch your template from the db... bar = template.Template(foo) self.response.out.write(bar.render(template_values))
Note: {% extends %} and other template tags that try to load stuff from the disk are going to fail horribly, unless of course you're only extending templates are are actually application files; I don't believe there's a good way to extend a template that's also stored in the db. On Sep 14, 9:11 pm, PatHaugen <pathau...@gmail.com> wrote: > I usually store my custom templates in the database for web editing > and version tracking. > > I was interested in Django with GAE, however with the inability to > write out files to the disk, web editing wasn't possible since I found > I couldn't call Django templates from the database: > > templatepage = 'templates?template=templatename' > path = os.path.join(os.path.dirname(__file__), templatepage) > self.response.out.write(template.render(path, template_values)) > > However I get "TemplateDoesNotExist" > > Is there an alternative way that enables Django loading of the file > from the database anyone can think of? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---