use sina sae for python

Sina launched Sina the App Engine for some time, but php, php is not very familiar with, have not been to take a closer look. See the python support for the closed beta for some time before, and looked at to support python library is also very comprehensive, applied for a closed beta, I did not expect after a week give me a mail, you can use the python version, so come test, to see how this cloud platform.

A support class library

Name of the supported versions of the default version

django 1.2.7, 1.4 1.2.7
flask 0.7.2 0.7.2
flask-sqlalchemy 0.15 0.15
werkzeug 0.7.1 0.7.1
jinja2 2.6 2.6
tornado 2.1.1 2.1.1
bottle 0.9.6 0.9.6
ulibweb 0.0.1a7 0.0.1a7
sqlalchemy 0.7.3 0.7.3
webpy 0.36 0.36
Flask-WTF 0.5.2 0.5.2
WTForms 0.6.3 0.6.3
PIL 1.1.7 1.1.7
MySQLdb 1.2.3 1.2.3
sinatpy 2.x-(2011-6-8) 2.x-(2011-6-8)
numpy 1.6.1 None

Django latest 1.4, the PIL, numpy, I would like to use, huh, huh.

2, code deployment

First create a project, such as higis, Sina will automatically create a svn repository address, the address, we can deploy our code. Immediately connect using svn on the svn repository, such as:, followed by the name of your application. Svn directory, create a corresponding repository. The Sina Default 1 folder as the main version of the file folder, and other versions of this can create other 2,3,4.Several files in a directory, as follows:

Then submitted to the server via svn commit. Among them, higissite for djangoproject catalog, static static directory, put the top is because the the sina default static for static processing directory, the other will let to deal with. templates temporarily put here. config.yaml for the configuration file is configured to use third-party libraries, I configured the django and version number is 1.4, so will the program automatically to load a version of the django 1.4. index.wsgi for initializing the application entry, including the specified system environment setting, and the implementation of the django wsgi application sae start.

3, the Hello World

Modify higissite the, add:

urlpatterns = patterns ('',
# Examples:
# Url (r '^ $', 'higissite.views.home', name = 'home'),
# Url (r '^ higissite /', include ('')),

# Uncomment the admin / doc line below to enable the admin documentation:
# Url (r '^ admin / doc /', include ('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the the admin:
Url (r '^ admin /', the include (,
url (r '^ $', 'higissite.views.hello'),

Add, add the following inside:

the from django.http the import the HttpResponse

def hello(request):
    return HttpResponse("</pre>
<h2><a href="\&quot;\&quot;">Welcome to HiGIS</a></h2>

svn upload is open, run successfully ~~

4, the trial feel

(1) upload files often disconnect (recommend a file folder to a folder to upload, and the other the first to upload a static file, and finally upload wgsi, and py file)

(2) support library Tingduo, but limit

(3) to support an independent domain, but need to go abroad, data center, slow. For the record if you could take the country, but it looks like to request to be contacted.

(4) is very convenient, application management debug output information can be viewed in the background.

Other slowly re-use ...

本文固定链接: | Hi,GIS

该日志由 H.J 于2012年05月23日发表在 Program 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: use sina sae for python | Hi,GIS
关键字: , , ,

use sina sae for python:等您坐沙发呢!