I am facing a problem with file upload.I have used Apache Commons
servlet file upload for uploading the file. Though the file is getting
uploaded and the data is getting stored on the local server(http://
127.0.0.1:8888/_ah/admin/datastore) but it is not going to the Google
App Engine datastore.
What I am doing is loading
the file as a ...
Hello All,
This is the piece of code I am using to generate a template:
path = os.path.join(os.path.dirname(__file__), 'tag.html')
tag = cgi.escape(self.request.get("tag"))
query = DeliciousTags.all()
query.filter("tags =", tag)
query.order('creation_date')
results = query.fetch(20)
siteList = ''
if results :
siteList = resul...
I have a list of tags defined in a StringListProperty().
The DB contains around 1 million entries and each entry has around 20 different values in the list.
e.g.
a = [ 'ab', 'bc', 'ca', 'x', ....]
b = ['x', 'm', 'a', .... ]
I am using Google App Engine so I have constraints on running batch jobs ... (only 30 sec allowed)
Here is m...
I have model which looks like this:
class Example (db.Model) :
name = db.StringProperty()
tags = db.StringListProperty()
I first query for a tag to get the list of entities which have them:
results = Example.all().filter("tags =", tagSearch).fetch(100)
This gives me a list of entities containing the "tagSearch" in their "tags" li...
If the solution is to override init() and del() from db.Model / db.Expando / db.PolyModel, then do I need to call the superclass functions?
Would be great to see some example code in the answers or on links. Thanks a lot.
...
How can we retrieve data from datastore where we want to use one element of list property as parameter in google app engine?
...
Hi.
I have a web application with some data in its datastore. I have just finished another version of it, in which i changed one of the persistent classes. Basically, there is a class called "Node" (which represents a node in a hierarchy tree), that used to have it's author as a
private CmsUser author;
and now it stores its author ...
I did a db.get([356 keys]) and it took 8 seconds. Here is an excerpt of the AppStats graph for this operation:
http://vvcap.net/db/iXvU5LtfG6tp04-kjqvp.htp
Is 8 seconds normal for 356 keys? And why is the CPU time be bigger than the API CPU time? If anything I would expect the API CPU time to be bigger, since entities are fetched in par...
Hi,
I am making a P2P Media sharing feature where users can share Files (images, mp3 etc) with others. When a User shares a file with the other I simply send them the link to that file. The links looks like:
http://www.domain.com/file?q=unique_key
Now, the unique_key must be alpha-numeric and not easily guessable, so i plan to use the...
I'm developing an application for Google App Engine which uses BigTable for its datastore.
It's an application about writing a story collaboratively. It's a very simple hobby project that I'm working on just for fun. It's open source and you can see it here: http://story.multifarce.com/
The idea is that anyone can write a paragraph, wh...
Hi All,
I am working on a GAE Django Project where I have to implementing the search functionality, I have written a query and it fetches the data according to the search keyword.
portfolio = Portfolio.all().filter('full_name >=',key).filter('full_name <',unicode(key) + u'\ufffd')
The issue with this query is, that it is case sensiti...
Does Google's App Engine have excessive downtime, specifically with regards to datastore writes?
Additionally, downtime seems to be scheduled during high traffic times, e.g., in the middle of the afternoon vs. 3:00AM in the morning. Is this normal? Will it improve as the technology matures?
...
I see an example of doing a partial string search on the GAE google group (this thread):
String term1 = "cow";
String term2 = "horse";
Query q;
q.setFilter("name.matches('" + term1 + "%')");
so this works like:
"Find all objects of the class where property 'name' starts with term1"
so that would match stuff like:
cowfoo
cowgr...
I need to design a data model for an Amazon S3-like application. Let's simplify the problem into 3 key concepts - users, buckets and objects. There are many ways to design this model - I'll list two.
Three Kinds - User, Bucket and Object. Each Object has a Bucket as its parent. Each Bucket has a User as its parent. User is the root.
Dy...
In my App Engine datastore I've got an entity type which may hold a large number of entities, each of which will have the property 'customer_id'. For example, lets say a given customer_id has 10,000 entities, and there are 50,000 customer_ids.
I'm trying to filter this effectively, so that a user could get information for at least 2000 ...
Hi,
is there any possibility to call method just before making object persistent?
Something like "onMakeObjectPersistent()"
I want to calculate geohash basing on lon and lat and store it in datastore.
Regars,
M
Solution:
as @Duy Do post:
in JDO we can do that using jdoPreStore() method:
@PersistenceCapable
public class Foo implem...
This is a follow-up question to Drew Sears' answer to this discussion:
http://stackoverflow.com/questions/3314721/app-engine-datastore-data-model-question
If I model bucket as a reference property in the object kind and say I want to query for objects in bucket 1234 with size > 1000. My query will look like "where bucket = key('Bucket'...
I have a property oldStatus and newStatus in my object and when I try to run a query on the object where newStart = approved. I am getting an error.
Seems like the newStatus is being treated as new Status() and getting an exception that object Status not found.
Anyone with similar issue? and possible solution.
Query query = pm.newQu...
I have following model:
@PersistenceCapable(detachable="true")
public class User {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent(defaultFetchGroup = "true", mappedBy="owner")
@Element(dependent = "true")
private List<Offer> offers;
@Persistent(defaultFetc...
I have a model containing ranges of IP addresses, similar to this:
class Country(db.Model):
begin_ipnum = db.IntegerProperty()
end_ipnum = db.IntegerProperty()
On a SQL database, I would be able to find rows which contained an IP in a certain range like this:
SELECT * FROM Country WHERE ipnum BETWEEN begin_ipnum AND end_ipnum
o...