https://github.com/ezhome/django-webpack-loader
因为某种原因我导入网页包时_加载程序.utils就像在自述文件.md在repo中,它只导入get\ loader(我想要get\ static)。有人知道为什么会这样吗?你知道吗
我有一个视图,我正在尝试使用get\u static。你知道吗
from webpack_loader import utils
def app(request):
url = utils.get_static('index')['url']
print (url)
import types
from inspect import getmembers, isfunction
print ('meow')
print ([o for o in getmembers(utils) if isfunction(o[1])])
这将引发一个错误:AttributeError:module'webpack_加载程序.utils'没有属性'get\u static'
如果我注释掉url代码,它将显示只加载get\ u loader。你知道吗
我不明白为什么要考虑这里的文件:https://github.com/ezhome/django-webpack-loader/blob/master/webpack_loader/utils.py
在shell中:http://imgur.com/a/E8BFs
考虑到这个问题没有引起注意,我建议使用pip并直接从github安装包:
这是用pip安装第三部分包的另一种方法。该命令将直接从主分支下载源代码(因此您得到了最新的更改)。你知道吗
然后可以使用get\ u static函数,例如
更新
版本0.5.0已经发布,这个问题大概已经解决了。你知道吗
更多信息:https://github.com/ezhome/django-webpack-loader/issues/114
相关问题 更多 >
编程相关推荐