无法在使用 heroku

问题描述

我正在尝试使用 django-compressor 2.4.1 在 heroku 上部署 Django 3.2.4 应用程序。我想让 heroku 压缩文件,所以我忽略了我的本地压缩目录并添加一个编译后文件,如指定的 here。 这是构建日志

Compressing static files
       Traceback (most recent call last):
         File "/app/.heroku/python/lib/python3.9/site-packages/django/template/utils.py",line 66,in __getitem__
           return self._engines[alias]
       KeyError: 'django'
       
       During handling of the above exception,another exception occurred:
       ... other stuff
       File "/app/.heroku/python/lib/python3.9/site-packages/django/template/backends/django.py",line 123,in get_package_libraries
           raise InvalidTemplateLibrary(
       django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'compressor.templatetags.private_static': cannot import name 'PrivateFileSystemFinder' from 'compressor.finders' (/app/.heroku/python/lib/python3.9/site-packages/compressor/finders.py)
 !     Push rejected,Failed to compile Python app.
 !     Push Failed

我按照 docs 中的步骤设置了 django-compressor。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...