Hi, I am developing application on app-engine-path and I would like to upload some data to datastore.
For example I have a model
models/places.py:
class Place(db.Model):
name = db.StringProperty()
longitude = db.FloatProperty()
latitude = db.FloatProperty()
If I save this in view, kind() of this entity is "models_place"...
Getting a bit peeved now;
I have a model and a class thats just storing a get request in the database; basic tracking.
class SearchRec(db.Model):
WebSite = db.StringProperty()#required=True
WebPage = db.StringProperty()
CountryNM = db.StringProperty()
PrefMailing = db.BooleanProperty()
DateStamp = db.DateTimeProperty(auto_now...
According to this discussion of Google App Engine on Hacker News,
A DB (read) request takes over 100ms on the
datastore. That's insane and unusable
for about 90% of applications.
How do you determine what is an acceptable response time for a DB read request?
I have been using App Engine without noticing any issues with DB res...
I have two classes Invoice and InvoiceItem. I would like Invoice to have a List of InvoiceItem Objets. I have red that the list must be of primitive or serializable objects. I have made InvoiceItem Serializable.
Invoice.java looks like
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.jdo.annotatio...
I followed all of the instructions so far from:
http://code.google.com/p/appengine-jruby/wiki/RunningRails and
http://gist.github.com/268192
Currently, I'm just trying to get to hello world. I'm getting these
errors when I just run the dev_appserver.rb
238:hello-world jwang392$ dev_appserver.rb .
=> Booting DevAppServer
=> Pres...
My User object that I want to create and store in the datastore has an email, and a username. How do I make sure when creating my User object that another User object doesn't also have either the same email or the same username?
If I just do a query to see if any other users have already used the username or the email, then there could...
Hi,
Say you have a Client Buying Card object and a product object.
When the client chooses the buy opition you create the object and then add a product.
It should be transactional but it's not on the same entity group as the product and the card already been persisted, isn't it?
Is there any way to overcome this simple scenario safely a...
If I set the expires time for an object I store in the memcache to 5 seconds, will it definitely not exist in the memcache 10 seconds later?
...
If I call new Date() it will get the current time for the machine my app is running on.
I'm assuming that the machines on the Google App Engine do not all have their time synchronized.
Is there a way to get a time that would be consistent across instances of my app that may be running on different machines?
...
I have a Google App Engine app that works fine on the dev server. However, when I upload it, the CSS is gone. The scripts are still there, however.
From app.yaml:
- url: /scripts
static_dir: Static/Scripts
- url: /styles
static_dir: Static/styles
From the base template:
<head>
<meta http-equiv="Content-Type" content="text/h...
I need to be able to make a tree like structure in the appengine database.
I have try to make an object reference itself but have not gotten it to work.
class Item(db.Model):
children = db.ListProperty(db.ReferenceProperty(Item))
...
I have been trying for 4 days to get app-engine and grails working together on my mac to no avail. I am using latest groovy/grails and appengine sdk versions. Im following the app-engine plugin step by step on the grails site..
http://grails.org/plugin/app-engine
Groovy Version: 1.7.1 JVM: 1.5.0_22
Grails 1.3.0.RC1
echo $APPENGINE_HOME...
I have informations about some objects stored in BigTable(coordinates and few more) and I have to put this objects on Google map. How can I do that? (Please write some code example. I am using java for my application).
...
<body>
<form action="<%= blobstoreService.createUploadUrl("/upload") %>"
method="post"
enctype="multipart/form-data"
>
<input type="file" name="myFile">
<input type="submit" value="Submit">
</form>
</body>
the above code throws a java.lang.NoSuchMethodError on compilation.I can't underst...
I have a ClassA containing an ArrayList of another ClassB
I can save a new instance of ClassA with ClassB instances also saved using JDO.
However,
When I retrieve the instance of Class A,
I try to do like the below:
ClassA instance = PMF.get().getPersistenceManager().GetObjectByID( someid );
instance.GetClassBArrayList().add( new Clas...
I am testing out Google App Engine as a free Content Delivery Network and it feels like it's taking a long time to serve up my content. I read somewhere that GAE gzips all of your content by default, that's the primary reason I'd like to give it a shot.
Why does this gae page take a say a half a second to download, while your typical s...
I need to get an App Engine app talking to and sharing data with an external database,
The best option i can come up with is outputting the external database data to an xml file and then processing this in my app engine app and storing it inside the datastore,
although the data being shared is sensitive data such as login details so ou...
I've got a tiny bit of code to display a file
in app.yaml
- url: /(.*\.(gif|png|jpg))
static_files: static/\1
upload: static/(.*\.(gif|png|jpg))
in main.py
...
class ShowImage(webapp.RequestHandler):
def get(self):
rootpath = os.path.dirname(__file__)
file = rootpath + "/static/tracker.gif";
fh=open(file, 'r'...
The python interface to the memcache has an add method:
add(key, value, time=0, min_compress_len=0, namespace=None)
Sets a key's value, if and only if the item is not already in memcache. ...
The return value is True if added, False on error.
So with this you can add an item if it doesn't exist, and see if it previously e...
I'm using Google appengine for developing an web application that is meant to be used on both the browser and iphone. I have purchased a domain name for this application, so that I have a pretty URL. I've used the User API for authentication. This works just fine on desktop browsers and iPhone Safari.
The user could add the application ...