我正在尝试安装特定版本的django-cms,从而执行pip install django-cms==3.0.5.这给了我错误No matching distribution found for django-mptt==0.5.2,==0.6,==0.6.1 (from django-cms==3.0.5).事实上,在github上,setup.py文件指定了要求django-mptt==0.5.2,==0.6,==0.6.1.
该规范指出,逗号作为逻辑"与"操作,但显然没有版本可以在同一时间是0.5.2,0.6和0.6.1,因此要求不匹配.只需通过pip install django-mptt==0.5.2工作安装其中一个版本没有问题,但仍然有关于django-cms == 3.0.5的相同错误.
任何人都可以阐明这一点吗?
我正在开发一个普通的React JS应用程序并使用BrowserRouter。我需要知道路线何时更改,而我发现的唯一内容是使用同一个人的历史记录包(反应训练)。
他们的例子看起来很简单,但对我来说根本不起作用:
import createHistory from 'history/createBrowserHistory'
const history = createHistory()
console.log('a')
history.listen((location, action) => {
console.log(`The current URL is ${location.pathname}${location.search}${location.hash}`)
console.log(`The last navigation action was ${action}`)
})
const A = props => <div>A <NavLink to="/b">b</NavLink></div>
const B = props => <div>B <NavLink to="/a">a</NavLink></div>
ReactDOM.render(
<BrowserRouter>
<div>
<Route path="/a" component={A}/>
<Route path="/b" component={B}/>
</div>
</BrowserRouter>,
document.getElementById('app')
)
Run Code Online (Sandbox Code Playgroud)
控制台显示“ a”,但单击并更改URL时,永远不会调用监听回调。
他们的文档中没有更多内容,所以有人知道缺少什么吗?