I have the following model of Users and I want to get all the users that like 'yellow', but don't like 'red'.
class User(db.Model):
name = db.StringProperty(required=True)
favorite_colors = db.StringListProperty(required=True)
This works (all users that have at least one favorite color 'yellow' are returned):
results = db.Gql...
Here is a piece of code that I use to fetch a web page HTML source (code) by its URL using Google App Engine:
from google.appengine.api import urlfetch
url = "http://www.google.com/"
result = urlfetch.fetch(url)
if result.status_code == 200:
print "content-type: text/plain"
print
print result.content
Everything is fine here, ...
I am looking for nosql key value stores that also provide for storing/maintaining relationships between stored entities. I know Google App Engine's datastore allows for owned and unowned relationships between entities. Does any of the popular nosql store's provide something similar?
Even though most of them are schema less, are there m...
Hi,
I'm trying to get sendmail working on localhost. The problem is that the app engine has det wrong path to sendmail, since it throws the error: /bin/sh: sendmail: command not found
Using Mac OS X, the path to sendmail is: /usr/sbin/sendmail
Does anyone know how to change this?
..fredrik
...
I am testing my gae java jdo routines in eclipse.
The actual question is, how to clear/clean out the localhost development datastore so that I could start with a virgin datastore for a new cycle of tests?
Addional info - For those who don't know:
GAE = google app engine, google's "hosting solution" for java and python applications.
...
Hi,
Coming from PHP world, I used to create select box like this:
<select>
<?php foreach($arrField as $idx=>$val){?>
<option <?php echo ($fieldVal == $idx ? "selected='selected'" : ''); ?>><?php echo $val; ?></option>
<?php } ?>
</select>
However, I can't do that in python. Here's my snippet:
<select name='type'>
<option value...
In one of the answers that I have received here, I encountered a problem of not knowing how to pass automatically through "Google App Engines" my ID and a password to a website, on which I am a registered user and have an account. A suggestion was given to me to "check for an HTTP status code of 401, "authorization required", and provide...
I am aware of previous questions regarding mechanize + Google App Engine,
What pure Python library should I use to scrape a website?
and Mechanize and Google App Engine.
Also there is some code here, which I cannot get to work on app engine, throwing
File “D:\data\eclipse-php\testpy4\src\mechanize\_http.py”, line 43, in socket._fileo...
I want to know that the distributed database system Bigtable is object oriented?
...
A recent question regarding the datastore and how long a query should run got me thinking - has anyone compiled a nice set of benchmarks that would demonstrate what "typical" results should be for datastore performance? I know that every entity kind will have different performance characteristics, but it would be great to be able to see...
Hi,
I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store images or files more than 1MB limit(they are going to change this from what I read in the GAE roadmap),query is limited to 1000 results,...
Let's say I want to use Google GWT on the client side and Google AppEngine Python on the server side. Furthermore, I want to be able to use RPC calls to the server as well as performing COMET based exchanges.
What are my options in term of existing frameworks?
...
In app engine there a way to use templates a bit more like php/javascript(document.write)?
for instance i would rather do:
<html>
<python>
print "Hello world"
</python>
</html>
rather than all the {IF } {ELSE } django stuff.
...
I am a fan of the extensibility of the CMSes. You can upload some code (usually PHP), authorize it from the CMS admin panel and it's running.
I wonder if it is possible in Google App Engine. I haven't checked the extensibility of existing CMSes for Google App Engine, but if there is any of them that supports plugins I would like to know...
Hey, I'm fairly new to python I have this piece of code which stores the birth info to the datastore in Google App Engine. The code works but is it the correct way to do it? Is there a simpler way to do it, to make sure that the key exists before storing it in datastore?
def store_birthinfo(self, user, birthday):
"""
Store birth...
I have a entity class User. I want to add some more properties but to keep them nullable. I want to know the annotation used for this in JPA. I am using JPA in Google App Engine.
Thanks
...
If I have "a.py"
from google.appengine.ext import db
class A(db.Model):
db.ReferenceProperty(b.B)
...other stuff
and another file "b.py"
from google.appengine.ext import db
class B(db.Model):
db.ReferenceProperty(a.A)
...other stuff
It would appear that Python simply does not allow circular dependencies. Normally I ...
Hello everybody!!!
I am trying to pass automatically, using Google App Engine, my password and ID to eBay, to this page:
https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&UsingSSL=1&pUserId=&co_partnerId=2&siteid=0&ru=http%3A%2F%2Fcgi5.ebay.com%2Fws2%2FeBayISAPI.dll%3FSellItem%26hm%3Dum.rundkoi376%26%26hc%3D1%26guest...
(New to Python and GAE)
I'm looking for an explanation to the use of class variables in db.Model subclasses, which are treated like instance variables. Why are these declared in class scope and not in __init__? Is this some kind of special GAE requirement?
...
Here is a quote from here:
So in short ... you need to look into login
page, see what params it uses e.g
login=xxx, password=yyy, post it to
that page and you will have to manage
the cookies too, that is where library
like twill etc come into picture.
How could I do it using Python and Google App Engine? Can anybody pleas...