Django 1.1 TemplateSyntaxError - could not import *.static.views

140 Views Asked by At

I'm attempting to import a site from an old server that's using Django 1.1 onto a new server. For compatability reasons, I haven't been able to upgrade to the new version of Django.

When I attempted to view localhost:8080/admin/, I was able to access the login screen, but after that point I ran into a TemplateSyntaxError. The specific error that it is giving me is:

TemplateSyntaxError at /admin/

Caught ViewDoesNotExist while rendering: Could not import cmldb.static.views. Error was: No module named static.views

The error is completely correct - there is no module cmldb.static. There is one reference to cmldb.static.views in the urls.py file, though when I change this value I run across the same error. Furthermore, the site that I am importing from has the same urls.py file, yet there is no cmldb.static module in that project either, though that site runs fine.

The traceback shows all files that are located within Django package, rather than any files located within my cmldb package, so I am not sure what code, if any, to post. My main confusion is over which file is actually causing this error.

Error is:

In template /usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/base.html, error at line 30

Which reads:

30 {% url django-admindocs-docroot as docsroot %}

1

There are 1 best solutions below

0
On BEST ANSWER

I'm still unsure as to where the reference to cmldb.static.views originated from, but I discovered that there was a missing folder in my svn database that solved the problem. The cmldb.static.views module is now in place, and the site is up and running.