1) Download Google App Engine SDK for Python from: http://googleappengine.googlecode.com/files/GoogleAppEngine-1.7.5.msi
2) Install Google App Engine SDK for Python to your host PC.
3) Go to your appengine.google.com, create a project, e.g. razitest1001
4) Get Success Response.
5) Test view the project.
6) Get to your host PC. run Google App Engine Launcher.
Add a new application razitest1001. Set the local storage path.
7) New application registered.
8) Deploy.
9) Wait for the process.
Once you see the message "You can close this window now" comes out, close the window.
10) Reload your website.
11) Run Notepadd++. Open the project folder in your host pc, i.e razitest1001. Open the files, app.yaml, index.yaml and main.py
12) index.yaml.
It’s auto generated. So, leave it as it is.
indexes:
# AUTOGENERATED
# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run. If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED"). If you want to manage some indexes
# manually, move them above the marker line. The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.
13) app.yaml
This file keeps the configuration of your site. We are not going to change anything here.
application: razitest1001
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: .*
script: main.app
libraries:
- name: webapp2
version: "2.5.2"
14. main.py
Notice the “hello world” string that appears on your website.appspot.com comes from this file.
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# 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.
#
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.write('Hello world!')
app = webapp2.WSGIApplication([
('/', MainHandler)
], debug=True)
No comments:
Post a Comment