Pre-request:
- Python2.7 is installed
- Google App Engine SDK is install (Here version 1.7.2 is used)
- Add the google_appengine folder(ex. d:\Google\google_appengine)to your PATH
- Django 1.3 is installed (Don't use 1.4.x, the latest version of Dgango, because GAE support 1.3 only on the time of this post)
- Add python scripts to PATH, that should include django-admin.py (ex. d:\dev\python2.7\Scripts)
PS. This post is tested under Windows environment.
Create GAE project with Django (1.3 supported, currently) enabled:
- Create a new Google App Engine project:
menu[File:New:Project...] => dialog:tree[PyDev-PyDev Google App Engine Project]:button[next] => dialog:label[Project Nam:text["gtest"]:button[next] => dialog:label[Google App Engine Directory]:button[Browser] => file_browser[D:\Dev\Google\google_appengine] :dialog:button[OK]:button[Next] => label[What's the application id ...]:text["gtest"]:label[From which template ...]:list[Empty Project]:button[Finish]
- Download Django-norel related zip file, and extract them, for Django enabled on GAE, that did use non-RDB (bigtable) as backend database)
- django-nonrel : Django-nonrel is an attempt at fixing the problems and simplifying NoSQL development by adding support for NoSQL DBs to Django's ORM.
- djangoappengine : Contains all App Engine backends for Django-nonrel (database, email, etc.).
- djangotoolbox : A sandbox for Django-nonrel extra features.
- django-autoload : django-autoload is a reuseable django app which allows for correct initialization of your django project.
- django-dbindexer : Simplify your NoSQL model code and get advanced SQL-like features on non-relational databases.
- django-testapp
- Copy folders to project root directory from all above :
- Copy django-nonrel/django to %project%/django
- Copy djangotoolbox/djangotoolbox to %project%/djangotoolbox
- Copy django-autoload/autoload to %project%/autoload
- Copy django-dbindexer/dbindexer to /dbindexer
- Copy djangoappengine to /djangoappengine link
- Copy django-testapp/*.py & *.yaml to %project%/
- Copy django-testapp/template to %project/template
- Test run testapp in GAE and with Django enabled
right click on project:menu[Run As][1.PyDev:Google App Run]
console message:
INFO 2012-10-12 07:00:33,980 dev_appserver_multiprocess.py:655] Running application dev~ctst on port 8080: http://localhost:8080
INFO 2012-10-12 07:00:33,980 dev_appserver_multiprocess.py:657] Admin console is available at: http://localhost:8080/_ah/admin
- Start up browser and access http://localhost:8080, and can get first line message :
It works!
Your Django-nonrel installation is working fine. Now go and build something useful with it. :
沒有留言:
張貼留言