Title: Deployment of static directory contents to google app engine
Tags: google-app-engine
Question: I've deployed my first GAE application and I am getting "TemplateDoesNotExist" exception at my main page. It feels like my static directory content is not uploaded to GAE.
Isn't it possible that I update (appcfg.py update myapp/) all my files including the static ones and run it standalone on myappid.appspot.com ?

by the way here you can see the problem:
http://pollbook.appspot.com

PS: my app works perfect locally


Here is the accepted answer: Your templates should not be stored in a directory that you refer to as "static" in app.yaml. Static directories are for literally static files that will be served to end users by the CDN without changing. These files cannot be read by the templating engine. It works locally because the dev_appserver does not precisely emulate the production server.

Put your templates in a different directory like /templates or something. You do not need to refer to this directory in your app.yaml.



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 2.5', 'CreationDate': '2009:00:03/11/09', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<google-app-engine>', 'Title': 'Deployment of static directory contents to google app engine', 'ViewCount': 1171, 'id': 636665, 'user_AboutMe': '<p>Software Engineer, lives in <del>Singapore</del> London, <p><a href="http://twitter.com/erdogany" rel="nofollow noreferrer">@erdogany</a></p></p>\n', 'user_AccountId': 16190.0, 'user_DisplayName': 'yusuf', 'user_Reputation': 3521.0, 'user_Views': 266.0, 'user_id': 35012.0}}