Skip to content

helmetwearer/django-google-cloud-sql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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')), 

About

Django Google Cloud SQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published