google-app-engine

Struts2 ParametersInterceptor problem with oauth_token

I am developing an application in Struts2 with Twitter4J at GAE/J. I am getting following exception in the GAE log. Unable to understand whats wrong with it. com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'oauth_token' on 'class com.a...

Python Decorator for GAE Web-Service Security Check

In this post, Nick suggested a decoartor: http://stackoverflow.com/questions/1499832/python-webapp-google-app-engine-testing-for-user-pass-in-the-headers/1500047#1500047 I'm writing an API to expose potentially dozens of methods as web-services, so the decorator sounds like a great idea. I tried to start coding one based on this sam...

When should I be responding to HTTP HEAD requests on my website

My google app engine website is getting errors on the main url for HEAD requests because I am not accepting them. According to this, the HEAD request is for "testing hypertext links for validity, accessibility, and recent modification" What should be my "normal" response to HEAD requests be? I started accepting HEAD requests, to stop ...

Run a task every hour on the hour with App Engine's cron API

I need to run a task every hour on the hour (00:00, 01:00, 02:00, ..., 23:00) every day of the week, but can't seem to find an example in App Engine's docs of how to do this. There is an example of running at ask every hour, but this doesn't fit because the "start" of that hour depends on when you deploy the application. That is, if I d...

basic unique ModelForm field for Google App Engine

I do not care about concurrency issues. It is relatively easy to build unique form field: from django import forms class UniqueUserEmailField(forms.CharField): def clean(self, value): self.check_uniqueness(super(UniqueUserEmailField, self).clean(value)) def check_uniqueness(self, value): same_user = users.User.a...

Favourite Open Source Google App Engine apps (Java or Python)

To learn from good examples, what are the best open source Google App Engine applications out there? I don't care if it is Java or Python based. Please one app per answer. Feel free to add a link to the live app (if there is) and to the project page. ...

Receive multi file post with google app engine.

Hi I want to receive multi file post from image uploader.(i use this) Most examples show how to receive one image from post. I tried many ways but never got the results. For example self.request.POST['Filename'] gives only first filename. What to do when there are multiple files/images in post? The reason for this is to resize be...

Techniques to avoid DeadlineExceededException in GAE/J?

I am developing an Twitter4J web application in Google App Engine/Java. I need to show two lists. One is Twitter friends and other is followers. With photo and screen name. It is working fine for people who have 20-30 followers and friends. But it gave me DeadlineExceededException when I try a user who has 150+ followers and friends....

Could not create servlet in web application project (google app engine) by using eclipse

I am following Google App Engine Guestbook sample to create a new servlet in src folder. When the create servlet dialog open, I found I can't choose or type "Web Project" and can't browse to select "source folder" either. The eclipse is version 3.5, jdk I installed is 1.6.0_14-b08 I am working on Windows XP Pro with SP3. Before I tri...

taskqueues: zombie tasks

I have 7 tasks in my default queue that will not go away. I've used this solution to solve this in a non-default queue: http://groups.google.com/group/google-appengine-python/msg/4f3c7818285be873 I don't even see any HTTP 500s in my access log, it's as if the tasks are being "executed", but not really submitting any HTTP requests. Any...

urllib2: submitting a form and then redirecting

My goal is to come up with a portable urllib2 solution that would POST a form and then redirect the user to what comes out. The POSTing part is simple: request = urllib2.Request('https://some.site/page', data=urllib.urlencode({'key':'value'})) response = urllib2.urlopen(request) Providing data sets request type to POST. Now, what I su...

database-based content management system design

i'm looking for best practise on designing database schema for content management system. any reference on this? p/s: i do not plan to use open source lib. as i need to get it work on google app engine + JAVA ...

Google App Engine - Download Entire Live Application To Local

Recently, I upload the web application in my local to Google App Engine c:\LocalProject>c:\appengine-java-sdk-1.2.2\bin\appcfg.cmd update . Unfortunately, I accidental delete the whole folder "LocalProject" in my local disk. Is it possible that I can recover all my stuff, by downloading from Google App Engine? ...

App Engine image resize without maintaining aspect ratio?

When I call resize on images using app engine, they maintain their aspect ratio - I don't end up with the size I ask for. I'm trying to make rectangular pixel NTSC images from square pixel sources, so I don't want this behaviour I want to take an image that is 720x540 and resize it to 720x480 but what I actually end up when ask for the...

Zero results in Query/GqlQuery

How do I know if the results of my query either using the Query interface or the GqlQuery interface returned zero results? Would using .get() on zero results produce an error? If yes, what's the best way to handle it? ...

Converting urls into lowercase?

Is there any straightforward to convert all incoming urls to lowercase before they get matched against urlpatterns in run_wsgi_app(webapp.WSGIApplication(urlpatterns))? ...

Simple Facebook Connect in Google App Engine (Python)

Does anyone have a simple and successful demo implementation of facebook connect in an google app engine application. I am developing an web application and want facebook connect to be the primary method for logging in. ...

Deploying a web service to my Google App Engine application

Hi, We made a simple application and using GoogleAppEngineLauncher (GAEL) ran that locally. Then we deployed, using GAEL again, to our appid. It works fine. Now, we made a web service. We ran that locally using GAEL and a very thin local python client. It works fine. We deployed that, and we get this message when we try to visit our ...

AppEngine/Django: editing db.Key in the Admin app

Or, to be precise, how do I properly present a form to edit a db.ListProperty of db.Keys on a model admin page, with app-engine-patch for Django? I have a Category like this: class Category(db.Model): title = db.CategoryProperty(required=True) and a Post with this: categories = db.ListProperty(db.Key) Currently in the Django a...

App Engine GQL: querying a date range

What would be the App Engine equivalent of this Django statement? return Post.objects.get(created_at__year=bits[0], created_at__month=bits[1], created_at__day=bits[2], slug__iexact=bits[3]) I've ended up writing this: Post.gql('WHERE created_at > DATE(:1, :2, :3) AND created_at < DATE(:1, :2, :4) and slug = :5'...