I have a set of checkboxes with multiple choice allowed. I parse the set this way:
if ($("input[name='route_day']:checked").length > 0) {
$("input[name='route_day']:checked").each(function(){
if(this.value != null)
route_days_hook.push(this.value);
});
dataTrap.route_days = $.JSON.encode(route_days_hook);
}
...and pu...
Hi,
Reading the docs for transactions:
http://code.google.com/appengine/docs/java/datastore/transactions.html
An example provided shows one way to make an instance of an object:
try {
tx.begin();
Key k = KeyFactory.createKey("SalesAccount", id);
try {
account = pm.getObjectById(Employee.class, k);
} catch (JD...
I have following code running perfectly. It filter records based on single parameter.
public List GetOrders(String email)
{
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(Orders.class);
query.setFilter("Email == pEmail");
query.setOrdering("Id desc");
query.declareParame...
I've got 10+ years in C/C++, and it appears Visual Studio has spoilt me during that time. In Visual Studio, debbuging issimple: I just add a breakpoint to a line of code, and as soon as that code is executed, my breakpoint triggers, at which point I can view a callstack, local/member variables, etc.
I'm trying to achieve this functiona...
Hello everyone, i am writing an FBML app on facebook hosted in GAE. Facebook will talk to your hosted app only vai POST (im sure this is the cause, but please do correct me if i'm wrong). So im faced with the issue that inside of my POST method, i need to redirect to facebook OAuth authroize URL. But i can only send a GET request. How ca...
Hi!
I'm developing GAE application in Eclipse with PyDev and am using gaeunit for testing.
gaeunit generates output in web browser like this:
Traceback (most recent call last):
File "tests\test_user.py", line 9, in test_current_user
user = users.current_user
AttributeError: 'User' object has no attribute 'current_user'
I want ...
Is there support for sliding expiration in the GAE MemcacheService? I can do a crude implementation where following every get() I do a put(). This will effectively reset the expiration time but this obviously is not an efficient solution.
Any pointers on how I can implement this more efficiently?
Thanks,
Keyur
...
I'm trying to create a relationship between "tables" with Appengine/Python. Imagine I have a "table" for items, and a table for colors. I save the color of an item by saving the color key as an atribute of the item.
That's working well, but this particular piece of code is not working:
<select id="colorKey" name="colorKey">
{% for c...
I configured gwt with spring and spring security that works fine on local development server on google app engine.
I deployed to the appspot but there it shows critical error when i see on the log.
and on the browser side shows 500 server error.
log error
Uncaught exception from servlet
javax.servlet.UnavailableException: Initializ...
I have been looking around a bit for info on how to do this. Essentially I have a Model:
class SharableUserAsset(db.Model):
name = StringProperty()
users = ListProperty(users.User)
My questions are:
What is the best way to associate users to this value where they are not authenticated, visa vi invite from contacts list etc.?
Is ...
I'm developing a simple GAE application that crawl some data from a given site and present it formatted in html\css.
What i would like to do now is to offer the "Export to PDF feature" trasforming the formatted html\css to PDF.
I've imported Reportlab Toolkit and it works good but it's not what i need since it forces me to create PDF ma...
Is it possible to change User-Agent of Google App Engine UrlFetch service?
...
I wonder if there are any best practices/patterns for deploying python apps on Google app engine specifically Django. The best practice should be combination of existing best practices viz. Fabric, Paver, Buildout etc. Also please share best practice patterns for developing (I could not get virtualenv running with Django and Django App e...
I have some records in datastore, I want to delete a specific record from the table. for example in SQL , we use delete * from table1 where name ="mike" what is the equivalent code in java (I m using Eclipse with Google appengine API plugin)? or any other method to do that?
...
I have Karmic Koala which has Python 2.6 installed by default.
However I can't run any Python App Engine projects because they require Python 2.5 and python ssl.
To install ssl I installed python2.5-dev first while following some instructions I found elsewhere.
sudo apt-get install libssl-dev
sudo apt-get install python-setuptools
sud...
I added this line to my .bashrc (Ubuntu 9.10):
export PYTHONPATH=/opt/google_appengine/
And then I ran the dev_appserver through python2.5 on Ubuntu like this:
$ python2.5 dev_appserver.py guestbook/
python2.5: can't open file 'dev_appserver.py': [Errno 2] No such file or directory
As you can see, it can't find dev_appserver.py eve...
I store user-uploaded images in the Google App Engine datastore as db.Blob, as proposed in the docs. I then serve those images on /images/<id>.jpg.
The server always sends a 200 OK response, which means that the browser has to download the same image multiple time (== slower) and that the server has to send the same image multiple times...
Hi,
I'd like to write some Python unit tests for my Google App Engine. How can I set that up? Does someone happen to have some sample code which shows how to write a simple test?
...
I am building a web application on Google App Engine that requires users to register with the application and subsequently authenticate with it and maintain sessions. I don't want to force users to have Google accounts. Also, the target audience for the application is the average non-geek, so I'm not very keen on using OpenID or OAuth....
I am trying to create a simple view in Django & GAE, which will check if the user has a profile entity and prints a different message for each case. I have the program below, but somehow GAE always seem to return a object. My program is below
import datetime
from django.http import HttpResponse, HttpResponseRedirect
from google.appengi...