1

我正在尝试使用 mod_wsgi 在 Apache 上部署一个使用extdirect应用程序的 Django 项目。

extdirect 应用程序允许在 Django 中使用 ExtJS Ext.Direct 功能。除其他外,使用自定义模板标签,它会自动添加到我的模板行中,例如

<script type="text/javascript"> Ext.Direct.addProvider({"url": "/extdirect/MyRouter/", "namespace": "Remote", "type": "remoting", "id": "MyRouter", "actions": {"MyRouter": [{"name": "getTree", "len": 1}]}}); </script>

在此行中,“url”参数自动设置为以“/extdirect”开头

但问题是我将我的网站安装在子 URL

WSGIScriptAlias /mysite /usr/local/django/mysite/apache/django.wsgi

所以上面脚本中的“url”不再起作用。

url 在extdirect/django/templatetags/direct_providers.py文件中设置,如果我手动将代码更改为

klass, '/mysite/extdirect/%s/' % name, ns).render())

它再次起作用。

但是有没有办法让它在不干扰 extdirect 包的情况下工作?

4

1 回答 1

0

这个链接可能会在没有 ExtJS 的情况下帮助你。Apache-django-mod-wsgi

于 2011-05-23T11:07:51.607 回答