I'm using django-compressor for a project, but when I run the ./manage compress command I got a list of errors like:

Invalid template /home/somepath: 'some_template_tags' is not a valid tag library: ImportError raised loading postman.templatetags.some_template_tags: cannot import name SomeLibrary

I don't have any extra information. Moreover the application is added to INSTALLED_APPS and the template tags runs normally without django-compressor.

Update:

This is the settings.pyfile:

INSTALLED_APPS = (
     'django.contrib.staticfiles',
     'cms',
     'mptt',
     'menus',
     'south',
     'sekizai',
     'classytags',
     'postman',
     # More apps
     'compressor',
)
# More lines
STATICFILES_FINDERS = (
     'django.contrib.staticfiles.finders.FileSystemFinder',
     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
     'compressor.finders.CompressorFinder',
)
有帮助吗?

解决方案

The problem was postman. I replaced the function: get_user_model() with User on the postman/models.py file:

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top