This file contains 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
def migrate_blobstore(entity): | |
" Migrate entities with blob fields from another app. " | |
import urllib, mimetypes | |
from google.appengine.api import files | |
modified = False | |
fields = entity.get_blob_fields() | |
logging.debug("Fields are: %s" % fields) | |
for field in fields: |
This file contains 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
class BlobMigrationHandler(YourCustomHandler): | |
" List out the blob keys so we can migrate them. " | |
def get(self): | |
CHUNK = 300 | |
cursor = self.request.GET.get('cursor') | |
q = blobstore.BlobInfo.all() | |
This file contains 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
# Copyright 2008 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains 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
""" | |
Thanks to [email protected] (Rafe Kaplan) for this tip. | |
Create a .proto file from a module containing ProtoRPC Message | |
classes. | |
""" | |
import logging | |
from protorpc import descriptor | |
from protorpc import generate |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css" rel="stylesheet" type="text/css"/> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<title>Testy</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function() { |
This file contains 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
--- /google_appengine.old/google/appengine/ext/testbed/__init__.py 2011-12-12 13:12:00.000000000 -0600 | |
+++ /google_appengine.new/google/appengine/ext/testbed/__init__.py 2011-12-20 16:25:45.000000000 -0600 | |
@@ -125,6 +125,8 @@ | |
from google.appengine.api.memcache import memcache_stub | |
from google.appengine.api.taskqueue import taskqueue_stub | |
from google.appengine.api.xmpp import xmpp_service_stub | |
+from google.appengine.api.search import simple_search_stub | |
+ | |
try: | |
from google.appengine.datastore import datastore_sqlite_stub |
This file contains 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
diff --exclude='*.pyc' -Naur ndb.old/key.py ndb/key.py | |
--- ndb.old/key.py 2011-12-20 10:27:11.000000000 -0600 | |
+++ ndb/key.py 2011-12-21 11:23:49.000000000 -0600 | |
@@ -514,6 +514,8 @@ | |
if not cls._is_default_hook(model.Model._default_post_get_hook, | |
post_hook): | |
fut.add_immediate_callback(post_hook, self, fut) | |
+ internal_post_hook = model.Model._post_get_hook_internal | |
+ fut.add_immediate_callback(internal_post_hook, self, fut) | |
return fut |
This file contains 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
--- ndb.old/polymodel_test.py 2011-12-20 10:27:11.000000000 -0600 | |
+++ ndb/polymodel_test.py 2011-12-22 19:26:29.000000000 -0600 | |
@@ -7,6 +7,7 @@ | |
import unittest | |
from google.appengine.api import namespace_manager | |
+from google.appengine.api import datastore_types | |
from . import polymodel | |
from . import model |
This file contains 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
diff -Naur -x '*.pyc' ndb.old/model.py ndb/model.py | |
--- ndb.old/model.py 2012-03-02 16:04:15.000000000 -0600 | |
+++ ndb/model.py 2012-03-02 16:11:18.000000000 -0600 | |
@@ -2525,6 +2525,7 @@ | |
app is not None or namespace is not None): | |
self._key = Key(self._get_kind(), id, | |
parent=parent, app=app, namespace=namespace) | |
+ self._is_loaded = False | |
self._values = {} | |
self._set_attributes(kwds) |
This file contains 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
# -*- coding: utf-8 -*- | |
#!/usr/bin/env python | |
""" | |
Model for microformat properties and parsers. A microformat parser can | |
parse an HTML element into a dictionary of properties, whose keys are | |
strings and whose values are strings or other dictionary of properties. | |
As an example, the main program of this script parses an hResume from | |
given URL. |
OlderNewer