1

我正在为一个项目使用 django-compressor,但是当我运行./manage compress命令时,我得到了一个错误列表,例如:

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

我没有任何额外的信息。此外,应用程序已添加到INSTALLED_APPS模板标签中,无需 django-compressor 即可正常运行。

更新:

这是settings.py文件:

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',
)
4

1 回答 1

0

问题是邮递员。我在 postman/models.py 文件中get_user_model()替换了函数:User

于 2014-01-29T19:59:28.323 回答