Access to ODOO Database from Django Application in Google Cloud

45 views
Skip to first unread message

aitec...@gmail.com

unread,
Oct 5, 2017, 9:50:12 AM10/5/17
to Google App Engine
Hello,

I have developped a Django Application, which allow me to access to my Odoo Database.

My Odoo database is installed in Google Cloud.

My Django application use the "odoorpc" library in Python to can access to my ODOO database.

I have run this Django Application from my localhost, but from the Google cloud doesn't work. this is my basic function to access to my ODOO :


# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.shortcuts import render
from django.http import HttpResponse
import odoorpc

# The connection ...
odoo = odoorpc.ODOO('35.192.212.135', port=8069)

---> My programme stop in this level


Any help please ?

George (Cloud Platform Support)

unread,
Oct 5, 2017, 12:20:25 PM10/5/17
to Google App Engine
How is your database installed in Google Cloud, exactly? Did you install it in the Compute Engine

You can also choose from a variety of third-party databases to use with your applications such as Redis, MongoDB, PostgreSQL, Cassandra, and Hadoop. These third-party databases can be hosted on Compute Engine, hosted on another cloud provider, hosted on premises, or managed by a third-party vendor. You can read more on the subject at "Using Third-Party Databases", and follow references present on that page, as needed. 

Attila-Mihaly Balazs

unread,
Oct 6, 2017, 2:56:18 AM10/6/17
to Google App Engine
Hello,

In addition to what George said, if you're trying to access it from App Engine Standard, you'll have to enable the socket service to be able to make TCP connections: https://cloud.google.com/appengine/docs/standard/python/sockets/

Regards,
Attila
Reply all
Reply to author
Forward
0 new messages