Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6796341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:27:20+00:00 2026-05-26T18:27:20+00:00

I have problem with using template in Google App Engine by Python. the thing

  • 0

I have problem with using template in Google App Engine by Python.
the thing is, when I address my static folder in Yaml, I can NOT access to my template and when I remove it, it is access able. look at the files.

this is my file structure
-src\
----\calc.py
----\main.py
----\index.html
----templ\
---------\calc.html
---------\js
---------\css

YAML:
handlers:
- url: /.*   script: main.py

MAIN.PY
def main():
    application = webapp.WSGIApplication([
      ('/', MainPage),
      ('/calc',Calc)
      ], debug=True)
    wsgiref.handlers.CGIHandler().run(application)

Calc.py
class Calc(webapp.RequestHandler):
    def get(self):
            temp = os.path.join(os.path.dirname(__file__), 'templ/calc.html')
            outstr = template.render(temp, temp_val)
            self.response.out.write(outstr)

THE RESULT IS :
Status: 200 OK
Content-Type: text/html; charset=utf-8
I can reach my file and the template addressing is working

BUTTTTTTT

when I add the following line to my YAML to access to my css and js and so on. IT is not access able

YAML:

    handlers:
    - url: /.*
      script: main.py

    - url: /templ
      static_dir: templ

or If i change order of them :
YAML:

    handlers:
    - url: /templ
      static_dir: templ

    - url: /.*
      script: main.py

BOTH are NOT working and there is my error

Status: 500 Internal Server Error

Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__
    handler.get(*groups)
  File "/Users/em/Documents/workspace/NerkhARZ/src/calc.py", line 26, in get
    outstr = template.render(temp, temp_val)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/template.py", line 88, in render
    t = load(template_path, debug)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/template.py", line 185, in load
    return _load_user_django(path, debug)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/template.py", line 110, in _load_user_django
    template = django.template.loader.get_template(file_name)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_0_96/django/template/loader.py", line 79, in get_template
    source, origin = find_template_source(template_name)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_0_96/django/template/loader.py", line 72, in find_template_source
    raise TemplateDoesNotExist, name
TemplateDoesNotExist: calc.html

Please help me through this, there must be simple solution for it. I really dont believe that GAE is that much fool….

Thank you in advanced

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:27:21+00:00Added an answer on May 26, 2026 at 6:27 pm

    Files designated as static in app.yaml are not available to application code in the python runtime. They are only served directly the the user’s browser in response to requests matching the regular expression in app.yaml.

    Do not mark templates as static. Only files that should be served as-is to the user, such as javascript, CSS, and images, should be marked as static.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I using google app engine, in 0.96 I have no problem to include a
I'm new to Python, and I'm using Google App Engine to build a simple
I have the following problem using template instantiation [*]. file foo.h class Foo {
We have a problem using a class template which itself uses function objects in
hi i am using django app engine patch i have set up a simple
I have problem while using jquery maskedinput with asp.net textbox. I have a check
I have a problem using the Java search function in Eclipse on a particular
I have a problem using Linq to NHibernate to load an object and eagerly
I have a problem using the SSIS. I try to import data from database
I have a problem using JSON and arrays. Here is my code: while($row =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.