How can I set the language (and culture) used by the django template system in webapp?
What you're looking for is django's internationalization and localization feature. They're abbreviated as I18N and L10N respectively.
http://makeyjl.blogspot.com/2009/02/using-djangos-i18n-in-google-app-engine.html
Thanks to this article, I got django's multiple language support (internationalization) working alongside GAE's webapp framework. It will take you through the steps to adjust various knobs and dials to activate the correct language and locale based on the incoming request.
The only difference from the article in my setup is that I copied the code in the "Setting Up" section to the top of I18NRequestHandler.reset_language()
method to avoid the occasional "Environment variable DJANGO_SETTINGS_MODULE is undefined" error.
note: I take that by "culture", you meant "locale"
How can I enable the filters provided by django.contrib.markup inside WebApp?
Place the following in your file that contains the "main" function, just below all the import
statements.
from google.appengine.ext import webapp
webapp.template.register_template_library('django.contrib.markup.templatetags.markup')
Since GAE doesn't provide Textile, Markdown or reST out-of-the-box, you need to place either of the libraries you want to use in your GAE project too, so that, for example, import textile
just works.
Then, you can write {{ "*bold*"|textile }}
and have the markup filter handle it.