From df85edc295feddd61e061a56a9abb386425d65b4 Mon Sep 17 00:00:00 2001 From: Kelketek Rritaa Date: Sun, 29 Jun 2014 11:07:11 -0500 Subject: [PATCH] Made template overriding more consistent and created template_overrides dir. --- game/gamesrc/web/template_overrides/README.md | 4 ++++ src/settings_default.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 game/gamesrc/web/template_overrides/README.md diff --git a/game/gamesrc/web/template_overrides/README.md b/game/gamesrc/web/template_overrides/README.md new file mode 100644 index 0000000000..8fb5f1fdb8 --- /dev/null +++ b/game/gamesrc/web/template_overrides/README.md @@ -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. \ No newline at end of file diff --git a/src/settings_default.py b/src/settings_default.py index 76dc73ad0e..10dc7cde28 100644 --- a/src/settings_default.py +++ b/src/settings_default.py @@ -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.