Integrating Google Calendar in a Django application running on app engine - django

I have been trying to integrate Google calendar into a Django application running on App Engine. I have managed to get the google-python-client-api working on my computer and even managed to get a Django app to run on my computer. However, I am unable to get the app compatible with the Django app that is deployed on the appengine. I tried importing all the dependencies - httplib, gdata, gflags but when I run that project it still gives me 500 error. Is there a way to make these 3 things play nice with each other or should I look to deploy Django natively somewhere else?

This is what finally solved my problem. :-
I went into oauth2client/client.py, and there's a conditional before the
CACHED_HTTP = httplib2.Http('.cache')
so I commented out the conditional so it uses the other case:
CACHED_HTTP = httplib2.Http()
automatically, and this one does not call makedirs.
Found on: - https://groups.google.com/forum/?fromgroups#!topic/google-appengine-python/tIwjdy28MzQ

Related

Webpack prod config vs dev config issues

I am trying to reuse one webapp that's been open sourced a while ago that was written using some Django and ReactJS... Now I am a devops engineer so my skillset when it comes to JS and even Django are fairly limited so I am stuck .. My main problem is that this webapp can run just fine locally.. so I can start it and connect using http://localhost:8000 , but whenever I try and set it up on a server and make it "public" for the internal network it fails with accessing all the JS assets.
I know the problem comes with my webpack configs but I can't sort it out.. Been trying all day but I can't even find the proper documentation since it's using Webpack 2.5.
https://github.com/tsprasath/estate/tree/master/webpack
I am attaching the link to the webpack configs from the repo.. If anyone can at least point me to the right thing to look at, that would be helpful.
Thanks in advance!
I dont think its an issue with your webpack. You are trying to run your react app (which is at client side) from django server. I believe you will need to use some kind of middleware to let django know that it needs to use static files generated for react using webpack. I dont know exactly how its done, but same procedure is followed if react app needs to be served from node/express server.
Or see if this helps: https://github.com/nicholaskajoh/React-Django

Is it possible to create a GUI with python on the Google Cloud Platform

I am trying to create a web application using python on the google cloud platform. I have followed Google's quick-start guide and completed it.
App currently just prints out text
However, I am struggling to figure out a way to create a gui. I am aware of the python modules tk and tkinter and I have tried to use those with no success. I also saw the warning in the Google Cloud Console about how installed modules only exist for the current instance of the app - but even when installing the module directly before deploying the app - it still throws an import error.
I did some research and followed this guide: https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27
Assuming I didn't miss any steps - would this guide solve my problem? Or is there a better way to create a GUI?
Any suggestions are encouraged. Thanks
App Engine is web oriented service. Read about it in the overview and the appropriate gui there would be a web based one.
If you want to have a remote server that will server graphical applications look closer at Google Cloud Compute Engine where you can have a VM instance, where you can install and run any application.

trying to setup TinyWebDB on google cloud, but deploy not working

I am trying to follow the instructions on this page, and they are working great, until the part where I deploy from my Google App Engine Launcher. When I click deploy I should see something like this:
But instead, I see something like this:
and the end result is that my app doesn't get deployed to xxxxxxx.appspot.com, it redirects me to http://localhost:8080/?code=4/EfmizPdAPVDgoSInA8mS1KVOvQTkWX4ziFnEpG3XKxA#
I'm a begginer with this kind of tech, please, any suggestions on how to troubleshoot?
Found the answer here. In my case, what worked was to first disable the app in the App Engine Launcher, and only then hit deploy. First time I tried, it authenticated, then second time I deployed, it deployed successfully. Thanks Arnie.
In case, I post his other suggestions:
1) remember to give your google id access to less secure apps.
2) remember to go to appspot.com or https://appengine.google.com/ and accept terms and conditions. Your project should also be active on https://console.developers.google.com/project
3) use correct versions of python and google app engine SDK
4) Before hitting deploy button on google app engine stop the app from running on your local host. It will NOT deploy while it is running locally on local host.

ImportError in Django Rest Framework with Google App Engine

I have develop a simple app to learn Django rest framework and then uploaded it into Google app engine. But each time I try to access my data it shows me "no module name rest_framework". it works ok if I dont use Google App engine and stop working if I use (both local install or deploy the codes). I am using django 1.4 and using Cloud SQL. Can anyone please tell me what might be the problem?
regards
Samin
screenshot:
A bit late but might help someone else, I was also trying to get a solution for this error then I came across this link which has all the thirdparty apps, google app engine support. It doesn't have rest_framework.
So a as a solution you will have to copy the third-party library's pure-Python source code into your application's source code.
here is a solution in detail.
Hope that helps!

Apache/wsgi/django configuration

We have two django applications running on the same server that interact with an API that uses oauth. They function as expected, communicating with each other, when run under the django development server. However, when deployed using apache/wsgi they don't work together.
(To be more specific, one application is an instance of the Indivo server; the other one is a custom application that interacts with Indivo.)
What is the best way to trouble shoot this?
Make sure that the Django instances are working by themselves first. For example, one app could be started under Apache, and the other using ./manage.py runserver. Reverse which one is running using Apache and verify that all works as expected.
Use the Apache error logs to look for errors such as failed requests.
Since one of your apps appears to implement a web API, use something like the Google Chrome Postman App to exercise the site from a web browser.
Learn how to use the Django logging framework to log information about your apps as they execute.