我在Google控制台上部署开发的django应用程序时遇到问题。 首先,它将应用程序的所有文件重命名为一些随机名称。另外,当我尝试访问网站.appspot.com时,出现内部错误。我们如何在google云上部署django应用?
已创建app.yaml文件:
# [START runtime]
runtime: python27
entrypoint: gunicorn -b :$PORT mysite.wsgi
threadsafe: true
# [END runtime]
handlers:
- url: /static
static_dir: website/static
- url: /.*
script: main.application
libraries:
- name: django
version: 1.11
也创造了appengine_cofig.py文件:
# Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# [START vendor]
from google.appengine.ext import vendor
vendor.add('lib')
# [END vendor]
感谢提前的帮助....
如果错误出现在您的代码中,那么请求日志应该包含堆栈跟踪。请找到它并将其添加到您的问题;请包括您正在访问的视图的视图代码。否则这个问题是无法回答的。 – snakecharmerb
没有足够的信息在您的文章真正能够帮助你很多。突出的一点是,您将灵活环境的语法与标准环境相结合(“入口点”仅适用于灵活环境)。 – BrettJ
**从初学者的角度来看** ...我怎样才能让我的django网站上运行谷歌应用程序引擎? –