RandO
RandO

Reputation: 355

django-cms TemplateDoesNotExist INHERIT

I installed django-cms and configured it according to the documentation.
The site comes up, but when I try to add a page I get an error: TemplateDoesNotExist: INHERIT

I don't specify INHERIT as a template anywhere. It's finding my template directory ok, but I have no template named INHERIT and I don't know where that request is coming from.

Any help is greatly appreciated.

Upvotes: 3

Views: 1155

Answers (2)

RandO
RandO

Reputation: 355

I had failed to set the CMS_TEMPLATES as directed in the tutorial. (Actually, I had - but gremlins removed it).

Upvotes: 2

mishbah
mishbah

Reputation: 5607

Can you check your TEMPLATES settings.

Looking through the source code:

By default template for a page set here:

TEMPLATE_DEFAULT = ... get_cms_setting('TEMPLATES')[0][0]

Source:

https://github.com/divio/django-cms/blob/develop/cms/models/pagemodel.py#L41 https://github.com/divio/django-cms/blob/develop/cms/models/pagemodel.py#L77

And looking through source code in utils/conf.py. A template named 'INHERIT' is added to list of available templates. And it looks like you own templates are not registered correctly and therefore the 'INHERIT' template is first item in the list.

https://github.com/divio/django-cms/blob/develop/cms/utils/conf.py#L99 https://github.com/divio/django-cms/blob/develop/cms/utils/conf.py#L136

Upvotes: 2

Related Questions