google-app-engine

Exception Handling in google app engine

i am raising exception using if UserId == '' and Password == '': raise Exception.MyException , "wrong userId or password" but i want print the error message on same page class MyException(Exception): def __init__(self,msg): Exception.__init__(self,msg) ...

Entities groups in transactions

In the context of "Keys and Entity Groups" article by google: http://code.google.com/appengine/docs/python/datastore/transactions.html 1) "Only use entity groups when they are needed for transactions" 2) "Every entity belongs to an entity group, a set of one or more entities that can be manipulated in a single transaction." It seems l...

What's faster Model.get(keys) or Model.get_by_id(ids, parent=None)

I'm wondering is there a difference in terms of computing cost for the Model.get(keys) and Model.get_by_id(ids, parent=None) methods? Is there a server side computing advantage of using numeric id's over encoded string keys, or other way around? How big is the difference? PS. Sorry if it's a dupe. I'm sure I read an article about it, b...

Add code/jars to a google app engine application after initial deployment

I am playing around with google app engine and I'm thinking about starting an open source project that does something similar to Zikula (formerly known as postnuke) or more or less portal servers. So I'd like to have a kernel that provides certain services like page management, user management, ... and "modules" (or portlets in case of t...

GQL example for server side admin console query with reference property filter.

How to construct a GQL query using server side admin datastore viewer, a one that filters on a reference property? SELECT * from Model where reference_property = <what goes here> ...

problem implementing a web based proxy on google app engine using java

i am triying to write a web based proxy site on google app engine.Displaying the first page of entered url was fairly simple urlFetching api but i am unable to figure out how to proxify the links and requests origionating from this newly displayed page. ...

OSGI on google app engine?

I am evaluating several technologies for an open source app for the google app engine. I'm searching for information regarding OSGI on googles app engine. I have found Lemmon but it seems to be a dead project. The last checkin was in mid 2009... :-/ There is also a eclipse blog entry from april 2009, but it's not a real success story. ...

Most efficient way to fetch and output Content with 2-Level Comments?

I have some content with up to 2-levels of replies. I am wondering what the most efficient way to fetch and output the replies. I should note that I am planning on storing the comments with fields content_id and reply_to, where reply_to refers to which comment it is in reply to (if any). Any criticism on this design is welcome. In pseud...

How to list kinds in datastore?

I just had to figure this out for my own application, so reposting the answer here. ...

In this example, would Customer or AccountInfo properly be the entity group parent?

In this example, the Google App Engine documentation makes the Customer the entity group parent of the AccountInfo entity. Wouldn't AccountInfo encapsulate Customer rather than the other way around? Normally I would think of an AccountInfo class as including all of the information about the Customer. import javax.jdo.annotations.IdGener...

How to call Twiter's Streaming/Filter Feed with urllib2/httplib?

Update: I switched this back from answered as I tried the solution posed in cogent Nick's answer and switched to Google's urlfetch: logging.debug("starting urlfetch for http://%s%s" % (self.host, self.url)) result = urlfetch.fetch("http://%s%s" % (self.host, self.url), payload=self.body, method="POST", headers=self.headers, allow_trun...

Spring - Redirect after POST (even with validation errors)

I'm trying to figure out how to "preserve" the BindingResult so it can be used in a subsequent GET via the Spring <form:errors> tag. The reason I want to do this is because of Google App Engine's SSL limitations. I have a form which is displayed via HTTP and the post is to an HTTPS URL. If I only forward rather than redirect then the use...

Filtering by entity key name in Google App Engine on Python

On Google App Engine to query the data store with Python, one can use GQL or Entity.all() and then filter it. So for example these are equivalent gql = "SELECT * FROM User WHERE age >= 18" db.GqlQuery(gql) and query = User.all() query.filter("age >=", 18) Now, it's also possible to query things by key name. I know that in GQL you d...

How to localize an app on Google App Engine?

What options are there for localizing an app on Google App Engine? How do you do it using Webapp, Django, web2py or [insert framework here]. 1. Readable URLs and entity key names Readable URLs are good for usability and search engine optimization (Stack Overflow is a good example on how to do it). On Google App Engine, key based querie...

Python and App Engine project structure

Hello, I am relatively new to python and app engine, and I just finished my first project. It consists of several *.py files (usually py file for every page on the site) and respectively temple files for each py file. In addition, I have one big PY file that has many functions that are common to a lot of pages, in I also declared the cl...

How to finish a broken data upload to the production Google App Engine server?

I was uploading the data to App Engine (not dev server) through loader class and remote api, and I hit the quota in the middle of a CSV file. Based on logs and progress sqllite db, how can I select remaining portion of data to be uploaded? Going through tens of records to determine which was and which was not transfered, is not appealin...

Why does a JRuby application on App Engine take so long to start (versus a Python app)?

I'm considering using JRuby on App Engine but have heard that Juby app on App Engine have a long startup lag versus a Python app. Why is this? Is it because the JRuby jar files are so large that a cold startup requires them to be loaded into memory before the app can start serving? That would be my guess but I'm not sure if that's a p...

How do you access second parameter of a servlet's web.xml file?

Say in my web.xml file, I define a servlet like so: <url-pattern>/MyURL/*</url-pattern> How do i access anything passed in the * in my servlet? I'm planning to use use this scheme for pretty(-ish) URLs. ...

SmartGWT - Appengine - 404 not found

Im using smartGWT v2.1 with GWT 2 and Appengine SDK 1.3.0 On localhost, everything works fine! When I deploy everything goes fine too, without any error! The problem is, when i access the the app it returns an blank screen. Using the firebug i saw just nocache.js missing. ErrorLog: GET mika.nocache.js http://perfworker.appspot.com/M...

How to insert JSP functionality in Servlets?

How can I use Servlets to access the HTML uses of having JSP without having to have all my client-facing pages called *.jsp? I would rather do this than using all the response.write() stuff because I think it is easier to read and maintain when it is all clean "HTML". Is this is fair assesment? EDIT: What I'm going for is having the Ser...