Google App Engine Boilerplate Legacy
==============================
This Project was Sponsored by PyCharm
NOTE: This Project is Legacy and uses the first technology used by Google App Engine, like webapp2 as Python Framework and DataStore as Data Base. On 2016 this project was legacy and it is recommedable to use moderm technologies like Flask or Django as Framework, MySQL as database. Thanks everybody for their contributions, The creator of this project is honored that it helps to bring web technology to the world.
Google App Engine Boilerplate gets your project off the ground quickly using the Google App Engine platform.Create powerful applications by using the latest technology supported on Google App Engine.It will introduces new developers to App Engine and advanced developers to follow best practices.
A Boilerplate is used to describe sections of code that can be reused over and over in new contexts or applications which provides good default values, reducing the need to specify program details in every project. (wikipedia)
It is fully featured, actively maintained, and uses the latest and most supported technologies of Google App Engine.
New to Google App Engine? Learn about it by watching this video of @bslatkin or reading the official documentation.
Set Authentication Options dropdown to Federated Login in the Google App Engine control panel (or if you do not want federated login, set enable_federated_login to false in config.py)
Deploy it online (instructions - recommended setup: python 2.7, high replication datastore)
Please note that your custom application code should be located in the bp_content folder within your own theme.The intention is that separating the boilerplate code from your application code will avoid merge conflicts as you keep up with future boilerplate changes.
Boilerplate has a Google group (gae-boilerplate) for discussions and a Twitter account (@gaeboilerplate) for sharing related resources.
If you want to add, fix or improve something, create an issue or send a Pull Request.
Before committing fixes we recommend running the unitests (in the boilerplate package). This will help guard against changes that accidently break other code. See the testing section below for instructions.
Feel free to commit improvements or new features. Feedback, comments and ideas are welcome.
You can run this project directly from terminal with Fabric.
fab start
Also you can run it clearing datastore.
fab start:clear
Requirements
Install pip with distribute in order to install next packages.
Before running unittests it is necessary to install webtest, mock, and pyquery in your local python installation.
sudo pip install webtest
sudo pip install mock
sudo pip install pyquery
The best way to run unittests is though Fabric.
sudo pip install Fabric
Running Unit Tests
fab test
command in terminal.Adding yours Unit Test
To deploy your project with Fabric, just run this command in Terminal.
fab deploy
Remember to change application, version, theme in app.yaml according to your project.
In each locale//LC_MESSAGES directory there is a file messages.po. Please help us translate the text in these files.msgid is the text in English. msgstr is the translation to the language indicated by the locale code. For example:
msgid "Change your password"
msgstr "Cambiar tu contraseña"
Requirements
Install before pip with distribute_setup.py (Read the environment setup document)
sudo pip install babel
sudo pip install jinja2
Translating
To execute the translation, run these two commands. (before the second one, go to locale folder to include your translation)
fab lang
fab lang:compile
This boilerplate comes bundled with babel, pytz, and automatic language detection which together provide powerful internationalization capability.Text to be translated needs to be indicated in code and then translated by users like you after which it is compiled for speed.
Adding or updating text to be translated or adding new languages requires more work as indicated in the steps below:
Text to be translated should be enclosed in _("text to translate")
in *.py files.
{{..._("text to translate")...}}
{%..._("text to translate")...%}
In html templates translated text is indicated by:
{% trans %}text to translate{% endtrans %}
NOTE: Translations can be added to other types of files too. See babel.cfgand babel.cfg documentation
Obtain pybabel to perform the steps below. You will need to install and compile jinja2 and babel.Note that you may need to first install setuptools and easy_install.pybabel.exe can be run from the Scripts directory in your python installation.
easy_install jinja2 babel
Babel then needs to find all translationed text blocks throughout code and templates.After installing pybabl run this command to extract messages (assuming ./ is the location of this boilerplate):pybabel extract -F ./locale/babel.cfg -o ./locale/messages.pot ./ --sort-output --no-location --omit-header
Update translations of existing languages or add new languages
Provide translations for each languageIn each locale//LC_MESSAGES directory there is a file messages.po. Users translate the strings in these files.msgid is the text in English. msgstr is the translation to the language indicated by the locale code. For example:
msgid "Change your password"
msgstr "Cambiar tu contraseña"
Compile translationsRun: pybabel compile -f -d ./locale
See webapp2's tutorial and pybabel's docs for more details.
Disabling i18n
i18n can be disabled and language options hidden. Set locales in config.py to None or empty array [] to do this. This may be useful to provide a performance boost or simplify sites that serve a market with only one language.The locale directory can be safely removed to save space if not needed but the babel and pytz directories cannot be removed without breaking code (imports and trans statements) at this time.
SSL
Passwords
CSRF
Google App Engine Boilerplate is a collaborative project created by coto which is bringing to you thanks to the help ofthese amazing people
Top 10: Primary contributors:
Flask Boilerplates
网页正文抽取是个很重要的东西,可以减少索引大小,让搜索结果更准确,数据挖掘也更准确. 昨天晚上在网上看到这个东西: http://code.google.com/p/boilerpipe/ 很高兴,用于抽取网页上的正文,它还有一个gae的页面:http://boilerpipe-web.appspot.com,测了一下准确率,召回率都还没蛮高的.最关键的一点是:几年前在一家小公司我也做过正文抽取,
GAE-BBS 是一个运行在 Google App Engine (GAE) 上简单实用的论坛程序,你可以使用这个程序更简单的在GAE上建立一个自己的小论坛。 首先看GAE-BBS的示例 http://gae-bbs.appspot.com/ 如果你打不开可尝试 http://gaebbs.xibu.biz/ 下载 GAE-BBS程序 打开 http://code.google.com/p/gae
GAE TestBed 是一个用来简化应用程序在 Google App Engine 平台上测试的一些测试用例。 例如下面是一个用来测试邮件发送的用例: import unittest from gaetestbed import MailTestCase class MyTestCase(MailTestCase, unittest.TestCase): def test_email_s
gae-init gae-init is the easiest boilerplate to kick start new applications on Google App Engine using Python, Flask, RESTful, Bootstrap and tons of other cool features. Read the documentation, where
谈到架设部落格,很多人会马上想到WordPress。 WordPress是开源的同时,功能也随借版本更新而愈来愈多。 但却不是每一个人都希望在WordPress下架设部落格,这时便可使用PyPress For GAE。 PyPress For GAE是Python制的开源软体,以WordPress为蓝本而开发。 基本上只要可让Python执行的环境便可使用,特点是可在Google App Engi
gae-django-cms只是一个较简单的文章发布系统,通用性较强,使用这样程序的人大多是想收集一些自己喜欢的文章、个人学习过程所看的资料。 gae-django-cms V2.0不基于早期版本,早期版本是刚学习GAE时的产物,V2.0是发现一些局限性后重新设计的产物,大大提高了性能,同时也让使用者更自由的扩展自己的网站。V2.0比早期版本好的地方,效率提高很多;对放置google Adsens
问题内容: Java DeferredTask的文档让我有些困惑。我在这里阅读了Python文档:http : //code.google.com/appengine/articles/deferred.html,但是我不清楚我将如何使用Java版本。 您能否提供可以启动DeferredTask以便使用DatastoreService进行简单写入的示例代码? 问题答案: 要使用deferred,首