> What To Do??
http://knol.google.com/k/marce/app-engine-community-faqs/vkzeph4si12v/1#
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to google-appengin
Just a small correction, the documentation for template engine built
into GAE is located at:
http://www.djangoproject.com/documentation/0.96/templates/
On Dec 13, 4:44 am, Marzia Niccolai wrote:
> Hi,
>
> You are looking for Django Templates
> (http://docs.djangoproject.com/en/dev/ref/template
> Still, we've come up with some interesting ideas, and I'd like to
> share one of them here.
>
Brilliant, thanks Ryan!
Is there a chance that this will be integrated into the Datastore
Viewer?
--~--~-~--~~~---~--~~
You received this message because you are subsc
> now if i want to list all the children of a particular parent how do i
> do that?
parent_entity.childmodel_set
You can customise the name of the collectio:
parent = db.ReferenceProperty(ParentModel,
collection_name='children')
... then call:
parent_entity.children
Docs:
http://
Fill out the SMS issues form:
http://appengine.google.com/waitlist/sms_issues
There's a community FAQ that covers this and other common issues:
http://knol.google.com/k/marce/app-engine-community-faqs/vkzeph4si12v/1#
--
www.muspy.com
On Dec 16, 4:34 am, Dave wrote:
> Hi there,
> I got this err
The problem with built-in djangoforms and templates is that they are
from Django 0.96. Django 1.0 has a lot of new useful functionality, it
really worth the trouble installing it with your app.
Another advantage of Django is that it allows to implement custom user
authentication, this is especial
> This is using the AppEngine helper (not the patch you linked to). I
> thought the AppEngine helper would make sure that the Django model
> methods would delegate to the AppEngine's version transparently but
> some seem to be missing - why is this?
>
app-engine-patch does not try to replace appen
> I'm not starting the page using template.render (), so I cannot
> implement the way in the tutorials, i'm using static index.html... is
> it supposed to work if i have the sendmail in form action, like this:
> ---??
>
> ...
>
No, but you can write your own handler. Use the code from the tutoria
> Say I create a directory called "code" in the app root.
I had exactly the same problem a couple of months ago, took me quite a
few hours to find a solution.
Apparently the "code" name conflicts with some internal modules or
packages. I ended up renaming it to "app", this fixed the problem.
Related issues:
http://code.google.com/p/googleappengine/issues/detail?id=793
http://code.google.com/p/googleappengine/issues/detail?id=169
On Dec 16, 11:50 am, "Jyoti Shete-Javadekar"
wrote:
> Hi,
> I want to delete all my data models in production environment and upload new
> set of entities
> here is how i have setup the app.yaml, email.py and form.html, let me
> know whats wrong ??, how should i setup handler for email.py in
> app.yaml ??
OK, here's how you can do it.
app.yaml:
-
handlers:
- url: /send-email
script: email.py
- url: (.*)/
static_files: static\1/index.ht
Me too, please fix this!
On Dec 16, 9:29 pm, Sylvain wrote:
> Yes, same issue with the DataViewer
>
> On 16 déc, 11:01, "Paul Kinlan" wrote:
>
> > Hi,
>
> > I really like the Quota Details page, it gives some really good insight.
>
> > I am having an issue with the Data Viewer page. I have an
> Probably this issue should be documented somewhere, or at least the
> odd behaviors of the server should be duplicated by the
> dev_appserver. ( Similar to this
> note:http://code.google.com/appengine/docs/configuringanapp.html#Reserved_...
> )
>
Add an issue to the tracker and post the link h
> I have an app where I need to parse and process text file via POST
> method.
>
> When I use webapp.RequestHandler's request.get method, it returns the
> content a byte a time. I was hoping it could return a line (ie: UNIX
> or Windows/DOS line). Is there another flag/method that does this
> al
> I am not specifying no-cache. I will try it out tonight, I suspect
> that will fix the problem. Not sure why I have not seen it before, but
> I suspect I just never noticed.
>
Paul, could you post here the result of your investigation? I somehow
overlooked the urlfetch()'s header parameter t
Has the algorithm calculating the CPU Time been changed with the
recent Dashboard update?
I hardly ever reached 1% of the CPU quota, and most of the time it was
at 0%. But now I'm at 4% and the number increases rapidly. If things
continue like this I will reach the free quota before the next rese
> thanks Alexander,
>
> the setup and code worked,
>
> one more help, - how do i unescape string in python that was escaped
> in javascript and submitted??
>
> I'm submitting html that is escaped from the form - escape(data)
> How do I unescape the self.request.get('data') in python and then mail
> When you say embedded images, do you mean as attachments, or an HTML
> email with image tags?
I guess Dani means something else:
http://www.systemnetmail.com/faq/4.4.aspx
This method allows to refer to an inline attachment using .
This is the only way to be sure the recipient actually sees th
ec 17, 11:41 am, Alexander Kojevnikov
wrote:
> Has the algorithm calculating the CPU Time been changed with the
> recent Dashboard update?
>
> I hardly ever reached 1% of the CPU quota, and most of the time it was
> at 0%. But now I'm at 4% and the number increases rapidly. If thing
> I'm trying to email content that is in a container on the
> webpage, so i'm submitting using a hidden input tag with value=escape
> (div.innerHTML)
>
Discard my second comment then and use the unescape() function from
the link above.
--
www.muspy.com
--~--~-~--~~~--
> transx = db.GqlQuery("SELECT * FROM Transaction WHERE Key = :
> 1" , transx_key)
transx is an instance of a GqlQuery object. To get the actual entity
you should call the get() method:
transx = db.GqlQuery("SELECT * FROM Transaction WHERE Key = :1" ,
transx_key).get()
or
transx = Tr
> I use Django to develop my GAE application.
> The problem is I can't put my unicode data to datastore. Here is a bit
> of my view.py:
>
> # -*- coding: utf8 -*-
> from myproject.myapp.models import *
> c = Clients()
> c.Name = "Иванов" #Here is some text in Russian
> c. put()
>
> This code calls
Try replacing:
- url: /import/.*
script: homepage.py
with:
- url: /import/.*
script: import/homepage.py
On Dec 18, 9:21 am, "aviza...@gmail.com" wrote:
> I am navigating to / that uses /homepage/homepage.py it works fine
> When I am navigating to /import/ that uses /import/homepage.py I
> I just tried to submit an issue regarding SMS verification, however it
> appears that form is also broken, so I'll reproduce it here:
>
> Telstra is listed as one of your supported carriers, however if I
> input my phone number (after selecting "Other (Not Listed)"), I get a
> message saying:
>
> Is this a bug or a limitation of Django version in GAE?
You should prefix Unicode strings with 'u':
tipo=db.StringProperty(multiline=False,choices=set([u"Pessoa
Física",u"Pessoa Jurídica"]))
--
www.muspy.com
--~--~-~--~~~---~--~~
You received this message becau
send_mail() takes good amount of time to execute. Call it repeatedly
in a loop and your request will soon time out:
http://code.google.com/status/appengine/detail/mail/2008/12/18#ae-trust-detail-mail-send-mail-latency
In my app I send one e-mail per request (triggered from an external
box) and al
> Suppose one of the features I have on the App I'm creating, is the
> ability for users to subscribe for certain "alerts."
>
> 1. What would be the best way to implement this considering the
> current features available on google app engine (and possibly other
> free services)?
>
There are two is
> That would work well for a small amount of users. But what if my app
> grows to like 5,000 emails? Your solution would definitely not work
> well at that point!
>
I agree that it's far from being perfect, but I don't see why it
wouldn't scale. I currently send about 100 emails a day, if this
num
> Well another point is that if I want to send time-sensitive info, it
> would be impossible (i.e. with your method, you are running the
> sending throughout the entire day, but in some cases almost-instant
> sending is required).
>
If you need to notify a lot of users on the same event instantly,
> I've had a very steady increase in the number of users and number of
> requests to all my URL, everything looks the same as it did a few days
> ago, but now i've jumped from using 0% of my cpu quota to 48%? What's
> going on? I don't see any spikes in any of the data in the dashboard.
The CPU
> Like I said, it's been hard enough getting up and going with just
> GAE. Every additional piece is more configurations, more
> documentation, more forums, more possible bugs, more possible
> constraints, etc. It looks like the app-engine-patch developers
> (you?) did a good job bringing newer
See this thread for possible workarounds:
http://groups.google.com/group/google-appengine/browse_thread/thread/12d823a18bddd53b
On Dec 21, 6:07 am, Arun Shanker Prasad
wrote:
> Hi All,
>
> I got the following error in my log when I tried to send an
> invitation mail to around 14 people,
>
>
Do you use a Google Apps email account? In this case you need to go to
this URL:
http://appengine.google.com/a//
On Dec 21, 5:22 am, Josh wrote:
> Every time I create an application, I just end up back on the create
> application page. I create an application successfully, then boom,
> back toht
> This is supposedly beta software, but I can't find any place to
> actually post bugs about it. Ridiculous.
You can post (or vote for) bugs here:
http://code.google.com/p/googleappengine/issues/list
--~--~-~--~~~---~--~~
You received this message because you are
Replace
- url: /finance/worksheet/.*
with
- url: /finance/worksheet.*
The URL you are trying to access doesn't have the trailing slash, but
your script handler requires it.
--
www.muspy.com
On Dec 21, 3:14 pm, Vince wrote:
> Having a hard time with wrapping my head around the script handler
> Can we ever experience inserting a record that will
> have a lower ID than the previous?
You can, at least that's what I'm seeing in my app. As far as I
understand, the IDs are pre-allocated in batches, and if your app
actually runs on different boxes, they will use IDs from different
batches.
http://code.google.com/p/googleappengine/issues/list
On Dec 22, 5:56 am, Amir Michail wrote:
> Hi,
>
> Why is it that Google only offers issue tracking for open source apps?
>
> Amir
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
> How is this different from allowing closed source companies to use
> Google Groups though? As long as Google puts ads in the service, then
> it should be fine.
>
I belive Google Code was created with a different goal. From their
FAQ:
> Why open source projects only?
> Most proprietary software
Currently the only efficient way to implement paging is to pass
parameters uniquely identifying the page's last entity to the next
page handler and use it there as a starting point.
See for example Brett Slatkin's talk (slides 34-37):
http://sites.google.com/site/io/building-scalable-web-applicat
See the last question in the Community FAQ:
http://knol.google.com/k/marce/app-engine-community-faqs/vkzeph4si12v/1#
On Dec 22, 5:57 pm, Jonathan B wrote:
> Hi,
>
> I'm wondering if anyone else has run into this problem and has some
> advice for me.
>
> I've noticed that the GAE Development Serv
> But, once a new comment is posted, the value if X on every page is
> changed as well. Eventually, search engines will index O(C * P) URLs,
> where C is the number of comments, and P is the number of pages.
>
After a second thought, the number of indexed URLs is O(C), not O
(C*P). Which is still
Daniel, please post here the link when you submit it, I will
definitely star the issue.
On Dec 23, 4:13 am, Marzia Niccolai wrote:
> Hi,
>
> Feature requests can be filed
> here:http://code.google.com/p/googleappengine/issues/list
>
> -Marzia
>
> On Mon, Dec 22, 2008 at 4:43 AM, Daniel Levin w
Marzia, this issue comes up at least a few times a week. Would it be
possible for the dashboard to detect what kind of account is used and
either redirect to appengine.google.com/a/YOURDOMAIN.COM or just warn
the user if it's a Google Apps email?
That message on the bottom of the sign in page is
http://code.google.com/appengine/kb/sms.html
On Dec 23, 2:55 am, Sunil Bishnoi wrote:
> I was to registering my self to use Google app engine. But i haven't
> received any mobile authentication code on my mobile.
>
> Any solution for this problem.
>
> Thanks & Regards
> Sunil Bishnoi
--~--~-
Query.filter() does not support the 'IN' operator:
http://code.google.com/appengine/docs/datastore/queryclass.html#Query_filter
You need to use GQL if you want to have 'IN' in your queries.
On Dec 23, 6:51 am, Chris wrote:
> How do you use the IN keyword? The datastore query API makes a few
> m
ow that it is on our radar.
>
> -Marzia
>
> On Mon, Dec 22, 2008 at 3:36 PM, Alexander Kojevnikov <
>
> alexan...@kojevnikov.com> wrote:
>
> > Marzia, this issue comes up at least a few times a week. Would it be
> > possible for the dashboard to detect what kind of
> I think you'll find that any good search engine will be able to cope
> just fine with that.
>
> The best solution, though, is to implement a permalink-like setup, and
> encourage people to use permalinks when they link to your
> application's content.
Thanks Dave!
Unfortunately search engines
I have no problems running the SDK on Vista x64 with Python 2.5.2 x64.
To troubleshot the problem, you can insert print/assert statements
into the appcfg.py/dev_appserver.py to see which execution path is
taken.
On Dec 23, 9:36 am, Chen Harel wrote:
> I'm not sure it's the python that is making
In your module definition you should use a property class, that is
instead of:
class Tag(db.Model):
transaction = db.Key(encoded=None)
...
you should use:
class Tag(db.Model):
transaction = db.StringProperty(required=True)
...
...if you want to store the string representati
>From http://code.google.com/appengine/docs/python/sandbox.html :
An App Engine application cannot spawn a sub-process or thread. A web
request to an application must be handled in a single process within a
few seconds. Processes that take a very long time to respond are
terminated to avoid overl
> For AppEngine I would recommend to store all comment ids in a text
> field.
>
> When request coming you load it to array and find min/max id's to
> show.
>
> I myself ended up with storing latest comments for an article/post in
> a text field of the article entry and as seprate "Comments" entrie
http://is.gd/dgBK
On Dec 24, 5:38 pm, boson wrote:
> Is there a good way (any way) to hook a db.Model subclass so that it
> does some magic right before being written to the Datastore, and some
> reverse magic right when it's read back?
>
> E.g. Say you want to have a big JSON object stored in a
You can also use the standard locale module:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
>>> locale.format('%.2f', 1234.5678, True)
'1,234.57'
http://www.python.org/doc/2.5.2/lib/module-locale.html
--~--~-~--~~~---~--~~
You received this message beca
You need to use Key.from_path() to construct your keys from model name
and key name:
keys = [db.Key.from_path('MyModel', row["first_column"])
for row in data]
result = MyModel.get(keys)
--
www.muspy.com
On Dec 26, 8:25 am, gmalquestion wrote:
> Hi,
>
> Here's the scen
You need to vacuum your indices manually:
appcfg.py vacuum_indexes
http://code.google.com/appengine/docs/appcfgpy.html
On Dec 26, 6:05 am, dloomer wrote:
> I have several indexes on the Google server that are not only no
> longer in my local index.yaml, but reference properties that no long
sn't work.
>
> I'm new to GAE stuff and it seems to me a lot of trouble to format for
> currency.
>
> we should have a filter like {{sum|currency}} where we can change the
> currency symbol like it is done in other languages.
>
> or in short how I use you tip.
>
> Happ
> I have added gdata modules to the engine app directory for the
> development. Now, I upload them to the google server. Is it the
> supposed way? I think it is too redundant to have the gdata copy
> everywhere if google could just link it available to the apps.
This has been discussed quite a fe
> 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
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
rname(__file__), 'main.html')
> self.response.out.write(template.render(path, lists_query))
>
> On Dec 28, 2008, at 7:46 AM, Alexander Kojevnikov wrote:
>
>
>
> > Could you post here your code (both the querying part and the model
> > definition)?
>
&
> 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
--~--~-~--~~~---~--~--
> > your suggestions to override methods worked a treat. Overriding at the
> > Model level suits me very well as it gives me flexibility. One final
> > question (I hope): what is the difference in overriding the
> > __unicode__ and __str__ methods?
>
> Unless you're actually dealing with Unicode t
'Environment variable DJANGO_SETTINGS_MODULE is
> undefined.',)
> errno = None
> filename = None
> message = 'Environment variable DJANGO_SETTINGS_MODULE is
> undefined.'
> strerror = None
>
> Every help is necessary.
>
> Thanks,
> Forget currency
>
> How I inset comma in:
>
> {{ total_in|floatformat:2 }}
>
> to get : 32,525.75 for example
>
You can use this filter:
@register.filter()
def comma(value):
locale.setlocale(locale.LC_ALL, '')
return locale.format('%.2f', 1234.5678, True)
--~--~-~--~~--
You should not rely on the implementation details, they can change and
break your code.
The Model class has a properties() method:
http://code.google.com/appengine/docs/datastore/modelclass.html#Model_properties
To access the values of the properties you can use this code:
for prop in obj.prope
I suggest you to skim through the part of the tutorial that explains
modules and packages:
http://www.python.org/doc/2.5.2/tut/node8.html
On Dec 29, 9:18 am, MajorProgamming wrote:
> This may be more of a general python question, but what's the best way
> of using many different .py files and im
You should use the response object:
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('your json')
Cheers,
Alex
--
www.muspy.com
On Dec 29, 9:19 am, Chen Harel wrote:
> I'm trying to create a data table in an appengine, and send it back to
>
> I only just started with this last night and wrote a small amount of
> code and then lost my hard-disk!
>
> Is there a way that I can get back the code that I have deployed to
> google apps? I can't see anything in the admin console.
>
See the first question in the App Engine Community FAQ:
http
> What query would return all parents with children named 'Joe'?
De-normalise! Add a StringListProperty to the Parent, and update it
with all children of that parent. You can then query the parents
directly.
--~--~-~--~~~---~--~~
You received this message because
It will certainly work though it's not as efficient as querying de-
normalised parents. You can try this approach first and if it's not
fast enough for your app, you can always de-normalise later.
On Jan 2, 2:59 pm, "Tiago S." wrote:
> I´m facing the exactly same problem. I thought about queryin
Do you use a Google Apps email? Try logging in with this URL:
http://appengine.google.com/a//
On Jan 2, 2:04 pm, fiXedd wrote:
> I created a new app and it isn't showing up. Every time I go to
> appengine.google.com it asks me to create a new project... even after
> I've created several. Howeve
> My application is getting a very high number of data store timeouts.
>
> Is there an unreported issue going on right now?
>
The status monitor doesn't show anything unusual:
http://code.google.com/status/appengine/detail/datastore/2009/01/02
--~--~-~--~~~---~--~~
> I can insert new rows fine, and see them in the Development server
> datastore viewer. But when I try to access the new property contains
> "NoneType: None".
>
You can assign a default value to the property, it will be used when
an entity has no value for the property:
boat = db.StringPropert
> Pardon what should be an obvious question, but I have been unable to
> find a simple declarative answer. Is the development data in the dev
> server datastore uploaded by appcfg.py?
>
No, to upload the data you will need to use the bulk data uploader or
Gaebar:
* http://code.google.com/appengi
There's a limit on the number of app updates per day:
http://is.gd/ew6Q
On Jan 4, 5:48 pm, Bobby wrote:
> In the app's dashboard it tells me that i'm exceeding a quota:
> "Your application is exceeding a quota: App Config Service Config App
> Call Count"
>
> But on the quota details page it show
Fill out the SMS issues form:
http://appengine.google.com/waitlist/sms_issues
On Jan 6, 4:31 am, "manish deora" wrote:
> Hi guys,
>
> I am trying to create a sample application using google app engine.but it
> seems i just got stuck at a point, where i am not able to verify my account
> since i
Star this issue to follow it up:
http://code.google.com/p/googleappengine/issues/detail?id=335
On Jan 7, 11:28 am, SM wrote:
> I know there is currently no way to delete an application, but I am
> wondering if this will be possible in the future. The reason to do
> this would be to free up slots
Try removing the database access history file, then restarting the
development server. The file is called dev_appserver.datastore.history
and located in the tmp directory.
The development server auto-generates the indices based on the history
file, even if you don't run the corresponding queries
> Looking at it more deeply every 20th one takes a long time. I assume
> that's the data fetch.
>
I guess you are iterating over a Query or GqlQuery object to get the
entities? This explains explain why every 20th iteration. From
http://code.google.com/appengine/docs/datastore/queryclass.html :
You can include the 'shell' application from the official appengine
samples with your app, and add/edit/delete the entities from Python
shell.
Source: http://code.google.com/p/google-app-engine-samples/downloads/list
Demo: http://shell.appspot.com/
Don't forget to restrict access to shell, e.g.
> Thanks for the response. I just dont see a reason why Google can't
> allow dummy data to be entered via the built in admin interface. If it
> can create forms when there is data, why cant it create forms without
> data?
>
I guess the main reason is that the datastore is schema-less, the
models c
> What if I want to move away from GAE later.. can I host django,
> web.py, or webapp frameworks myself? (Does my question make sense?)
>
Check out this article:
http://code.google.com/appengine/articles/pure_django.html
--~--~-~--~~~---~--~~
You received this messa
The offset is applied _after_ the query is executed and the entities
are fetched. Re-read the "Executing the Query and Accessing Results"
section from
http://code.google.com/appengine/docs/datastore/creatinggettinganddeletingdata.html
So, using offset to go through all your entities is not a goo
Step 2:
entity = Note.get_by_id(id)
which is actually a shortcut for:
entity = Note.get(db.Key.from_path('Note', id))
or, if you insist on using GQL:
entity = Note.gql('WHERE __key__ = :1',
db.Key.from_path('Note', id)).get()
...but it's less efficient.
Ste
The entities in the datastore are shared, the code and static files
are not.
I don't think splitting the datastore per app version is such a good
idea. What if the data is added to v1 of the datastore while you are
testing v2? At the same time you are modifying your v2 datastore
(otherwise, you w
Try replacing
SET HTTP_PROXY = 202:141:80:22:3128
with
SET HTTP_PROXY=http://202.141.80.22:3128";
On Jan 12, 10:59 pm, ramu wrote:
> No replies yet...
>
> On Jan 11, 5:45 am, ramu wrote:
>
> > Dear Google App Engine Developer ,
>
> > I am halfway completing my real app but can't get a wa
Try adding an empty __init__.py file into your DB folder. This marks
the DB folder as a 'package' and allows you to import modules from it.
More info at:
http://www.python.org/doc/2.5.2/tut/node8.html
On Jan 13, 2:09 am, arnie wrote:
> Hi all
> I have three folders
> BusinessList
> Conversion
>
This format worked for me: +61 4xx xxx xxx
It looks like you are including a leading '0' after the country code,
try removing it.
See also this thread: http://is.gd/fBro
On Jan 12, 10:02 pm, bannerdyne wrote:
> Hi,
>
> I am using a supported carrier in Australia. I cannot get my mobile
> numbe
See http://is.gd/fBsX
On Jan 12, 11:58 pm, bannerdyne wrote:
> Hi,
>
> I am using a supported Australian carrier but am getting the following
> error when I try to verify.
>
> There were errors: * Mobile Number or Username
>
> I am using the following format 61 000 000. I have tried removin
> Is there a faster/better way? Do I need to do anything with indexes to
> make this query better?
>
You can replace fetch(1) with get(), which is essentially the same.
Other than that, if you know your entity's id/key_name, it's slightly
faster to fetch it using get_by_id() or get_by_key_name().
The first variant is faster while the second one requires less
maintenance if you rename your documents a lot. Both will do the job.
I'd use the first, de-normalised model unless you normally have a lot
of revisions per document, modify the common document meta-data quite
often, and the meta-data
> > Hi all
> > For a data model class say
> > Person with certain fields,
> > how can i access the unique numeric ID field associated with each
> > entity in query?
> > I use
> > persons=db.GqlQuery('SELECT __key__ FROM Person')
> > for p in persons:
> > self.response.out.write(how to print the
Joseph,
You can try this code:
def put(self):
count = 0
while True:
try:
return db.Model.put(self)
except:
count += 1
if count == 3:
raise
Cheers,
Alex
--
www.muspy.com
On Jan 15, 4:
> What would the try/catch look like to catch this specific error (and
> not all errors)?
>
try:
response = urlfetch.fetch(url)
except urlfetch.DownloadError:
# process the error
pass
--~--~-~--~~~---~--~~
You received this message because you are subscr
> What is the performance difference we should expect (if any) between:
>
> 1. N x Model.get(key)
> i.e. making N calls to Model.get with various keys
>
> vs.
>
> 2. Model.get([key1, ... keyN])
> i.e. making a single call to Model.get with an array of N keys
>
> I'm trying to optimize out some CPU
> Is there any way to catch the timeout error specifically? That way it
> doesn't bother to retry if something else is the problem.
>
Sure, just replace "except" with "except db.Timeout"
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
The thing is, there's no substitute for a solid html/css knowledge. No
visual html editor, and there are lots of them floating around, will
produce a consistently valid and cross-browser compatible mark-up.
Your best bet is to learn the basics, or to hire someone else to do
the job.
On Jan 15, 6
201 - 300 of 384 matches
Mail list logo