The template directory should also contain the name of the html file.
If the static dir is 'templates' and the html file is
'test_template.html', then it'd look like this:
os.path.join(os.path.dirname(__file__), 'templates/
test_template.html')
On Mar 13, 6:38 pm, arbi <[email protected]> wrote:
> Hi,
>
> I took some hours now to find out the solution to my pb. I didn't find
> the solution on app engine forum, so I post it.
> When running localy : no pb (expect the media css is not loaded, I
> don't know why).
> But when I want to update it to server, there is a "raise
> TemplateDoesNotExist, name. TemplateDoesNotExist: 404.html"
>
> Hre is the traceback :
>
> Exception in request:
> Traceback (most recent call last):
> File "/base/data/home/apps/antrivecov/1.332050104410580633/common/
> zip-packages/django.zip/django/core/handlers/base.py", line 113, in
> get_response
> return callback(request, **param_dict)
> File "/base/data/home/apps/antrivecov/1.332050104410580633/common/
> zip-packages/django.zip/django/views/defaults.py", line 13, in
> page_not_found
> t = loader.get_template(template_name) # You need to create a
> 404.html template.
> File "/base/data/home/apps/antrivecov/1.332050104410580633/common/
> zip-packages/django.zip/django/template/loader.py", line 80, in
> get_template
> source, origin = find_template_source(template_name)
> File "/base/data/home/apps/antrivecov/1.332050104410580633/common/
> zip-packages/django.zip/django/template/loader.py", line 73, in
> find_template_source
> raise TemplateDoesNotExist, name
> TemplateDoesNotExist: 404.html
>
> Why doesn't he find the template ?
> My settings are :
>
> TEMPLATE_CONTEXT_PROCESSORS = (
> 'django.core.context_processors.auth',
> 'django.core.context_processors.media',
> 'django.core.context_processors.request',
> )
>
> TEMPLATE_DIRS = (
> os.path.join(os.path.dirname(__file__), 'templates'),
> )
>
> GLOBALTAGS = (
> 'ragendja.templatetags.ragendjatags',
>
> And the template i want to load is very simple : "test_template.html"
> with "<p> hello! </p>" content.
>
> Thanks for helping, i want so much to see my app on app engine!
>
> Arbi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---