1. Create an application
Go to the BAE Management page, cloud environment> my Applications> Create an application. Repeat Python during running. Python is currently in Public Beta and needs to be applied separately)
2. Set Version Management
Click "version management" of the current application to create a new version.
After the new version is created, you can see the Svn address in red below
Use the Svn client to check out the address.
3. upload an application
Note: My version is 2.5, and the directory structure of applications of different versions may be different.) create a Django application. Leave the application name in step 2 blank and get the following directory structure:
Modify wsgi. py as follows:
- import os
- import sys
-
- os.environ['DJANGO_SETTINGS_MODULE'] = 'wordServer.settings'
-
- path = os.path.dirname(os.path.abspath(__file__)) + '/wordServer'
- if path not in sys.path:
- sys.path.insert(1, path)
-
- from django.core.handlers.wsgi import WSGIHandler
- from bae.core.wsgi import WSGIApplication
-
- application = WSGIApplication(WSGIHandler())
Copy the entire wordSever subdirectory to the directory you just checked out. The directory structure is as follows:
Finally, submit the change and visit 0.wordserver.duapp.com to see the Django initial interface:
Edit recommendations]
- Python deletes the same files in a directory
- Several articles required to learn Python well
- Several things you should pay attention to when coding Python
- Sort else statements in Python
- Video: Jack Hong, chief architect of Douban, talks about Python Development