FAQ Database Discussion Community


AppEngine urlfetch validate_certificate=False/None not being respected

google-app-engine,google-app-engine-python
I am making a fetch like this: result = urlfetch.fetch(url=url, method=method, payload=payload, deadline=DEADLINE, validate_certificate=None) Passing False for validate_certificate yields no benefit. I am getting an error like this: SSLCertificateError: Invalid and/or missing SSL certificate for URL The server certificate is self signed. Using Python 2.7.9 via Homebrew on OS X...

How do I make sure imported files are uploaded to Google App Engine?

python,google-app-engine,google-app-engine-python
I have an application whose entry point is defined in Emily.py. Emily.py imports EmilyBlogModel.py and EmilyBlogModel.py imports EmilyTreeNode.py. When using appcfg.py to upload this app to Google App Engine, how do I make sure that the all my files are uploaded?...

Google Appengine Search API to Datastore Query

google-app-engine,app-engine-ndb,google-search-api,google-app-engine-python
I construct the Search API data like search.SearchResults( results= [ search.ScoredDocument(doc_id=u'4873035534303232', fields=[search.TextField(name=u'name', value=u'a'), search.TextField(name=u'description', value=u'b'), search.DateField(name=u'date', value=datetime.datetime(2015, 2, 16, 7, 21, 58, 188000)), search.TextField(name=u'author', value=u'[email protected]')], language=u'en', rank=130231318L), search.ScoredDocument(doc_id=u'5717460464435200', fields=[search.TextField(name=u'name', value=u'a b c'),...

How do I only show certain items in a bootstrap navbar based on cookies in Python?

python,twitter-bootstrap,google-app-engine,google-app-engine-python
My bootstrap navbar is in my base template and looks like this: <ul class="nav navbar-nav"> <li><a href="/">Home</a></li> <li><a href="/about">About</a></li> <li><a href="/post">New Post</a></li> <li><a href="/login">Login</a></li> <li><a href="/logout">Logout</a></li> <li><a href="/register">Register</a></li> </ul> I want to make the navbar hide the New Post and Logout list items...

Migrating from App Engine Files API

google-app-engine,google-app-engine-python
My app stores a bunch of images as blobs. This is roughly how I store images. from google.appengine.api import files # ... fname = files.blobstore.create(mime_type='image/jpeg') with files.open(fname, 'a') as f: f.write(image_byte) files.finalize(fname) blob_key = files.blobstore.get_blob_key(fname) To serve these images, I use images.get_serving_url(blob_key). Here are my questions: Will I have to...

Does AppEngine Cloud Trace require AppStats?

google-app-engine,appstats,google-app-engine-python,google-cloud-trace
Google's AppEngine has upgraded their Developer's Console and it includes a monitoring tool called Cloud Trace. Is this an improved version of the AppStats profiling tool? If so, can I remove the configuration files that were previously required, like appengine_config.py and the console path in app.yaml? builtins: - appstats: on...

Get properties of ndb model instance where Python name != datastore name

python,google-app-engine,app-engine-ndb,google-app-engine-python
Goal: get "Python names" of attributes from an instance of Example, where the model was defined with a different datastore name To provide some context, I have a custom to_dict() method for serializing an NDB Model. The core of the method is as follows: for key, prop in self._properties.iteritems(): if...

How to execute tasks in (FIFO) order using Google App Engine Task Queues?

google-app-engine,google-app-engine-python
I believe task queues (push, pull, deferred) in Google App Engine do not guarantee that tasks will be executed in FIFO order. For example, suppose I have a task queue with tasks A, B, and C, and each task has timestamps t_A, t_B, and t_C, such that t_A < t_B...

App Engine - NDB query with projection requires subproperty?

google-app-engine,gae-datastore,app-engine-ndb,google-app-engine-python
I have the following objects: class Address(ndb.Model): type = ndb.StringProperty() # E.g., 'home', 'work' street = ndb.StringProperty() city = ndb.StringProperty() class Friend(ndb.Model): first_name = ndb.StringProperty() # E.g., 'home', 'work' last_name = ndb.StringProperty() class Contact(ndb.Model): name = ndb.StringProperty() addresses = ndb.StructuredProperty(Address, repeated=True) friends = ndb.StructuredProperty(Friend, repeated=True) And now to optimize the...

GAE appends current url to css path thus causing 404 on files

google-app-engine,routes,google-app-engine-python
This is the route that the css path is being appended: app = webapp2.WSGIApplication([ ('/edit/([\d]+)' , EditUserHandler), ], debug=True) Handler: class EditUserHandler(BaseHandler): def get(self, user_id): user_key = ndb.Key('User',int(user_id)) user = user_key.get() self.render( 'edit.html', user) app.yaml: - url: /css static_dir: builds/development/css HTML(edit.html) where the handler is called: {% extends "base.html" %}...

Google push-to-deploy release pipeline disabled?

python,google-app-engine,jenkins,google-compute-engine,google-app-engine-python
I do have got a small Python application running on Google App Engine. For a while I did use Google's push-to-deploy feature, which automatically deployed the app once I pushed a new version of the master branch to my bitbucket git-repository. I recently renamed my repository and noticed that the...

ComputedProperty only updates on second put()

python,google-app-engine,app-engine-ndb,google-app-engine-python
I have a ComputedProperty inside a StructuredProperty that does not get updated when the object is first created. When I create the object address_components_ascii does not get saved. The field is not visible in the Datastore Viewer at all. But if I get() and then immediately put() again (even without...

Unable to deploy an application module on AppEngine

google-app-engine,google-app-engine-python
I am unable to deploy an application module. appcfg.py update --oauth2 app.yaml producer.yaml Error 409: --- begin server output --- Another transaction by user rue1401 is already in progress for app: s~lpsng2, version: 4. That user can undo the transaction with "appcfg rollback". --- end server output --- Doing an...