google-app-engine

string to datetime with fractional seconds, on Google App Engine

Hey all, I need to convert a string to a datetime object, along with the fractional seconds. I'm running into various problems. Normally, i would do: >>> datetime.datetime.strptime(val, "%Y-%m-%dT%H:%M:%S.%f") But errors and old docs showed me that python2.5's strptime does not have %f... Investigating further, it seems that the Ap...

Struts 2 on Google app engine. problem

Hi. I use struts2 in google app engine I had an error with my application. result 'null' not found But when I created listener Ognl this error is not displaying. http://whyjava.wordpress.com/2009/08/30/creating-struts2-application-on-google-app-engine-gae/ to resolve this problem I created an ServletContextListner which will set OG...

[GAE] Fastest way to check if an object exists

I'm using GAE/Java with Objectify, and I'm trying to find the fastest way to check if a given object exists in the datastore, given the key. What I'm doing right now is .get(key) with @Cached on, but either way that still retrieves the entire object, which is unnecessary. Any ideas on how to do this with an index only hit? I was also th...

Uploading a video to google app engine blobstore

I'm trying to associate a video file to a record with a bunch of properties, but can't seem to allow the user to do everything in one form - name the video, provide description and answer some question, AND upload the file. Here are the steps I'd like to perform: User is served with a page containing a form with the following fields: ...

Adding an authentification system in a deployed Roo/Gwt project

Hi everybody, I deployed recently a Roo/Gwt project on Google App Engine. I spent a couple of hours but couldn't find a tutorial that shows, step by step, how can we add n authentification system (withe the Federated Login Api). I found this very good article that provides some helpful code : import java.io.IOException; import java.i...

Appengine Blobstore - Video Streaming

Hey folks, I'm trying to setup a video streaming app via the Google Appengine Blobstore. Just wanted to know if this was possible, as there isn't too much regarding this in the Appengine Documentation. Basically I want to serve these videos through a flash player. Thanks ...

GAE+Django server getting called twice for every request

I am running a GAE server with django (locally on my dev machine). The view corresponding to every requests is getting called twice. any idea on how to orrect this. I am using firefox 3.6.8 on ubuntu 9.10 for this. the following is the debug output -> http://pastebin.com/4CetCK5J ...

Java: Google App Engine "HTTP method POST is not supported by this URL" error

I just started playing with Google App Engine and Java. I've used Servlets in the past and I understand how they work. I'm trying to make a servlet to POST to, but it's not going over very well. Here's my Servlet: public class CreateUser extends HttpServlet { private static final long serialVersionUID = 1L; @Override prote...

Creating read-only fields for admin panel in Google app engine and Django

Hi all, How can we create read-only or the non-editable fields in the admin panel? Following is a code snippet from my model: class AnswerVote(db.Model): answer = db.ReferenceProperty(Reply,required = True,editable= False) vote = db.BooleanProperty(default = False,editable= False) voter = db.ReferenceProperty(User,editable= Fa...

Internal error when sending email with Google App Engine / Java

When trying to send email using the following code: Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); Message msg = new MimeMessage(session); msg.setFrom(new InternetAddress("noreply@${appId}.appspotmail.com", "Some Name")); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(emai...

Build a JS server inside of Java for Google AppEngine

Hi, I just needed to create a little interface for a project. So I decided to take given code and to run it on Google AppEngine. My problem is, that I'm experienced in JavaScript and got some basic knowledge of Java, but I got no clue how a Java webapp has to be structured. I started Eclipse and installed the AppEngine-addon, downloaded...

resource usage for each user in app engine

Is it possible in Google App Engine to get resource usage by each user. Basically, the app is to be used by each user separately. There is no data thats shared between users (Simplifying a bit here, as its projects which are separate, to which users belong). I dont want to blindly charge users the same value, but rather find out the ac...

App Engine Blobstore - What can I do to limit the size of a file that a user can upload?

What can I do to limit the size of a file that can be uploaded? I know I can limit it client side with SWFUpload, but how can I limit it server side? How do I protect against someone uploading a 1GB file and eating up my quota? ...

I can retrieve values from datastore

Hi, I want to retrieve some values I put in the data store with a model class name "Ani" and I have tried using the script below to do that but I am having problem with. Can someone please, help me with it import random import getpass import sys # Add the Python SDK to the package path. # Adjust these paths accordingly. sys.path.append...

How to copy dependencies to gae war/WEB-INF/lib

I'm coming from Ant perspective, so pardon me. I realise there are quite a few questions here already on how to maven dependencies, but none of them seem to tell how to do what need to do. Question 1: Currently, in conjunction with using maven-war-plugin, when I run mvn war:war, it creates a war folder in target folder. However, I wish...

Importing my own modules in Google App Engine

Hi, I'm brand new to Google App Engine and have just been playing around with it, but for the life of me I don't understand how to import non-standard modules, and for that matter don't fully understand the app.yaml file's purposes. Essentially I want to import SimPy (a collection of ~15 python files) from my script file, but every com...

Problem with collections in GAE

Hi all. Learning GAE I`ve got some issue. I want to save contact list of my users in database. I use addUser() to add new user and it works. But when I refresh the page the list is empty (not null). In GAE "Datastore Viewer" the "list" field is null but in application it exists. @PersistenceCapable(identityType = IdentityType.APPLICATIO...

Are @ManyToMany relationships not allowed in GAE?

My understanding is that with GAE JPA support I cannot: @ManyToMany private Set<SSUser> contacts; protected SSUser(){} public SSUser(final String userId, final String emailId){ this.userId = userId; this.emailId = emailId; contacts = new HashSet<SSUser>(); } I'm trying to establish a contacts...

Effectively using Google App Engine to send lots of emails using PHP?

I currently have a client website on the Grid server on MediaTemple that will be moved to a Virtual Private Server soon. Currently it's using some hacks to trickle his massive email sendouts using cron jobs and queuing with the database (to avoid going over the limit MediaTemple set). We can't use third party solutions (like MailChimp ...

GAE: Getting key of entity just created

I'm creating a new entity like: some_model = ModelName( attr1 = ..., attr2 = ..., attr3 = ..., attr4 = ... ).put() Is there anyway to get the key of this newly created entity? I tried doing some_model.key() put that does not work. ...