如何为 django-nonrel 传递 dev_appserver 参数

发布于 2024-10-04 03:58:11 字数 507 浏览 10 评论 0原文

我一直在使用 django-appengine,现在正在尝试使用 django-nonrel 的项目。之前我使用bash脚本来启动本地服务器并传递参数。

Django-nonrel 文档 说你不应该直接运行 dev_appserver 。有没有办法传递这些参数?

/usr/bin/python2.5 ./dev_appserver.py \
        -p 9009 \
        -a 192.168.1.8 \
        --blobstore_path=/foo/gaedata/myapp/blobs \
        --datastore_path=/foo/gaedata/myapp/data \
        --enable_sendmail \
        $@ .

I have been using django-appengine and am now trying a project with django-nonrel. Before I used a bash script to start the local server and pass parameters.

Django-nonrel docs say you shouldn't run dev_appserver directly. Is there a way to pass these parameters?

/usr/bin/python2.5 ./dev_appserver.py \
        -p 9009 \
        -a 192.168.1.8 \
        --blobstore_path=/foo/gaedata/myapp/blobs \
        --datastore_path=/foo/gaedata/myapp/data \
        --enable_sendmail \
        $@ .

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浊酒尽余欢 2024-10-11 03:58:11

如果我没有记错的话,您可以将地址和端口作为第一个参数“192.168.1.8:9009”传递给 runserver 命令。

和/或,编辑 /management/commands/runserver。 py 并添加其他参数。我认为您也许可以在 django 数据库设置中设置数据存储和 blobstore 路径。

另外,我还发现 Waldemar 发表了一篇帖子,对这个一般性主题进行了评论。

If I am not mistaken, you pass the address and port in as the first arguments "192.168.1.8:9009" to your runserver command.

And/or, edit /management/commands/runserver.py and add additional parameters. I think you might be able to set the datastore and blobstore paths in your django db settings.

Also, I found one post from Waldemar commenting on this general topic.

静待花开 2024-10-11 03:58:11
  • IP 地址和端口可以作为第一个参数传递(正如 Robert 回答的那样)
  • --enable_sendmail 按原样工作
  • 数据存储参数必须用空格而不是 equals 分隔

工作版本:

/usr/bin/python2.5 ./manage.py runserver \
        192.168.1.8:9009 \
        --enable_sendmail \
        --blobstore_path /foo/django-nonrel/blobs \
        --datastore_path /foo/data \
        --history_path /foo/history
  • IP address and port may be passed as the the first argument (as Robert answered)
  • --enable_sendmail works as-is
  • The datastore parameters must be separated by a space instead of an equals

Working version:

/usr/bin/python2.5 ./manage.py runserver \
        192.168.1.8:9009 \
        --enable_sendmail \
        --blobstore_path /foo/django-nonrel/blobs \
        --datastore_path /foo/data \
        --history_path /foo/history
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文