google-app-engine

Calling a python method to fetch data, from a javascript function on the html page

Deadly 提交于 2020-01-12 10:34:09
问题 Technologies being used Google app engine Django Python Jquery Details of the code and code excerpts I have a drop-down list (country) and a text-box (city) { the drop-down list and text-box are generated by a django-form} that get automatically populated by a GeoIp library Image of how these UI elements look on the html page: Code excerpt that fills in the drop-down list and the text-box: // selecting users country and users city, // the id for users country drop-down list is "id_country

Calling a python method to fetch data, from a javascript function on the html page

。_饼干妹妹 提交于 2020-01-12 10:33:14
问题 Technologies being used Google app engine Django Python Jquery Details of the code and code excerpts I have a drop-down list (country) and a text-box (city) { the drop-down list and text-box are generated by a django-form} that get automatically populated by a GeoIp library Image of how these UI elements look on the html page: Code excerpt that fills in the drop-down list and the text-box: // selecting users country and users city, // the id for users country drop-down list is "id_country

Python: Google App Engine , JavaScript Channel API to call back end

北战南征 提交于 2020-01-12 09:18:07
问题 Hi I am quite new to java script and i am looking a working example to call back ends using java script channel API . I do not have any idea about channel API . Can anyone provide me a working example 回答1: If you're asking how to get a message from the backend to a javascript client: you can't send messages from a backend server to a channel created on a frontend server. This is because the app version number is included in the channel token, and backends have a different app version than

GAE Blobstore file-like API deprecation timeline (py 2.7 runtime)

只愿长相守 提交于 2020-01-12 08:28:14
问题 This is a question for the App Engine team. Last week we realized that the App Engine team had marked the file-like API for writing and reading to the blobstore as being deprecated and likely to be removed in the future. We have quite a bit of infrastructure relying on that API that now we need to port to the alternative they suggest (Google Cloud Storage) and this is not a trivial effort (especially considering our current backlog). So the question is: how soon will this file-like API be

google app engine session

*爱你&永不变心* 提交于 2020-01-12 07:50:10
问题 what is java app engine,default session time out ? will that be any bad impact if we set sesion time out to very very long time, since google app engine session is just store in datastore by default? (just like facebook, each time you go to the page, the session still exist forever) ? 回答1: Default session timeout is set to 30 Minutes. (you can verify it calling getMaxInactiveInterval method) With that fairly limited info about your app, I don't see any impact. Using setMaxInactiveInterval(-1)

Converting UTC datetime to user's local date and time

强颜欢笑 提交于 2020-01-12 05:42:05
问题 I'm using python on Django and Google App Engine. I'm also using the DateTimeProperty in one of my models. Occasionally I would like to display that date and time to the user. What is the best to convert the datetime stored in DateTimeProperty into the user's datetime? Or a more precise way of framing the question: What is the best way to get a client's timezone and convert a python datetime object into their own local time? 回答1: This is more a Python question, than a GAE one, unless GAE has

How do I access session data in Jinja2 templates (Bottle framework on app engine)?

和自甴很熟 提交于 2020-01-12 05:32:07
问题 I'm running the micro framework Bottle on Google App Engine. I'm using Jinja2 for my templates. And I'm using Beaker to handle the sessions. I'm still a pretty big Python newbie and am pretty stoked I got this far :) My question is how do I access the session data within the templates? I can get the session data no problem within the actual python code. And I could pass the session data each time I call a jinja template. But since I need the session data in the main menu bar of the site...

GAE standard Flask tutorial: ImportError: cannot import name SpooledTemporaryFile

China☆狼群 提交于 2020-01-12 05:25:06
问题 I'm trying the use this GAE Flask tutorial. I believe I followed it exactly and I downloaded the code from Github so there are no typos. When I start the dev server ( dev_appserver.py app.yaml ) and go to http://localhost:8080/form, I get this error: Traceback (most recent call last): File "/Users/.../google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File "/Users/.../google-cloud

Cannot import google cloud endpoints client library class in Android project

青春壹個敷衍的年華 提交于 2020-01-12 03:41:06
问题 I'm having difficulty getting Google Cloud Endpoints working. I have an Python endpoints project running on GAE and it works perfectly using the api explorer. However I'm struggling to properly generate the client library and use it in my android app. I've tried a number of sample projects and have the same problem every time; I can't import and use the model classes from the client libraries. Here's what I'm doing (for this example I'll use the helloworld api python sample at https://github

Without joins on Google App Engine, does your data have to exist in one big table?

瘦欲@ 提交于 2020-01-12 03:13:07
问题 Since Google App Engine doesn't permit joins, does this mean that I have to take all of the tables in my web app and figure out a way of combining them into a single huge table? 回答1: Just because you don't have joins implemented by the DBMS doesn't mean you can't have multiple tables. In App Engine, these are called 'entity types', and you can have as many of them as you want. Generally, you need to denormalize your data in order to avoid the need for frequent joins. In the few situations