部署使用python extdirect的django项目时出现问题
我正试图在Apache上部署一个使用应用程序的Django项目,其中包含mod_wsgi extdirect应用程序允许在Django中使用ExtJS Ext.Direct功能。除此之外,使用自定义模板标记,它会自动添加到我的模板行中,如部署使用python extdirect的django项目时出现问题,django,apache,extjs,mod-wsgi,ext-direct,Django,Apache,Extjs,Mod Wsgi,Ext Direct,我正试图在Apache上部署一个使用应用程序的Django项目,其中包含mod_wsgi extdirect应用程序允许在Django中使用ExtJS Ext.Direct功能。除此之外,使用自定义模板标记,它会自动添加到我的模板行中,如 <script type="text/javascript"> Ext.Direct.addProvider({"url": "/extdirect/MyRouter/", "namespace": "Remote", "type": "remot
<script type="text/javascript"> Ext.Direct.addProvider({"url": "/extdirect/MyRouter/", "namespace": "Remote", "type": "remoting", "id": "MyRouter", "actions": {"MyRouter": [{"name": "getTree", "len": 1}]}}); </script>
因此,上述脚本中的“url”不再有效
url是在文件中设置的,如果我手动将代码更改为
klass, '/mysite/extdirect/%s/' % name, ns).render())
它又起作用了
但是有没有办法让它在不干扰extdirect软件包的情况下工作呢?如果没有ExtJS,这个链接可能会对您有所帮助 我知道如何在mod_wsgi上部署Django,除了这个“/extdirect”url之外,其他一切都可以使用。您发布的指南使用了
WSGIScriptAlias/
,因此它对我不起作用-我将我的应用安装在子URL/mysite
上,但无论如何,您发布的指南是mod_wsgi上django部署的非常好的指南,我会将其添加为书签;-)在url.py中添加一个新的url,将/extdirect/MyRoute重定向到/mysite/extdirect/…我想这并没有什么帮助。关键是,我的JavaScript向/extdirect
url发出请求,Apache尝试在根目录下搜索,给出文件不存在:/var/www/extdirect
错误。它从未到达mod.wsgi脚本。。。
klass, '/mysite/extdirect/%s/' % name, ns).render())