django-cms imports module that is never referenced
Posted by Martin Brochhaus | Filed under Uncategorized
This one just drove me nuts so I will post it here as personal note.
If you are running a django-cms powered site where some pages have application_urls hooked into the page you have to be careful when removing the hooked up application. I for instance was using the wonderful django-contact_form application for quite a while but recently I created my own app so that contact_form was no longer needed. After removing the app from my INSTALLED_APPS and from the project folder I got the following error when sending any request:
TemplateSyntaxError at /
Caught an exception while rendering: No module named urls_apply
Thankfully I used a specially named urls.py – if not the error message would have been totally confusing since the stack trace doesn’t give any hints on where the module wants to be imported.
To solve this issue you have to delete all references to that urls.py from the table cms_title (column application_urls).
Tags: django, django-cms, hint, python







