Reputation: 4797
I am deploying a Django app to Google App Engine. The app uses a number of customised templates for the Django admin app using the technique described here. On my local machine this works great.
The deployed app on Google App Engine however appears to ignore this mechanism as my customised templates are not used by the GAE-version.
I have the template loaders in settings.py:
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
I have set the template dir in setting.py
:
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
ROOT_PATH + os.sep + "templates",
)
Where ROOT_PATH = os.path.dirname(__file__)
, also defined in settings.py
.
Python: 2.7, Django: 1.4 with Google Cloud SQL. I use Grappelli and used the Grappelli versions of the templates to override on the local version.
Why are my customised templates ignored by my app on GAE?
Upvotes: 0
Views: 168
Reputation: 4797
The devil is in the detail...
The problem was caused by:
Note, that the admin app will lowercase the model name when looking
for the directory, so make sure you name the directory in all lowercase
if you are going to run your app on a case-sensitive filesystem.
I had the directories of my models in CamelCase :-\
Upvotes: 2