google-app-engine

How can I add user profile support to a google app engine app?

I have a Google App Engine app based on django / django_appengine that I wish to modify by adding user profile support to it, because the basic user model is a bit simplistic for my situation. What's the best way to do this? ...

jQuery AJAX request gets called twice when using Jquery, Django and Google App Engine

I'm using Google App Engine, Jquery and Django. I want POST data to be sent to the server side when a form is submitted, and I do this in JQuery with the following code: $("#listform").submit(function() { $.ajax({ type: "POST", url: "/xhrtest", data: {'name': 'h...

Security considerations - office website/portal on GAE

If one needs to create an office website (that serves as a platform for clients/customers/employees) to login and access shared data, what are the security considerations. to give you some more detail, The office portal has been developed in django/python and hosted through GAE. Essentially, the end point comes with a login/password to...

Image Sent via XML from iPhone to App Engine

I am trying to send a small image along with some XML information to App Engine from my iPhone app. I am having trouble with the image somewhere along the path. There is no error given and data is being transfered into a Blob entry in Datastore Viewer but the blob files on App Engine do not appear in Blob Viewer. I have a suspicion t...

Limiting access to a static file with GAE

Hello, I have a static file that I don't want to be publicly available. Is there a way to limit access with app.yaml so that it can only be loaded by its own domain? web2py based solutions are also welcomed as I'm using it on top of GAE. Thanks! ...

'WSGIRequest' object has no attribute 'user'

I'm new to django and Google App Engine, and I'm having trouble with using the datastore. Every time I make a query, such as db.GqlQuery("SELECT * FROM Listing ORDER BY date DESC LIMIT 10") I receive the error: 'WSGIRequest' object has no attribute 'user' This error seems to be generated in context_processors.py within the django c...

User specified date time

I need to parse a date/time string from user input, and convert to UTC based on timzeone info not available in the string for datetime.strptime() (any suggestions?). Is there a straightforward way of doing this? Ideally, on google app engine i'd like to grab local time with tzinfo from the browser if possible also. timezone_string = ...

jTwitter, oAuth, and Google App Engine. NoClassDefFoundError

I'm trying to use jTwitter to get an oauth instance to twitter with my consumer key/secret and access token/secret. This is well documented in the javadoc here. I have downloaded signpost, signpost-jetty, and the jtwitter library, but after deploying and running the servlet, I get a error java.lang.NoClassDefFoundError: winterwell/jtwi...

Repopulate django form

Wanted effect is passing the id to the request handler and populating the form with that entity. How doable is it with a template? Here are my form, request handler and template class AForm(djangoforms.ModelForm): text = forms.CharField(widget=forms.Textarea(attrs={'rows':'11','cols':'70','class':'foo'}),label=_("content").capitaliz...

Fetch a random entity from the datastore

Pretty simple, in my AppEngine application, I have over 1 million entities of one kind, what is the best way to pick one at random? ...

JDO Google App Engine validate user

I've been following the google app engine tutorial and the part that explains JDO is done under the basis of a guestbook. So when they query the persistence (BigTable i believe) they are interested in returning all the results. I'm trying to adapt this for showing the results for the specific user but seem to be having trouble with it. ...

UnicodeEncodeError when fetching URLs

I am using urlfetch to fetch a URL. When I try to send it to html2text function (strips off all HTML tags), I get the following message: UnicodeEncodeError: 'charmap' codec can't encode characters in position ... character maps to <undefined> I've been trying to process encode('UTF-8','ignore') on the string but I keep getting this e...

What's the best way to modify StringTokenizer output for only English words that would be needed in a full text search?

To add full text search to my App Engine app I've added the following field to my model: private List<String> fullText; To test the search, I took the following text: Oxandrolone is a synthetic anabolic steroid derived from dihydrotestosterone by substituting 2nd carbon atom for oxygen (O). It is widely known for its exceptionally s...

google app engine _method?

How can I get the request body passed on to my views? class RestHTTPMiddleware(object): def __init__(self, app): self.app = app def __call__(self, environ, start_response): request = Request(environ) environ['wsgi.input'] = StringIO.StringIO(request.body) method = webapp.Request(environ).get('_method') if meth...

How do I set up a Google App Engine Project that uses Groovy in Eclipse?

How do I make a Groovy Google App Engine project in Eclipse? I have both the Groovy and the App Engine plugins installed. I'm already able to successfully make an App Engine or a Groovy project separately, but how do I make a project that is both? I tried just making an App Engine project and then adding a Groovy class to it, but I ge...

How can I get the base URI in AppEngine?

How can I get the base URI in a Google AppEngine app written in Python? I'm using the webapp framework. e.g. http://example.appspot.com/ ...

How do I change this query to make it return records that meet the `minPrice` condition even if the `keywords` value is null?

I don't know if this is a problem that is specific to Google App Engine for Java, but if the value set as the keywords parameter is a null String, then nothing is returned from the query, even if a minPrice is set. How do I change this query to make it return records that meet the minPrice condition even if the keywords value is null? ...

javax.persistence.PersistenceException: Transaction failed to flush

I got the JPA exception "javax.persistence.PersistenceException: Transaction failed to flush" Then I deleted my local datastore(datastore-indexes-auto.xml and local_db.bin) from my system. Recreated all the data again and after that, the exception was gone. I want to know what did just happened ? The following is the stacktrace...

changing sql queries to nosql in django-nonrel(gae)

I have a query which looks like this: Possesion.objects.exclude(~Q(type="money") & ~Q(type="people")) I want the possessions which are of any type other than "money" and "people". Is there any easier way to do this without something like queried_possesions = POSSESION_TYPES queried_possesions.remove("money") queried_possesions.remo...

Why doesn't google datastore have OR ?

According to the GQL reference, GQL does not have an OR operator. However, it does have an IN operator, which provides a limited form of OR. I know this wasn't implemented for some good reason, but I'm wondering what could be that reason. ...