google-app-engine

Why do Datastore datetimes look different in appengine console vs appengine dashboard?

让人想犯罪 __ 提交于 2020-01-05 11:03:46
问题 I have a very simple NDB model for which I'm entering Date-of-Birth for a user: class Contact(ndb.Model): first_name= ndb.StringProperty() last_name= ndb.StringProperty() dob = ndb.DateTimeProperty() contact1_dob = datetime.strptime('12/17/1989', "%m/%d/%Y").date() contact1 = Contact(first_name='Homer', last_name='Simpson', dob=contact1_dob ) contact1_result = contact1.put() Loading into the datastore works fine, and when I look at the data via the Google Appengine dashboard https://appengine

Open SQLite database on Google App Engine

让人想犯罪 __ 提交于 2020-01-05 10:26:35
问题 Is there anyway to open and read a SQLite database file on GAE? I am currently uploading dbs to blobstore as admin and serving them publicly to user clients. I just can't read them in the GAE admin interface. 回答1: Short answer, no it is not possible to use a SQLite database on a standard Google App Engine application as it is not currently supported. However, you can give a try at implementing your own configuration with the App Engine Flexible Environment that allows to take advantage of

Sublime text 2 google app engine code completion

你。 提交于 2020-01-05 10:11:42
问题 just trying out sublime text and like it, but is there any way to customize it for use with google app engine? Would be nice to at least have code completion. Thanks 回答1: If you're not already using it, install Package Control and then install SublimeCodeIntel. While not specifically for GAE, it provides intelligent code completion for any modules that are imported into your code. The initial run will take a while, as it has to index everything and GAE is quite large, but it'll definitely

Sublime text 2 google app engine code completion

夙愿已清 提交于 2020-01-05 10:11:34
问题 just trying out sublime text and like it, but is there any way to customize it for use with google app engine? Would be nice to at least have code completion. Thanks 回答1: If you're not already using it, install Package Control and then install SublimeCodeIntel. While not specifically for GAE, it provides intelligent code completion for any modules that are imported into your code. The initial run will take a while, as it has to index everything and GAE is quite large, but it'll definitely

Get or Create matching Key and User (Python - App Engine)

流过昼夜 提交于 2020-01-05 10:09:11
问题 Trying to match a record and user using 'get_or_insert' in Python on Google App Engine. Using the below Models, I want to check if a User has a record for a Book already created (listed in BookUser), if they do have a record in BookUser get the details for it. If they don't create it with XX data and associate it to the Book and User. class User(db.Model): id = db.StringProperty() name = db.StringProperty() image = db.BlobProperty(default=None) class Book(db.Model): image = db.BlobProperty()

Save an entity to memcache but not the disk with Objectify

眉间皱痕 提交于 2020-01-05 09:59:38
问题 I've got an entity that I use for non-critical logging of game completion rates, basically just simple counters. Due to the fact this will be updated hundreds of thousands of times a day (and hopefully growing) it'll live (almost) permanently in memcache. To save myself from having to pay for those hundreds of thousands of writes of non-critical data I'm happy to risk having to object persisted in memcache with a disk write only every 15 minutes or so. I can't see any obvious way to do it,

Save an entity to memcache but not the disk with Objectify

耗尽温柔 提交于 2020-01-05 09:50:03
问题 I've got an entity that I use for non-critical logging of game completion rates, basically just simple counters. Due to the fact this will be updated hundreds of thousands of times a day (and hopefully growing) it'll live (almost) permanently in memcache. To save myself from having to pay for those hundreds of thousands of writes of non-critical data I'm happy to risk having to object persisted in memcache with a disk write only every 15 minutes or so. I can't see any obvious way to do it,

Can I use a python regex for letters, dashes and underscores?

余生颓废 提交于 2020-01-05 09:25:09
问题 I want to handle geographic names i.e /new_york or /new-york etc and since new-york is django-slugify for New york then maybe I should use the slugifed names even if names with underscores look better since I may want to automate the URL creation via an algorithm such as django slugify. A guess is that ([A-Za-z]+) or simply ([\w-]+) can work but to be safe I ask you which regex is best choice in this case. I've already got a regex that handles number connecting numbers to a class: ('/([0-9]*)

Objectify BATCH delete has no effect

你说的曾经没有我的故事 提交于 2020-01-05 09:15:27
问题 I have a DAO below, with a transactional delete per entity and in batch . Deleting one entity at a time works just fine. Batch delete has NO effect whatsoever : the code below is simple and straightforward IMO, but the call to deleteMyObjects(Long[] ids) - which calls delete(Iterable keysOrEntities) of Objectify - has no effect ! public class MyObjectDao { private ObjectifyOpts transactional = new ObjectifyOpts().setBeginTransaction(true); private ObjectifyOpts nonTransactional = new

Objectify BATCH delete has no effect

一世执手 提交于 2020-01-05 09:15:22
问题 I have a DAO below, with a transactional delete per entity and in batch . Deleting one entity at a time works just fine. Batch delete has NO effect whatsoever : the code below is simple and straightforward IMO, but the call to deleteMyObjects(Long[] ids) - which calls delete(Iterable keysOrEntities) of Objectify - has no effect ! public class MyObjectDao { private ObjectifyOpts transactional = new ObjectifyOpts().setBeginTransaction(true); private ObjectifyOpts nonTransactional = new