google-app-engine

Why does the Google App Engine warn me 'file referenced by handler not found : dailybasic.py' again and again?

走远了吗. 提交于 2020-01-07 06:28:07
问题 I'm coding with the GAE in python, and I tried to make two script files. So I make the app.yaml like this: application: mathgirlna version: 1 runtime: python api_version: 1 handlers: - url: /static static_dir: static - url: /dailybasic/.* script: /dailybasic.py login: admin - url: /.* script: main.py And when I see the logs, it says 'file referenced by handler not found : dailybasic.py'. I have no idea how the app.yaml have to be written. Here's my file tree: static index.css app.yaml index

How do I redirect www to non-www in Google App Engine

拥有回忆 提交于 2020-01-07 06:15:15
问题 My domain is bought from Godaddy and migrated to Amazon AWS. Previously we were using AWS and hosted our static website in AWS bucket but recently we moved to Google cloud platform and hosted our static website and wp blog in app engine. We manage our DNS in Amazon Route 53 and point dns to GAE. The problem is that our website can be browsed with both www and non www domain. Here, We wanted to redirect all the www to non-www domain. This cannot be done in Route 53 because we have pointed dns

How do I redirect www to non-www in Google App Engine

雨燕双飞 提交于 2020-01-07 06:15:02
问题 My domain is bought from Godaddy and migrated to Amazon AWS. Previously we were using AWS and hosted our static website in AWS bucket but recently we moved to Google cloud platform and hosted our static website and wp blog in app engine. We manage our DNS in Amazon Route 53 and point dns to GAE. The problem is that our website can be browsed with both www and non www domain. Here, We wanted to redirect all the www to non-www domain. This cannot be done in Route 53 because we have pointed dns

Google App Engine - Connect to remote datastore locally using Objectify

匆匆过客 提交于 2020-01-07 05:57:09
问题 I've looked everywhere and wasted a lot of time on something that I think is probably very simple. Thanks for the help in advance. I have a google app engine app using the cloud datastore written in Java. I have an entity class as follows: @Entity public class Student { @Id private Long studentId; @Index private League league; @Index private String year; private String firstName; private String lastName; ... } I have a csv file of 1K students. I need to upload this info into the cloud

Google App Engine - Connect to remote datastore locally using Objectify

女生的网名这么多〃 提交于 2020-01-07 05:57:08
问题 I've looked everywhere and wasted a lot of time on something that I think is probably very simple. Thanks for the help in advance. I have a google app engine app using the cloud datastore written in Java. I have an entity class as follows: @Entity public class Student { @Id private Long studentId; @Index private League league; @Index private String year; private String firstName; private String lastName; ... } I have a csv file of 1K students. I need to upload this info into the cloud

Displaying uploaded file in GAE Appengine with Python

混江龙づ霸主 提交于 2020-01-07 05:45:08
问题 I have stored pdf files uploaded by users in the Datastore, as BlobProperties: <form action="/" method="post" enctype="multipart/form-data"> <input type="file" name="pdf"> <input type="submit" value="Upload"> </form> with the following handler: def post(self): p = self.request.get('pdf') if p: person.pdf = p I have also tried this version of the last line: person.pdf = db.Blob(p) which seems to work the same way. I try to display it thus: <embed src="{{ person.pdf }}" width="500" height="375"

TypeError with get_or_insert

北城以北 提交于 2020-01-07 05:23:47
问题 Here is my code. import webapp2 import json from google.appengine.ext import ndb class Email(ndb.Model): email = ndb.StringProperty() subscribed = ndb.BooleanProperty() @staticmethod def create(email): ekey = ndb.Key("Email", email) entity = Email.get_or_insert(ekey) if entity.email: ### # This email already exists return None entity.email = email entity.subscribed = True entity.put() return entity class Subscribe(webapp2.RequestHandler): def post(self): add = Email.create(self.request.get(

Google Oauth2 in GWT and AppEngine

梦想与她 提交于 2020-01-07 04:57:30
问题 I'm trying to implement authentication for Google Drive: https://google-developers.appspot.com/drive/auth/web-server 1st, it's not obvious when the user is redirected to the Google login page to authenticate. It doesn't appear they are showing that part. 2nd, it doesn't show the call back code. I think I can figure that out and will need to add a new servlet or service or EntryPoint, but might be tricky with GWT. 3rd, and most important, I keep getting a ClassNotFoundException even though the

Django model Meta option unique_together for appengine

狂风中的少年 提交于 2020-01-07 04:53:04
问题 I have an app on appengine that stores some data fields entered by user. I want to prevent redundant entries, i.e. if all fields are same, data should not be entered in database. (Optional) If identical data is entered, value of a corresponding column "count" should be incremented. I tried using Django Meta option unique_together for this purpose but it doesn't seem to work. Identical data is still being stored in database. Please help. Here is my code: class Log(db.Model): name = db

JDO - Querying/linking child by parent (Google App Engine)?

别来无恙 提交于 2020-01-07 04:51:09
问题 I've been trying to get JDO working with parent/child relationships, but I'm not having much success. Using the relationship setup as seen here and queries as seen here, I want to be able to link a child to a parent, then be able to query for all children of a given parent. Unfortunately, I don't seem to be querying the children correctly. I keep getting the error: Class Parent for query has not been resolved. Check the query and any imports/aliases specification Here's what my code looks