We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 497c30d commit 428a64fCopy full SHA for 428a64f
plain/plain/views/templates.py
@@ -36,6 +36,12 @@ def get_template_names(self) -> list[str]:
36
def get_template(self) -> Template:
37
template_names = self.get_template_names()
38
39
+ if isinstance(template_names, str):
40
+ raise ImproperlyConfigured(
41
+ f"{self.__class__.__name__}.get_template_names() must return a list of strings, "
42
+ f"not a string. Did you mean to return ['{template_names}']?"
43
+ )
44
+
45
if not template_names:
46
raise ImproperlyConfigured(
47
f"{self.__class__.__name__} requires a template_name or get_template_names()."
0 commit comments