What is the best way to keep code modular and decoupled but avoid entering a transaction twice?
Entities often have class methods to load, modify, and store data. Often, this must be transactional to be consistent with child/sibling/cousin entities. Here is the pattern:
class MyEntity(db.Model):
# ... some properties
@classmethod
...
I'm trying to use a third-party lib (docutils) on Google App Engine and have a problem with this code (in docutils):
try:
import pwd
do stuff
except ImportError:
do other stuff
I want the import to fail, as it will on the actual GAE server, but the problem is that it doesn't fail on my development box (ubuntu). How to make...
so I am trying to build a google app engine using servlets, filters etc. I have a java file that looks something like:
public class Idea implements Comparator<Idea> {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private User author;
@Persistent
private String content;
@Persistent
...
Hello,
In GAE, you can say users.get_current_user() to get the currently logged-in user implicit to the current request. This works even if multiple requests are being processed simultaneously -- the users module is somehow aware of which request the get_current_user function is being called on behalf of. I took a look into the code of ...
I am storing my templates in the database and I don't have any path to provide for the template.render method.
Is there any exposed method which accepts the template as a string?
Is there any workaround?
...
A REST XML (not JSON!) Web Service should exchange XML Schema specified XML between a Google App Engine and an Android app.
I wanted to use XStream for both, however, I could not get it to work for the Google App Engine, therefore to me Apache XMLBeans is the next best choice (JAXB does not work on both).
However, with Google App Engine...
Hi all,
I am currently using Google AppEngine(Java) to build a web site.
I created a bean to be cached in the memcache, when I retrieved it from the memecache and called some methods on it to update its status, do I need to re-cache it into memcache?
I guess that memcache used its reference, so I should not need to do it. But things ...
Hi,
I am trying to append 2 images (as byte[] ) in GoogleAppEngine Java and then ask HttpResponseServlet to display it.
However, it does not seem like the second image is being appended.
Is there anything wrong with the snippet below?
...
resp.setContentType("image/jpeg");
byte[] allimages = new byte[1000000]; //1000kB in size
int de...
I attempted to add an <admin-console> section to my appengine-web.xml and I got the exception below. The <admin-console> element is a valid element according to the appengine-web.xsd. It's also documented in the app engine docs. Any ideas as to what is wrong?
<admin-console>
<page name="My Admin" url="/app/admin" />
</admin-console>...
Has anyone been able to get sitemesh and gaelyk working together? This seems to be possible as mentioned here http://blogs.bytecode.com.au/glen/2009/12/14/getting-sitemesh-running-on-google-app-engine.html. However I unable to get this working with a gaelyk template. I keep getting this error
"javax.servlet.ServletException:
Creat...
Is it possible to somehow enable editing lists in GAE datastore viewer?
I'm using Python version of SDK.
Basically I want to avoid, as much as possible, writing own CRUD as it
wouldn't be necessary if only I could edit lists in datastore viewer..
...
Hi,
How can I join 2 images/append in google app engine?
I cannot find any transform that does it.
Thanks
...
Just wondering to know. Anyone has thoughts about it?
...
When I get a GET request from a user, I send them the response and then spend maybe a second logging stuff about that request. Is there a way to close the connection when I have the response ready, but continue doing that logging part, so that the user wouldn't have to wait for it to complete?
...
The Google App Engine Launcher tells me:
WARNING appengine_rpc.py:399 ssl module not found.
Without the ssl module, the identity of the remote host cannot be verified, and
connections may NOT be secure. To fix this, please install the ssl module from
http://pypi.python.org/pypi/ssl .
I downloaded the package and it contained ...
Hello I can't think of a way to test this and was hoping someone here knew the answer... I'm storing some request-specific data in os.environ, and was wondering if that data was going to leak to other requests. Does anyone know?
Yes I realize that it's normal to use request.environ for this, and usually I do, but I want to store the cu...
I've got two systems that need to talk. The systems are setup likeso:
System A, running Django (Python 2.5) on Google App Engine (GAE)
System B, running Django (Python 2.6) on Ubuntu/Linux over Lighttpd (maybe nginx, later)
System A will periodically make requests ('requisitions') of System B using Url Fetch.
System B has a Django ap...
I am looking for a Java or Python library that can render graphs in the Dot language as image file. The problem is that I need a library that I can use on Google App Engine. Basically I am looking for a library that can convert the text description of a directed graph into an image of the graph.
For example:
Covert this edge list:
[A...
Hi guys,
I have been struggling with this for over two days and I could use your help. Here's the problem:
Whenever a request is made to the Facebook REST server, we have to send an additional parameter called "sig". This sig is generated using the following algorithm:
<?php
$secret = 'Secret Key'; // where 'Secret Key' is your appli...
hi guys. I live in China and the Great Firewall blocked Youtube and twitter. So I want to build a proxy server on google appengine in python to bypass that. Does anyone know any open source GAE project on that?
Thx~
...