Django Google Cloud SQL
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with tomascorrea:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
djangoappengine_rdbms
example
example_django_1_2
.gitignore
README
README.textile

README.textile

djangoappengine_rbdms

This is a toolkit to run native django code with admin in the Google AppEngine.
This project is inspired (forked) in the very google djangoappengine project. I based many code and modules
in that project.

WARNINGS

It is working with some limitations, it is not tested and I’m NOT using it.
The remote command is not working at all.
DO NOT USE IT IN PRODUCTION.

PREREQUISITES

  1. GAE Instance created
  2. Google SQL Cloud instance created
  3. GAE SDK 1.6 instaled and working

INSTALATION:

This instalation does not include the django instalation, or GAE SDK instalation.
Basicaly setup a basic django project,

django-admin.py starproject example

and copy or synlink the djangoappengine_rdbms to the root of your project.
You should not install or put these files in the path beacuse they need to deployed to
appengine. You can also checkout the example project

SETUP:

add the following line to your settings

from djangoappengine_rdbms.settings_base import *

and configure you database.

DATABASES = {
    'default': {
        'ENGINE': 'djangoappengine_rdbms.db.backend',
        'INSTANCE': 'djangosqlcloudmysql:example', 
        'NAME': 'example',                  # Or path to database file if using sqlite3.
        'USER': 'root',                         # Not used with sqlite3.
        'PASSWORD': 'root',
    }
}

RUNNING:

Just run the default runserver django command

./manage.py runserver

DEPLOY:

./manage.py deploy

As long as the remote command is not working I used the command line tool provide by Google to
setup up the DB.

TODO:

  1. Make remote commands work – Google Cloud SQL does not use the stub services. Strategy: Access the directely the instance like the command line tool provided by Google
  2. Write better instalations intructions.
  3. Test, test, test

GAMBIARRA (a portugues word that means something like a “quick fix”):

It is not possible yet (I hope) to access the Google Cloud SQL via stub infra-structures,
só a I plan adpat the http://shell.appspot.com/ to django shell insted of a python shell.

GAMBIARRA 2 – webaccess to django manage.py commands

add the following line to your urls in urls.py to access the manage.py commands.

(r'^appengine/admin/', include('djangoappengine_rdbms.urls')),