找回密码
 FreeOZ用户注册
查看: 3291|回复: 6

[网络技术] Google App Engine CMS系统的搭建

[复制链接]
发表于 3-1-2010 14:02:33 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
Google App Engine CMS系统的搭建                                                                        简介圣诞假期期间试着使用Google App Engine搭建了一个CMS系统,挺简单的,而且稳定和免费。把搭建过程Blog下来。

软件下载下载Python下载ActivePython 2.5.4.4并安装。
http://www.activestate.com/activepython/downloads/

下载Google App Engine SDK下载Google App Engine SDK for Python,我使用Python而不是Java。
http://code.google.com/appengine/downloads.html

下载App Engine Site Creator我使用开源软件App Engine Site Creator,下载并解压到本地目录
http://code.google.com/p/app-engine-site-creator/wiki/TechnicalOverview

定制修改configuration.pyconfiguration.py用于定制App Engine Site Creator系统的,代码如下:
#!/usr/bin/python2.5

#

# Copyright 2008 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.

#



"""System-wide configuration variables."""



import datetime





# This HTML block will be printed in the footer of every page.

FOOTER_HTML = (

'Copyright @ Lin Software 2009 | '

'Designed By Jake Lin'

'<img src="http://code.google.com/appengine/images/appengine-noborder-120x30.gif"'

'alt="Powered by Google App Engine" />'

)





# File caching controls

FILE_CACHE_CONTROL = 'private, max-age=86400'

FILE_CACHE_TIME = datetime.timedelta(days=1)





# Title for the website

SYSTEM_TITLE = 'Lin Software'



# Description for the website

SYSTEM_DESCRIPTION = 'Welcome to Lin Software site'



# Unique identifier from Google Analytics (ie. UA-xxxxxxx-x)

ANALYTICS_ID = 'UA-xxx'



# Name of theme for your site, must be located in

# 'templates/themes/{FOLDER NAME}' where your customized

# base and page files should be located

SYSTEM_THEME_NAME = 'nautica05'



FOOTER_HTML是所有页面的页脚。如下图

还需要定义SYSTEM_TITLE和SYSTEM_DESCRIPTION。 ANALYTICS_ID用于Google Analytics,不是必须的。

修改app.yamlapp.yaml定义Google App Engine的应用的信息。
application: linsoftwaresite

version: 2

runtime: python

api_version: 1



default_expiration: "1d"



handlers:

- url: /favicon.ico

static_files: static/images/favicon.ico

upload: static/images/favicon.ico



- url: /static/images/fileicons/.*

script: zip_handler.py



- url: /fckeditor/.*

script: zip_handler.py



- url: /static

static_dir: static



- url: /admin/.*

script: main.py

login: required



- url: /.*

script: main.py







skip_files: |

^(.*/)?(

(app\.yaml)|

(app\.yml)|

(index\.yaml)|

(index\.yml)|

(#.*#)|

(.*~)|

(.*\.py[co])|

(.*/RCS/.*)|

(\..*)|

(dev/.*)|

(tests/.*)|

(docs/.*)|

)$我的应用的ID是linsoftwaresite。所以把application修改为linsoftwaresite。

测试使用Google App Engine Launcher测试定制的CMS。增加一个新应用,指向App Engine Site Creator解压的本地目录。

点击Browse可以测试。


部署使用Google App Engine Launcher可以把应用不是到Google App Engine上。
配置应用属性
首先需要配置应用的属性,Deployment Server 需要填写 appengine.google.com开始我填错了,填了自己应用的网址,一直没有成功。
上传
点击"Deploy”,填写Email和密码上传应用。

预览
可以通过www.linsoftware.com来访问,但是可能国内给河蟹了,所以请使用linsoftwaresite.appspot.com来预览。
关于Google App Engine的开发可以参考一下下面的链接,不错的教材。
http://code.google.com/appengine/docs/python/gettingstarted/introduction.html

原文见http://www.cnblogs.com/procoder/ ... App-Engine-CMS.html

评分

参与人数 1威望 +50 收起 理由
ubuntuhk + 50 你太有才了!

查看全部评分

回复  

使用道具 举报

 楼主| 发表于 3-1-2010 14:03:45 | 显示全部楼层
拷贝过来格式没掉了,
回复  

使用道具 举报

发表于 3-1-2010 17:21:23 | 显示全部楼层
看过你博客上的文章了

评分

参与人数 1威望 +30 收起 理由
procoder + 30 谢谢分享!

查看全部评分

回复  

使用道具 举报

发表于 3-1-2010 17:40:19 | 显示全部楼层

回复 #1 procoder 的帖子

关于GAE实战的介绍文章好像不是很多,procoder这篇帖子不错

不过我有点小担心,Google万一进不了将来的白名单,那些急于GAE、面对国内用户的应用怎么办 ,不过这个担心可能有点远。

评分

参与人数 1威望 +30 收起 理由
procoder + 30 谢谢分享!

查看全部评分

回复  

使用道具 举报

发表于 4-1-2010 12:30:39 | 显示全部楼层
最近也研究了一下GAE,以前没用过python,想找个java的能在GAE上跑的cms,lz找过类似的吗?

评分

参与人数 1威望 +30 收起 理由
procoder + 30 谢谢分享!

查看全部评分

回复  

使用道具 举报

 楼主| 发表于 6-1-2010 21:42:24 | 显示全部楼层
原帖由 cnlancer 于 4-1-2010 12:30 发表
最近也研究了一下GAE,以前没用过python,想找个java的能在GAE上跑的cms,lz找过类似的吗?

我喜欢Python的。
回复  

使用道具 举报

发表于 5-2-2010 11:57:39 | 显示全部楼层
楼主的Blog很有些内容。
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+11, 29-3-2024 10:13 , Processed in 0.026088 second(s), 28 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表