Hi,
I have a couple of model classes which are in one-to-many
relationship. For example, one of the classes is a Product, and
another one is Colours.
I know that I can list the acceptable field values in this manner:
size_code = db.StringProperty(required = True, choices = ['colour1',
'colour2'
I think that the best way to address your problem would be using a
ReferenceProperty to another object type where you list all the colors
you wish to present as choices, does that work?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
On Sat, Dec 27, 2008 at 8:24 AM, newb wrote:
> I'm wondering how a product like Digg works (even though they're not
> on GAE). They have counters for each of their articles which would
> have high write contention. But they somehow manage to keep their
> articles sorted by count as well. The mod
On Sat, Dec 27, 2008 at 10:07 PM, Martynas Brijunas wrote:
> Why am I doing this? It is because I want to use it with the
> db.djangoforms.ModelForm class. If I have a list of choices for a
> field, the ModelForm automatically gives me a dropdown. If there is no
> list of choices all I get is a
Dave,
Once again, thanks for taking the time to reply. Really appreciate the
thought. I think I will remove the sharded counters in favor of a
count directly on the objects I'm working with. And then adjust the
model later if necessary.
I guess I saw so much disucusssion of sharded counters here
> "high write contention" actually is, i.e. how many writes per minute/
> second you'd have to hit to have write conflicts, i.e. when you should
> consider a sharded approach.
>
Datastore can handle 10/s write at constant interval. So if write
occurs randomly at average 2/s there be about 1% pro
Hi, Is it possible to store a model as a different name to the class
name?
I thought this would work but its still stored as a "Test"...
class Test(db.Expando):
test = db.StringProperty()
class MainHandler(webapp.RequestHandler):
def get(self):
NewTest = Test
Hi,
I am trying to upload a csv file in datastore, and I think the
following error is coming because I am trying to use DateTimeProperty
in it. The CSV file is having just one line of data-
0,"12/25/2008 12:00:00"
Please help me.
-- Error Trace
INFO 2008-12
NewTest=type('NewTest',(Test,),{})
On Dec 27, 11:43 am, Anthony wrote:
> Hi, Is it possible to store a model as a different name to the class
> name?
>
> I thought this would work but its still stored as a "Test"...
>
> class Test(db.Expando):
> test = db.StringProperty()
>
> class MainH
Hi Consultuning/David,
> You probably want to use a ReferenceProperty to a Colour entity in
> your Product model. Then, customise your form something like this:
>
> class ProductEntryForm(djangoforms.ModelForm):
> class Meta:
> model = Product
>
> colour = djangoforms.ModelChoiceField(Col
Thanks!
On Dec 27, 5:20 pm, yejun wrote:
> NewTest=type('NewTest',(Test,),{})
>
> On Dec 27, 11:43 am, Anthony wrote:
>
> > Hi, Is it possible to store a model as a different name to the class
> > name?
>
> > I thought this would work but its still stored as a "Test"...
>
> > class Test(db.Expa
I was getting http 50x status code when I tried to use appcfg.py and
google appengine Dashboard warned saying appcfg.py quota exceeded.
On Dec 22, 1:10 pm, Panesse wrote:
> How did you learn that you had exceeded your quota for application
> updates? Are you sure this was the problem?
>
> On Dec
Hi,
This subject was mentioned in earlier posts. I'm just adding the
"limit" variable to it.
Basically I'm coding a high score server in GAE, and I would like to
perform queries like this one:
score_query.filter('score_date >', date_diff)
score_query.order('-score')
score_query.limit(50)
Where
> How could these users know that the application used inconsistent
> timestamps? Even if they knew of each other's existence, which they
> don't, they don't have synchronized clocks.
>
It is not necessarily about users knowing anything!
For a number of possible reasons (including the consistenc
You're very welcome :)
The original version I had was very tightly-coupled with my own app
and it broke when the limit on offsets was introduced. It was only
after we got sortable keys that it was worth making it a standalone
app.
Please do let me know if you run into any issues (or if you don't
I'd like to allow users to admin their http://smw.appspot.com account
via an email sent from their Gmail account. This would satisfy at
least two use cases:
1. bulk addition of users to their smw.appspot.com group. (Gmail is
convenient and familiar because of its contacts interface, etc.)
2. Conve
Look at the very bottom of the quota details page; You are "limited"
to 250 deployments per day.
Always wondered why that quota was there, but if people have been
doing what samba has been doing I don't blame them. No offense, I
mean, but that's gotta be iffy for the appengine cluster to deal wit
> thank you very much for your suggestion to use the RefrenceProperty. I
> am halfway there now. The Product form now displays a dropdown.
> However, I am not really clear on how to specify what will be
> displayed in that dropdown. Here is what it is displaying currently
> when you open a dropdow
On Sun, Dec 28, 2008 at 9:02 AM, Alexander Kojevnikov
wrote:
> You can use a custom ModelChoiceField and override its
> label_from_instance() method:
Nice one! The alternative is to define a __str__ method on your
SizeOption class, since that is what is used to render the options in
the default
Hi All,
It's my first time here, also my first time to write django app and
use app engine.
Once I followed the django turtorials, I tried to integrate this
django app to app engine.
Done all the main.py, app.yaml and models modifications.
When I check /polls/, it give me an TemplateSyntaxError
Dear all,
I am trying Google App engine first time. I have created the
application on appspot and the application is working good locally on
my Laptop. I tried uploading it with my email id and password but
after entering the password 2nd time (it asked the password twice) it
gave the error as:
I need more tutorials.
I need more basic tutorials.
I'd like more basic video tutorials.
I need really a basic how-to on displaying RSS feeds in App Engine
(Django?) pages. (Everyone keeps saying how simple Django is; but, if
its so simple, why is there no drag and drop GUI?)
I'd also like to
On Sat, Dec 27, 2008 at 12:54 AM, maverick wrote:
>
> Hi,
>
> I am improving my own blog on GAE, one great feature wordpress (with
> certain plugins) has is the "related posts", when you browse one post,
> you can get the most relevant posts list. I took a quick look of some
> wordpress's relate
Can anyone tell me how to retrieve the name of an instance?
puzzle = models.Puzzle( key_name='my_new_puzzle' )
puzzle.title = 'My puzzle'
puzzle.put()
This works fine, i see the ID/Name in the data viewer
then I try to retrieve the name
puzzle.id_or_name()
I get the error: AttributeError: 'P
Do you think Google App Engine is suitable for an idea I have about a
program that will crawl around on the web and gather data for me for a
project?
The examples that I have found all seem to involve apps in which the
program is responding to the user. I would like to use a google app as
a sort
Hi guys. I got a error "AttributeError: 'GqlQuery' object has no
attribute 'has_key'" when I executing the GQL and my statement is
"SELECT * FROM Lists ORDER BY date LIMIT 10".
At first I think the statement have some problem then I changed to
.all() but the same error.
--~--~-~--~~-
Hi,
I have a route planning webapp, written in Python, that uses
Djikstra's algorithm to find the shortest path between two nodes in a
directed graph. I want to port this to AppEngine, but I'm not sure
how to represent the graph. Right now I'm using a dict of dict, G[pt]
[pt] -> (edge data) whe
what do they mean by the application can not write data to the file
system. i have an email application written in c# and in order for it
to be sent it must temporarily post to which ever server its running
on in order to relay to its client like so
strFileName = Path.GetFileName(FileUpload1.Pos
On Fri, Dec 26, 2008 at 4:56 PM, ffelgenh wrote:
>
> Hi,
>
> is it possible to forward a request to some external URL from within
> my Google App Engine application?
What do you exactly mean by forwarding the request.
Do you mean that you want to forward the request object that you get
inside a
Hi,
How can I decode post data that contains spaces ?, Right now I am
seeing %20 in the place of spaces. Is there a builtin mehtod to do
this ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Google App Engine" grou
Could you post here your code (both the querying part and the model
definition)?
On Dec 28, 2:59 am, Pikaurd wrote:
> Hi guys. I got a error "AttributeError: 'GqlQuery' object has no
> attribute 'has_key'" when I executing the GQL and my statement is
> "SELECT * FROM Lists ORDER BY date LIMIT 10
> Can anyone tell me how to retrieve the name of an instance?
>
> puzzle = models.Puzzle( key_name='my_new_puzzle' )
> puzzle.title = 'My puzzle'
> puzzle.put()
>
> This works fine, i see the ID/Name in the data viewer
>
> then I try to retrieve the name
>
> puzzle.id_or_name()
>
> I get the error
App Engine cannot spawn threads or start processes. It also has zero
built-in support for background processing, though Google is going to
implement something in the future.
There are a few workarounds, search this group for "background".
Cheers,
Alex
--
www.muspy.com
On Dec 28, 2:22 am, agartl
You are reading it right, apps are not allowed to write to the file
system.
To add attachments you don't need to create temporary files, the Mail
API accepts in-memory data:
http://code.google.com/appengine/docs/mail/attachments.html
Cheers,
Alex
--
www.muspy.com
On Dec 28, 9:22 am, "gom...@gma
import urllib
...
url = urllib.unquote(param)
2008/12/27 samba :
>
> Hi,
>
> How can I decode post data that contains spaces ?, Right now I am
> seeing %20 in the place of spaces. Is there a builtin mehtod to do
> this ?
> >
>
--
Barry
- www.nearby.org.uk - www.geograph.org.uk -
--~--~--
You have to convert the string to datetime.datetime first
('LastUsed', lambda x: datetime.datetime.strptime(x, '%Y-%m-%d')),
adjust the format string according to your date-time string
2008/12/27 RAJ :
>
> Hi,
>
> I am trying to upload a csv file in datastore, and I think the
> following error is
On Sat, Dec 27, 2008 at 5:16 AM, Amar Pai wrote:
> I have a route planning webapp, written in Python, that uses
> Djikstra's algorithm to find the shortest path between two nodes in a
> directed graph. I want to port this to AppEngine, but I'm not sure
> how to represent the graph. Right now I
Using Djikstra's shortest path algorithm, you can compute the shortest
paths between all nodes in the same runtime as computing the path
between any 2 nodes, so storing then querying the precomputed paths
would be a good approach as mentioned above.
> Since there are no files in AppEngine, my fir
There is my code. Thx
# --> model define
class Lists(db.Model):
type = db.IntegerProperty()
money = db.IntegerProperty()
remark = db.StringProperty(multiline=True)
date = db.DateTimeProperty(auto_now_add=True)
#TestHandler define
class TestHandler(webapp.RequestHandler):
def get(se
You need to fetch() your entities, you cannot just pass the query
object to the template.
Also, template.render() expects a dictionary as its second argument.
Try this code:
def get(self):
query = db.GqlQuery("SELECT * FROM Lists ORDER BY date")
lists = query.fetch(10)
path = os.p
Hi,
Is it possible to load data into my datastore from a spreadsheet
(google spreadsheet or an excel file) or a text file?
If so, how do I go about it?
Pls help!!!
Aravind
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
I created one app named "000", but I can't access it by click its name
on On "My Applications" panel.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to go
> Is it possible to load data into my datastore from a spreadsheet
> (google spreadsheet or an excel file) or a text file?
>
You can use the bulk data uploader:
http://code.google.com/appengine/articles/bulkload.html
Cheers,
Alex
--
www.muspy.com
--~--~-~--~~~---~--~--
43 matches
Mail list logo