Made template overriding more consistent and created template_overrides dir.

This commit is contained in:
Kelketek Rritaa 2014-06-29 11:07:11 -05:00
parent 0729bf10b7
commit df85edc295
2 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1,4 @@
Place your own version of templates into this file to override the default ones.
For instance, if there's a template at: `src/web/templates/evennia_general/index.html`
and you want to replace it, create the file `game/gamesrc/web/template_overrides/evennia_general/index.html`
and it will be loaded instead.

View file

@ -514,7 +514,7 @@ STATICFILES_IGNORE_PATTERNS = ('README.md',)
ACTIVE_TEMPLATE = 'prosimii'
# We setup the location of the website template as well as the admin site.
TEMPLATE_DIRS = (
os.path.join(GAME_DIR, "gamesrc", "web", "templates"),
os.path.join(GAME_DIR, "gamesrc", "web", "template_overrides"),
os.path.join(SRC_DIR, "web", "templates", ACTIVE_TEMPLATE),
os.path.join(SRC_DIR, "web", "templates"),)
# List of callables that know how to import templates from various sources.