Skip to content

Commit 9ce2021

Browse files
committed
Fix #182: Stop crashing when using the cached template loader and TemplateContent
1 parent 4bfb135 commit 9ce2021

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/contenttypes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,12 @@ which are rendered using the Django template language.
432432

433433
Template usage isn't restricted in any way.
434434

435+
.. note::
436+
437+
You cannot use Django's cached template loader with ``TemplateContent``
438+
currently. The cached template loader has no way of enumerating
439+
available templates in the filesystem.
440+
435441

436442
Video inclusion code for youtube, vimeo etc.
437443
--------------------------------------------

feincms/content/template/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_templates():
1616

1717
for loader in settings.TEMPLATE_LOADERS:
1818
loader_instance = find_template_loader(loader)
19-
if not loader_instance:
19+
if not loader_instance or not hasattr(loader_instance, 'get_template_sources'):
2020
continue
2121

2222
for basepath in loader_instance.get_template_sources('.'):

0 commit comments

Comments
 (0)