google-app-engine

Google App Engine fetch() and print

泪湿孤枕 提交于 2020-01-07 04:28:28
问题 This is the model: class Rep(db.Model): author = db.UserProperty() replist = db.ListProperty(str) unique = db.ListProperty(str) date = db.DateTimeProperty(auto_now_add=True) I am writing replist to datastore: L = [] rep = Rep() s = self.request.get('sentence') L.append(s) rep.replist = L rep.put() and retrieve mylist = rep.all().fetch(1) I assume that mylist is a list. How do I print its elements? When I try it I end up with the object; something like [<__main__.Rep object at 0x04593C30>]

Save gwt entities to google application engine datastore with jdo, using rpc

孤人 提交于 2020-01-07 04:09:10
问题 Hello iam new to GWT framework. I want to persist my domain objects/entities to google application engine datastore using rpc. A simple implementation to test if i can make multiple rpc calls ( greetServer() , saveStudent() ) Student import javax.jdo.annotations.Extension; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import com.google.gwt.user.client.rpc

App Engine if elif else working on dev but not production

血红的双手。 提交于 2020-01-07 04:03:06
问题 When I run the following code user = users.get_current_user() if users.is_current_user_admin(): loggedin = 'Admin' elif user: loggedin = 'User' else: loggedin = 'Anonymous' on the development environment I get Admin when logged in as an Administrator, User as a User, and Anonymous when not logged in. When on production I always get Anonymous. Why is this not working? 回答1: The problem has nothing to do with if/elif/else or users.create_login_url(). The issue is with App Engine not recognizing

appengine 1.7.4 sdk and com.google.appengine.datanucleus.DatastoreManager not found

旧巷老猫 提交于 2020-01-07 04:00:22
问题 i have upgraded to appengine 1.7.4 and something is now broken. when deploying to local dev the appengine errors with the following. Class "com.google.appengine.datanucleus.DatastoreManager" was not found in the C LASSPATH. Please check your specification and your CLASSPATH. org.datanucleus.exceptions.ClassNotResolvedException: Class "com.google.appengin e.datanucleus.DatastoreManager" was not found in the CLASSPATH. Please check you r specification and your CLASSPATH. This is NOT a java.lang

GAE Logging disappeared? How to restore?

纵然是瞬间 提交于 2020-01-07 03:10:21
问题 Here's how I used to enable logging: Log into Google Developers Console From the dropdown at the top, choose the project to monitor. From the side bar, choose Monitoring, then Logs I can't find that feature any more. Now apparently I need to go into Google Cloud Monitoring and then... what? I tried creating a dashboard, but couldn't seem to find anything that just showed the event log. An RTFM would be welcomed if accompanied by a link. I have tried searching. I'd think that https://app

“ImportError: cannot import name OSRNG” when importing gcloud.storage in Google App Engine

ぐ巨炮叔叔 提交于 2020-01-07 03:07:02
问题 I have installed gcloud on my machine and it works correctly. When deploying to Google App Engine, I install all requirements to lib ( pip install -t lib -r requirements.txt ). 回答1: You have to add pycrypto to your libraries in app.yaml : libraries: - name: pycrypto version: "latest" 来源: https://stackoverflow.com/questions/34944968/importerror-cannot-import-name-osrng-when-importing-gcloud-storage-in-google

Unable to receive messages from GCM

不羁的心 提交于 2020-01-07 03:05:36
问题 am developing an android app that uses GCM to send and receive messages. am able ro register my app with GCM and receive GCM Registration Token. but am not being notified upon receiving new messages.(seems like nothing is hapenning in my MyGcmListenerService class.) i can only see my new messages upon reloading my chat user Interface(that is clicking the back button and then clicking again my chat button. nothing is taking place in my MyGcmListenerService.java !!!!) below are my classes and

Unable to receive messages from GCM

自古美人都是妖i 提交于 2020-01-07 03:05:15
问题 am developing an android app that uses GCM to send and receive messages. am able ro register my app with GCM and receive GCM Registration Token. but am not being notified upon receiving new messages.(seems like nothing is hapenning in my MyGcmListenerService class.) i can only see my new messages upon reloading my chat user Interface(that is clicking the back button and then clicking again my chat button. nothing is taking place in my MyGcmListenerService.java !!!!) below are my classes and

RuntimeError: autoconf error, while installing google-endpoints

百般思念 提交于 2020-01-07 02:56:36
问题 I am following this Cloud Endpoints quickstart guide, but I am having trouble installing google-endpoints using this command: $ pip install -t lib google-endpoints --extra-index-url=https://gapi-pypi.appspot.com/admin/nurpc-dev --ignore-installed The returned traceback is this: pip install -t lib google-endpoints --extra-index-url=https://gapi-pypi.appspot.com/admin/nurpc-dev --ignore-installed Collecting google-endpoints Using cached google-endpoints-2.0.0b3.tar.gz Collecting google

Sort Items Objectify Getting error No matching Index Found

走远了吗. 提交于 2020-01-07 02:55:08
问题 I am trying to sort a list of items by my property 'price' but I'm getting error. This is my filter items = ofy().load().type(MyItem.class) .filter("OtherEntityRef", tmpEntity) .order("price").limit(100) .list(); But we I run it, the log shows the erro: Uncaught exception from servlet java.io.IOException: com.google.appengine.repackaged.org.codehaus.jackson.map.JsonMappingException: no matching index found. The suggested index for this query is: <datastore-index kind="MyClass" ancestor="false