Created
January 31, 2012 14:38
-
-
Save tokibito/1710819 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.appengine.ext import db | |
class Foo(db.Model): | |
a_value = db.IntegerProperty() | |
def save_foo_values_1(values): | |
for value in values: | |
obj = Foo(a_value=value) | |
obj.put() | |
def save_foo_values_2(values): | |
foo_objects = [] | |
for value in values: | |
obj = Foo(a_value=value) | |
foo_objects.append(obj) | |
db.put(foo_objects) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment