[google-appengine] Re: Login:admin will cause SystemError on SDK-1.1.7

2008-12-01 Thread A . TNG

Hi,

I tried on another laptop, almost the same environment (WinXP, Python
2.5.2, SDK 1.1.7). It works fine.

I have no idea now.

-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to write code about table in template?

2008-12-01 Thread A . TNG

On Mon, Dec 1, 2008 at 2:27 PM, lookon [EMAIL PROTECTED] wrote:

 I want to render table in the response. and the template_value is
 objects. Then my question is how to write the template file.

 for example,
 {% for obj in objects %}
 table
 tbody
 code here

{{ obj }} dosen't work?

 /tbody
 /table
 {% endfor %}





-- 
Best Regards,
TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to write code about table in template?

2008-12-01 Thread kang
what?
I want to show 5 objs in each row, how to write the code?

On Mon, Dec 1, 2008 at 5:01 PM, A. TNG [EMAIL PROTECTED] wrote:


 On Mon, Dec 1, 2008 at 2:27 PM, lookon [EMAIL PROTECTED] wrote:
 
  I want to render table in the response. and the template_value is
  objects. Then my question is how to write the template file.
 
  for example,
  {% for obj in objects %}
  table
  tbody
  code here

 {{ obj }} dosen't work?

  /tbody
  /table
  {% endfor %}
 
 



 --
 Best Regards,
 TANG Jiyu (Blog: http://jiyu.wordpress.com.cn)

 



-- 
Stay hungry,Stay foolish.

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Get time in milliseconds for later use in javascript

2008-12-01 Thread Greg

Javascript requires an integer in milliseconds, and time.time() gives
you floating point seconds, so lastUpdate=int(time.time()*1000) should
do it.

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to write code about table in template?

2008-12-01 Thread Matija

table
tbody
{% for obj in objects %}
tr
td{{ obj.col1 }}/tdtd{{ obj.col2 }}/td...
/tr
{% endfor %}
/tbody
/table

On Dec 1, 10:04 am, kang [EMAIL PROTECTED] wrote:
 what?
 I want to show 5 objs in each row, how to write the code?



 On Mon, Dec 1, 2008 at 5:01 PM, A. TNG [EMAIL PROTECTED] wrote:

  On Mon, Dec 1, 2008 at 2:27 PM, lookon [EMAIL PROTECTED] wrote:

   I want to render table in the response. and the template_value is
   objects. Then my question is how to write the template file.

   for example,
   {% for obj in objects %}
   table
   tbody
   code here

  {{ obj }} dosen't work?

   /tbody
   /table
   {% endfor %}

  --
  Best Regards,
  TANG Jiyu (Blog:http://jiyu.wordpress.com.cn)

 --
 Stay hungry,Stay foolish.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Naked domain

2008-12-01 Thread David Price
Hello,
 
If goggle has positioned the app engine to be used as a comercial product
why doesn't it allow what they call Naked domains. The only option is to
have a main domain www.xxx.com forward to the sub domain xxx.xxx.com. 
 
Have I got this wrong ? Is there a way to have an app engine site run as as
a naked domain ?
 
David
 


The information in this email is private  confidential. It is intended 
only for the use of the person(s) named. If you are not the intended recipient, 
you are notified that any dissemination or copying of this communication is 
prohibited and kindly requested to notify the sender and to then delete this 
message. BestAtTravel gives no representation or guarantee with respect to the 
integrity of any emails or attached file and the recipient should check the 
integrity of and scan this email and any attached files for viruses prior to 
opening.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: BadFilterError: Only one property per query may have inequality filters

2008-12-01 Thread Arun Shanker Prasad

Hi,

  I think that inequality filter can be applied on only one of the
properties.

query.filter('my_field1 =',  123)
query.filter('my_field2 =', 123)

  In this case the filter can only be applied to my_field1. You may
have to fetch the result and then process it based on the second
property.

On Nov 30, 8:49 pm, NoIEbrowser [EMAIL PROTECTED] wrote:
 Hi All,
 I see the error when I run this code:

 query = MyModel.all()
 query.filter('my_field1 =',  123)
 query.filter('my_field2 =', 123)
 print query.get()

 I found this work around:

 Marzia Niccolai: You may be able to work around this by storing the
 start and end date in two separate entities, and referencing one from
 the other.  Then you can do one inequality filter on the start date,
 and one on the end date.

 From:http://groups.google.com/group/google-appengine/browse_thread/thread/...

 Can you post a query example, please?
 (When I will see the example: Is this the best work around?)
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Error while uploading application

2008-12-01 Thread Shyam

I got the problem fixed. appcfg.py was not only looking at the
environment variables for proxy but also the proxy that I had set in
Internet Options (via Internet Explorer). I removed the proxy settings
from IE and then got appcfg.py working.

I am intrigued as to why appcfg.py looks into Internet Options in IE
and not just environment variables.

I was able to figure out this when I ran test code via Python console.

On Nov 29, 11:53 pm, Shyam [EMAIL PROTECTED] wrote:
 I get the following error while trying to upload an application

 Traceback (most recent call last):
   File D:\Program Files\Google\google_appengine\appcfg.py, line 55,
 in module

     execfile(script_path, globals())
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 1954, in module
     main(sys.argv)
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 1947, in main
     AppCfgApp(argv).Run()
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 1524, in Run
     self.action.function(self)
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 1736, in Update
     lambda path: open(os.path.join(basepath, path), rb))
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 1315, in DoUpload
     missing_files = self.Begin()
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 1176, in Begin
     version=self.version, payload=self.config.ToYAML())
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 282, in Send
     self._Authenticate()
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 321, in _Authenticate
     super(HttpRpcServer, self)._Authenticate()
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 261, in _Authenticate
     self._GetAuthCookie(auth_token)
   File D:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.p
 y, line 203, in _GetAuthCookie
     response = self.opener.open(req)
   File D:\Program Files\Python\Python25\lib\urllib2.py, line 381, in
 open
     response = self._open(req, data)
   File D:\Program Files\Python\Python25\lib\urllib2.py, line 399, in
 _open
     '_open', req)
   File D:\Program Files\Python\Python25\lib\urllib2.py, line 360, in
 _call_cha
 in
     result = func(*args)
   File D:\Program Files\Python\Python25\lib\urllib2.py, line 1107,
 in http_ope
 n
     return self.do_open(httplib.HTTPConnection, req)
   File D:\Program Files\Python\Python25\lib\urllib2.py, line 1082,
 in do_open
     raise URLError(err)
 urllib2.URLError: urlopen error (11001, 'getaddrinfo failed')

 I am not behind a firewall and my internet connection is OK. Please
 let me know how to solve this issue.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Naked domain

2008-12-01 Thread Alexander Kojevnikov

 Is there a way to have an app engine site run as as a naked domain ?

Not at the moment, see this issue:
http://code.google.com/p/googleappengine/issues/detail?id=777

...and this thread:
http://groups.google.com/group/google-appengine/browse_thread/thread/172596b3582786a2/c015fda212d9bc78

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: declaration precedence in models.py

2008-12-01 Thread djidjadji

Just don't mention the referenced class, and build the query yourself

class Bar(db.Model):
   fluff = db.ReferenceProperty(collection_name='ref1')

q=Barr.all().filter('fluff =', myfoo.key()).fetch(1000)

or make this a property of Foo

def Foo():
  @property
  def bars(self):
return Barr.all().filter('fluff =', self.key()).fetch(1000)


2008/11/25 p0windah [EMAIL PROTECTED]:

 I am using Djang0 1.0 with appengine and have bumped up against an odd
 thing.

 The order in which models are declared makes a difference.

 Using the models.py you will get the following error:
 NameError: name 'Foo' is not defined

 While swapping Foo with Bar solves this problem, it is not a practical
 solution when you have numerous models and references scattered across
 them.

 So, how are others tackling this problem?

 #/project/myapp/models.py – this does not work
 class Bar(db.Model):
fluff = db.ReferenceProperty(Foo)

 class Foo(db.Model):
title = db.StringProperty()


 


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Naked domain

2008-12-01 Thread Barry Hunter

2008/12/1 David Price [EMAIL PROTECTED]:
 Hello,

 If goggle has positioned the app engine to be used as a comercial product
 why doesn't it allow what they call Naked domains. The only option is to
 have a main domain www.xxx.com forward to the sub domain xxx.xxx.com.

not exactly, you just need to use a subdomain, so you have xxx.com
redirect to www.xxx.com (or any other subdomain eg xxx.com to
yyy.xxx.com)

its mainly because appengine is a distributed product and so uses
cnames and dns to apply the geographic distrubution. but cnames are
not well supported on naked domains.

about the only way to support naked domains is a reverse proxy - which
aside from the technical issues (which is slated as the reason its no
longer supported) - its really bad from a practical pov - it basically
undermines the distribution to make everything go though a central
proxy. ie is really slow (and there really isnt much that can be done
about it)


notice even google.com redirects to www.google.com



 Have I got this wrong ? Is there a way to have an app engine site run as as
 a naked domain ?

 David

 The information in this email is private  confidential. It is intended
 only for the use of the person(s) named. If you are not the intended
 recipient, you are notified that any dissemination or copying of this
 communication is prohibited and kindly requested to notify the sender and to
 then delete this message. BestAtTravel gives no representation or guarantee
 with respect to the integrity of any emails or attached file and the
 recipient should check the integrity of and scan this email and any attached
 files for viruses prior to opening.

 




-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: My first Webapp: Zip code search - Your advice

2008-12-01 Thread vinodxx



On Dec 1, 8:07 am, Faber Fedor [EMAIL PROTECTED] wrote:
 On Sun, Nov 30, 2008 at 9:34 AM, vinodxx [EMAIL PROTECTED] wrote:

  Hello friends,

  I made a Search for Zip Code,City,State and County utility here.

 http://zipcodesearch.appspot.com/

  Please comment on this application.

  Why does it return two answers for 08826 (NJ and CA) and 15901 (NY and
 PA).  90210 returns just one answer.

 It seems slow, but that might be network latency.


This problem is solved.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] No module named gdata.docs.service

2008-12-01 Thread Kevin

I am getting an error message in my development environment when I
attempt to load a page:

No module named gdata.docs.service

The top of the .py file is:


import os

import gdata.docs.service
import gdata.docs

When running Python 2.5.1 locally on my machine (MacBook Pro) I do a
help() and modules.  gdata is listed. I successfully ran the samples
that came with the backage through the terminal while running python.

I new to Pythin and love it, but after a few hours of digging Ive only
succeed in learning a lot of related material but so far been unable
to solve this issue.  I fear I am missing something obvious, even
after reading and re-reading tons of docs and pages.

Thanks in advance.

Kevin Hoffman

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] adSense on appspot.

2008-12-01 Thread Marcello Semboli

Hello,
adSense refuse to accept any appspot.com URL.
Reading adSense archive, this seems an old bug.

There is any way to add adsense to appspot.com application?

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Getting Started - Recursion Limit Error

2008-12-01 Thread stevebrodweb

I am trying to learn to use the App Engine from the Getting Started
guide (using Windows XP Pro and the dev_appserver). When I try to run
the Hello World program using appengine, the first time I connect to
localhost with the browser I get a blank page, if I then refresh the
page I get a long list of errors ending with maximum recursion depth
exceeded in cmp. I copied the code directly from the online guide -
it is as follows:

C:\Python25\Programs\helloworld.py
=code start===
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):
  def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello webapp World!')

application = webapp.WSGIApplication(
[('/', MainPage)],
debug=True)


def main():
  run_wsgi_app(application)

  if __name__ == __main__:
main()
=code end===

C:\Python25\Programs\app.yaml
=code start===
application: helloworld
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
=code start===

- sorry if this is something obvious, but I can't see it.

- SteveB.

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: My first Webapp: Zip code search - Your advice

2008-12-01 Thread Marcello Semboli

That's cool and useful.
A little question, please .
How do you put adsense in your site?
Adsense refuse to me to accept any appspot.com url.
Tnx for any answer.

On Nov 30, 3:34 pm, vinodxx [EMAIL PROTECTED] wrote:
 Hello friends,

 I made a Search for Zip Code,City,State and County utility here.

 http://zipcodesearch.appspot.com/

 Please comment on this application.

 regards,
 Vinod

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting Started - Recursion Limit Error

2008-12-01 Thread djidjadji

You have to teel which page to execute for the URL

- url: /.*
  script: helloworld.py

2008/12/1 stevebrodweb [EMAIL PROTECTED]:

 I am trying to learn to use the App Engine from the Getting Started
 guide (using Windows XP Pro and the dev_appserver). When I try to run
 the Hello World program using appengine, the first time I connect to
 localhost with the browser I get a blank page, if I then refresh the
 page I get a long list of errors ending with maximum recursion depth
 exceeded in cmp. I copied the code directly from the online guide -
 it is as follows:

 C:\Python25\Programs\helloworld.py
 =code start===
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp.util import run_wsgi_app

 class MainPage(webapp.RequestHandler):
  def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello webapp World!')

 application = webapp.WSGIApplication(
[('/', MainPage)],
debug=True)


 def main():
  run_wsgi_app(application)

  if __name__ == __main__:
main()
 =code end===

 C:\Python25\Programs\app.yaml
 =code start===
 application: helloworld
 version: 1
 runtime: python
 api_version: 1

 handlers:
 - url: /.*
 =code start===

 - sorry if this is something obvious, but I can't see it.

 - SteveB.

 


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How To Communicate Between App Engines

2008-12-01 Thread Dan Sanderson
I agree the current terms are a little vague for this case.  When we launch
billing, we'll have an updated version of the policy that discusses this
case more concretely.  In short, any strategy that applies multiple
allocations of the free quotas toward a single use (multiple apps acting as
a single application) would be against the terms of service.
Remember that if you need additional quota during the free preview period,
you can request a temporary increase:
http://code.google.com/support/bin/request.py?contact_type=AppEngineContact

-- Dan

On Sun, Nov 30, 2008 at 8:28 AM, Peter Recore [EMAIL PROTECTED] wrote:


 The TOS does seem to be a bit vague.

 If I design my app as a collection of disjoint web services, and
 decide to implement each web service in a different app, is that
 subverting the quota system?

 Let's say I was writing a facebook clone.  I might have an image
 processing service, a 'profile editing' service, and a feed publishing
 service.  If my client side code makes calls to all three of these
 services, does that mean i've subverted the quota system?






 On Nov 30, 4:49 am, Andrew Badera [EMAIL PROTECTED] wrote:
  Since when did resource quotas == security mechanisms? Apples and
 oranges,
  but if they ARE considered the same by Google, then the ToS needs to be
  cleaerer. If I can use 10 * x, what difference does it make if I do the
 same
  thing ten times over?
 
  Apples and oranges.
 
  Thanks-
  - Andy Badera
  - [EMAIL PROTECTED]
  - (518) 641-1280
 
  -http://higherefficiency.net/
  -http://changeroundup.com/
 
  -http://flipbitsnotburgers.blogspot.com/
  -http://andrew.badera.us/
 
  - Google me:http://www.google.com/search?q=andrew+badera
 
  On Sun, Nov 30, 2008 at 12:09 AM, Dan Sanderson [EMAIL PROTECTED]
 wrote:
 
   Roberto is correct.  Using multiple applications in concert to subvert
 the
   quota system is a violation of the terms of service.
  http://code.google.com/appengine/terms.html
 
   7.2. You may not ... attempt to disable or circumvent any security
   mechanisms used by the Service or any Application...
 
   -- Dan
 
   On Sat, Nov 29, 2008 at 9:00 AM, Roberto Saccon [EMAIL PROTECTED]
 wrote:
 
   An App Engine application is already a distributed system, so I would
   recommend you just to write a single app and wait until the quotas get
   lifted, so you can purchase as much as you need.
 
   If you just want provide web services to your apps, the common way in
   Python land seems to be HTTP REST.
 
   If you want to maximize your free quota with countless accounts, each
   one with ten apps, that might be against the terms.
 
   regards
   Roberto
 
   On Nov 29, 1:39 pm, jeffkyjin [EMAIL PROTECTED] wrote:
I have create some applications in App Engine. If  I want to build a
distributed system which will use many application in App Engine.
Because the quota of App Engine, I have to split the whole work to
pieces and send these pieces to other applications. Any advices on
this? And how can i use API to communicate between my applications?
 
Thanks a lot!
 


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How To Communicate Between App Engines

2008-12-01 Thread Andrew Badera
Then of course single use needs to be explored further ... what if I have
one master app that calls out to 9 subsidiary services that can/are also be
used for other purposes? They're all independent apps, and could/do run on
their own, but you could certainly look at that architecture as an effort to
circumvent the given interpretation of ToS.

Thanks-
- Andy Badera
- [EMAIL PROTECTED]
- (518) 641-1280




On Mon, Dec 1, 2008 at 12:12 PM, Dan Sanderson [EMAIL PROTECTED]wrote:

 I agree the current terms are a little vague for this case.  When we launch
 billing, we'll have an updated version of the policy that discusses this
 case more concretely.  In short, any strategy that applies multiple
 allocations of the free quotas toward a single use (multiple apps acting as
 a single application) would be against the terms of service.
 Remember that if you need additional quota during the free preview period,
 you can request a temporary increase:
 http://code.google.com/support/bin/request.py?contact_type=AppEngineContact

 -- Dan


 On Sun, Nov 30, 2008 at 8:28 AM, Peter Recore [EMAIL PROTECTED]wrote:


 The TOS does seem to be a bit vague.

 If I design my app as a collection of disjoint web services, and
 decide to implement each web service in a different app, is that
 subverting the quota system?

 Let's say I was writing a facebook clone.  I might have an image
 processing service, a 'profile editing' service, and a feed publishing
 service.  If my client side code makes calls to all three of these
 services, does that mean i've subverted the quota system?






 On Nov 30, 4:49 am, Andrew Badera [EMAIL PROTECTED] wrote:
  Since when did resource quotas == security mechanisms? Apples and
 oranges,
  but if they ARE considered the same by Google, then the ToS needs to be
  cleaerer. If I can use 10 * x, what difference does it make if I do the
 same
  thing ten times over?
 
  Apples and oranges.
 
  Thanks-
  - Andy Badera
  - [EMAIL PROTECTED]
  - (518) 641-1280
 
  -http://higherefficiency.net/
  -http://changeroundup.com/
 
  -http://flipbitsnotburgers.blogspot.com/
  -http://andrew.badera.us/
 
  - Google me:http://www.google.com/search?q=andrew+badera
 
  On Sun, Nov 30, 2008 at 12:09 AM, Dan Sanderson 
 [EMAIL PROTECTED]wrote:
 
   Roberto is correct.  Using multiple applications in concert to subvert
 the
   quota system is a violation of the terms of service.
  http://code.google.com/appengine/terms.html
 
   7.2. You may not ... attempt to disable or circumvent any security
   mechanisms used by the Service or any Application...
 
   -- Dan
 
   On Sat, Nov 29, 2008 at 9:00 AM, Roberto Saccon [EMAIL PROTECTED]
 wrote:
 
   An App Engine application is already a distributed system, so I would
   recommend you just to write a single app and wait until the quotas
 get
   lifted, so you can purchase as much as you need.
 
   If you just want provide web services to your apps, the common way in
   Python land seems to be HTTP REST.
 
   If you want to maximize your free quota with countless accounts, each
   one with ten apps, that might be against the terms.
 
   regards
   Roberto
 
   On Nov 29, 1:39 pm, jeffkyjin [EMAIL PROTECTED] wrote:
I have create some applications in App Engine. If  I want to build
 a
distributed system which will use many application in App Engine.
Because the quota of App Engine, I have to split the whole work to
pieces and send these pieces to other applications. Any advices on
this? And how can i use API to communicate between my applications?
 
Thanks a lot!



 


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] PIckling problem and memcache

2008-12-01 Thread hawkett

Hi,

  This might be a generic pythin question, but since I'm running into
an issue on GAE with memcache, this is probably a good place to ask.

I've got the following code

opGlobals = {}
exec(requestHandlerCode, opGlobals)
requestHandler = opGlobals[RequestHandler]()
memcache.add(key=requestHandler, value=requestHandler)

where 'requestHandlerCode' from the second line is just a python class
definition retrieved from a TextProperty in the datastore.  Lines 1-3
execute fine, and I can call methods on the class instantiated in line
3.  However, trying to put the instance into memcache as in line 4
generates the following error -

PicklingError: Can't pickle class __builtin__.RequestHandler at
0x17ef0c0: it's not found as __builtin__.RequestHandler

Which is fine - I understand that it needs to be able to find the
class definition in order to pickle/unpickle the object - what I'm not
sure of is the best approach to resolving the problem.  I could put
the code in memcache, but then I'd be compiling and instantiating it
every request, which is no good.

The obvious options seem to be -

1. Install the class definition in __builtin__ so pickle does know
what to do with it (feels like a hack?)
2. Tell pickle to also look elsewhere for the information it needs

If someone who knows python better than I do could point me in the
right direction, that would be great.  Cheers,

Colin
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting Started - Recursion Limit Error

2008-12-01 Thread stevebrodweb

Thanks djidjadji - sorry I missed that line when I cut and pasted the
code - it is in my app.yaml file. The problem lies elsewhere.
- SteveB.
On 1 Dec, 17:02, djidjadji [EMAIL PROTECTED] wrote:
 You have to teel which page to execute for the URL

 - url: /.*
   script: helloworld.py

 2008/12/1 stevebrodweb [EMAIL PROTECTED]:



  I am trying to learn to use the App Engine from the Getting Started
  guide (using Windows XP Pro and the dev_appserver). When I try to run
  the Hello World program using appengine, the first time I connect to
  localhost with the browser I get a blank page, if I then refresh the
  page I get a long list of errors ending with maximum recursion depth
  exceeded in cmp. I copied the code directly from the online guide -
  it is as follows:

  C:\Python25\Programs\helloworld.py
  =code start===
  from google.appengine.ext import webapp
  from google.appengine.ext.webapp.util import run_wsgi_app

  class MainPage(webapp.RequestHandler):
   def get(self):
     self.response.headers['Content-Type'] = 'text/plain'
     self.response.out.write('Hello webapp World!')

  application = webapp.WSGIApplication(
                                     [('/', MainPage)],
                                     debug=True)

  def main():
   run_wsgi_app(application)

   if __name__ == __main__:
     main()
  =code end===

  C:\Python25\Programs\app.yaml
  =code start===
  application: helloworld
  version: 1
  runtime: python
  api_version: 1

  handlers:
  - url: /.*
  =code start===

  - sorry if this is something obvious, but I can't see it.

  - SteveB.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: PIckling problem and memcache

2008-12-01 Thread hawkett

It occurred to me that pickle may have looked *everywhere* else, and
__builtin__ is just the last place it looked, which explains the
error.  So perhaps I just need to install my class definition
*anywhere* that pickle can find it. Still the question stands though -
what's the best approach to achieve what I am trying to do?  Thanks.

On Dec 1, 5:26 pm, hawkett [EMAIL PROTECTED] wrote:
 Hi,

   This might be a generic pythin question, but since I'm running into
 an issue on GAE with memcache, this is probably a good place to ask.

 I've got the following code

 opGlobals = {}
 exec(requestHandlerCode, opGlobals)
 requestHandler = opGlobals[RequestHandler]()
 memcache.add(key=requestHandler, value=requestHandler)

 where 'requestHandlerCode' from the second line is just a python class
 definition retrieved from a TextProperty in the datastore.  Lines 1-3
 execute fine, and I can call methods on the class instantiated in line
 3.  However, trying to put the instance into memcache as in line 4
 generates the following error -

 PicklingError: Can't pickle class __builtin__.RequestHandler at
 0x17ef0c0: it's not found as __builtin__.RequestHandler

 Which is fine - I understand that it needs to be able to find the
 class definition in order to pickle/unpickle the object - what I'm not
 sure of is the best approach to resolving the problem.  I could put
 the code in memcache, but then I'd be compiling and instantiating it
 every request, which is no good.

 The obvious options seem to be -

 1. Install the class definition in __builtin__ so pickle does know
 what to do with it (feels like a hack?)
 2. Tell pickle to also look elsewhere for the information it needs

 If someone who knows python better than I do could point me in the
 right direction, that would be great.  Cheers,

 Colin
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] dynamic plotting matplotlib

2008-12-01 Thread gratefulfrog

Hi!
I'm quite new to the app-engine and am trying to build an application
that dynamically reads a data feed (RSS or other) and builds charts by
plotting the data it has read. The exact data would be selected by
user input.

I was wondering if the app-engine can use the python module
matplotlib.py to do that or if there are other ways?

The google chart interface seems too limited for teh kind of multi-
variate charts I want to produce. Very simple static examples (gifs)
can be seen on my first attempt:

http://gratefulfrog-ap-demo.appspot.com/

Any advice or pointers would be very helpful!

Thanks to all for the app-engine which is a really great tool!
GF.

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: dynamic plotting matplotlib

2008-12-01 Thread Daniel O'Brien (Google)

We only support pure Python modules at present, and as far as I know
matplotlib depends on several compiled modules that we don't provide
ourselves (e.g. numpy). Other developers may have some experience with
alternatives or workarounds though.

Daniel

On Dec 1, 7:28 am, gratefulfrog [EMAIL PROTECTED] wrote:
 Hi!
 I'm quite new to the app-engine and am trying to build an application
 that dynamically reads a data feed (RSS or other) and builds charts by
 plotting the data it has read. The exact data would be selected by
 user input.

 I was wondering if the app-engine can use the python module
 matplotlib.py to do that or if there are other ways?

 The google chart interface seems too limited for teh kind of multi-
 variate charts I want to produce. Very simple static examples (gifs)
 can be seen on my first attempt:

 http://gratefulfrog-ap-demo.appspot.com/

 Any advice or pointers would be very helpful!

 Thanks to all for the app-engine which is a really great tool!
 GF.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Embedding VRML

2008-12-01 Thread Kieran Barker
Hi Jesaja

That has solved the problem, thank you for taking the time to reply!

Kieran



2008/11/30 Jesaja Everling [EMAIL PROTECTED]


 Hi Kieran,

 I think it should work if you put your *.wrl-files in the static-directory:

 app.yaml:

 handlers:
 - url: /media
  static_dir: media

 html:

 EMBED SRC=/media/cube.wrl

 Best Regards,

 Jesaja Everling


 On Sun, Nov 30, 2008 at 10:57 PM, Kieran [EMAIL PROTECTED] wrote:
 
  Hello
  I am trying to embed some VRML in my HTML using:
  EMBED SRC=cube.wrl
 TYPE=model/vrml
 WIDTH=128
 HEIGHT=128
 VRML_SPLASHSCREEN=FALSE
 VRML_DASHBOARD=FALSE
 VRML_BACKGROUND_COLOR=#CDCDCD
 CONTEXTMENU=FALSE
  When i run this with the dev_appserver on localhost:8080 it just
  displays a black square and no cube image.
  Any ideas on why this is or on how to embed VRML in HTML?
 
  Thnaks!
  
 

 


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Get time in milliseconds for later use in javascript

2008-12-01 Thread Peter

Thanks for the tips guys!

For bonus points, how do I go the otherway.

That is, given a time in milliseconds how do I convert it to a
datetime in python?

cheers,
Pete

On 1 Dec, 10:25, Greg [EMAIL PROTECTED] wrote:
 Javascript requires an integer in milliseconds, and time.time() gives
 you floating point seconds, so lastUpdate=int(time.time()*1000) should
 do it.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Get time in milliseconds for later use in javascript

2008-12-01 Thread Xavier Mathews
Did you try the conversion?

Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Google Group Client Based Tech Support Specialist
Hazel Crest Illinois
[EMAIL PROTECTED]@[EMAIL PROTECTED]
Fear of a name, only increases fear of the thing itself.










On Mon, Dec 1, 2008 at 1:04 PM, Peter [EMAIL PROTECTED] wrote:


 Thanks for the tips guys!

 For bonus points, how do I go the otherway.

 That is, given a time in milliseconds how do I convert it to a
 datetime in python?

 cheers,
 Pete

 On 1 Dec, 10:25, Greg [EMAIL PROTECTED] wrote:
  Javascript requires an integer in milliseconds, and time.time() gives
  you floating point seconds, so lastUpdate=int(time.time()*1000) should
  do it.
 


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] What is a proper way to cache values on per request basis?

2008-12-01 Thread Sharp-Developer.Net

Hi,

I have to retrieve some entities by key multiple times during single
request.

I do use memcache but getting quite high CPU usage and lot's of
warnings.

As I retrieve the same entity by it key multiple (many) times during a
request I wonder could I improve my code by caching results on per
request handler instance basis? I sure I could but as newbie in Python
I'm not sure what is the best place  way to do that.

I could add variable to a request object (I use Django) but that will
require to pass it to every place where I need to use it. It's too
complicated.

I wonder is there such a thing like a HttpContext.Current in C#? In
ASP.NET if I want to store/retrieve an object on per request basis
I'll simply do next:

   HttpContext.Current.Items[key] = value;
   var value = HttpContext.Current.Items[key];

Is the anything similar in AppEngine/Python?

Again, as a Python newbie will apreciate a working code sample.

I think this question could be interesting to many people.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting Started - Recursion Limit Error

2008-12-01 Thread Alexander Kojevnikov

It looks like you have redundant indents on these lines:

  if __name__ == __main__:
main()

Try to un-indent them. If this doesn't help, could post here the full
error output?

On Dec 2, 1:46 am, stevebrodweb [EMAIL PROTECTED] wrote:
 I am trying to learn to use the App Engine from the Getting Started
 guide (using Windows XP Pro and the dev_appserver). When I try to run
 the Hello World program using appengine, the first time I connect to
 localhost with the browser I get a blank page, if I then refresh the
 page I get a long list of errors ending with maximum recursion depth
 exceeded in cmp. I copied the code directly from the online guide -
 it is as follows:

 C:\Python25\Programs\helloworld.py
 =code start===
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp.util import run_wsgi_app

 class MainPage(webapp.RequestHandler):
   def get(self):
     self.response.headers['Content-Type'] = 'text/plain'
     self.response.out.write('Hello webapp World!')

 application = webapp.WSGIApplication(
                                     [('/', MainPage)],
                                     debug=True)

 def main():
   run_wsgi_app(application)

   if __name__ == __main__:
     main()
 =code end===

 C:\Python25\Programs\app.yaml
 =code start===
 application: helloworld
 version: 1
 runtime: python
 api_version: 1

 handlers:
 - url: /.*
 =code start===

 - sorry if this is something obvious, but I can't see it.

 - SteveB.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: What is a proper way to cache values on per request basis?

2008-12-01 Thread Joel Odom
Try getting rid of the memcache in favor of a hard-coded value (for testing
purposes only).  If you're still getting high CPU usage, then the problem is
not with your use of memcache.
You can also use global variables to cache values, as long as you're
careful.



On Mon, Dec 1, 2008 at 2:28 PM, Sharp-Developer.Net 
[EMAIL PROTECTED] wrote:


 Hi,

 I have to retrieve some entities by key multiple times during single
 request.

 I do use memcache but getting quite high CPU usage and lot's of
 warnings.

 As I retrieve the same entity by it key multiple (many) times during a
 request I wonder could I improve my code by caching results on per
 request handler instance basis? I sure I could but as newbie in Python
 I'm not sure what is the best place  way to do that.

 I could add variable to a request object (I use Django) but that will
 require to pass it to every place where I need to use it. It's too
 complicated.

 I wonder is there such a thing like a HttpContext.Current in C#? In
 ASP.NET if I want to store/retrieve an object on per request basis
 I'll simply do next:

   HttpContext.Current.Items[key] = value;
   var value = HttpContext.Current.Items[key];

 Is the anything similar in AppEngine/Python?

 Again, as a Python newbie will apreciate a working code sample.

 I think this question could be interesting to many people.
 



-- 
http://giscoder.blogspot.com/

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: No module named gdata.docs.service

2008-12-01 Thread ctran


You need to download this module and include it in your project.

On Dec 1, 5:42 am, Kevin [EMAIL PROTECTED] wrote:
 I am getting an error message in my development environment when I
 attempt to load a page:

 No module named gdata.docs.service

 The top of the .py file is:

 import os

 import gdata.docs.service
 import gdata.docs

 When running Python 2.5.1 locally on my machine (MacBook Pro) I do a
 help() and modules.  gdata is listed. I successfully ran the samples
 that came with the backage through the terminal while running python.

 I new to Pythin and love it, but after a few hours of digging Ive only
 succeed in learning a lot of related material but so far been unable
 to solve this issue.  I fear I am missing something obvious, even
 after reading and re-reading tons of docs and pages.

 Thanks in advance.

 Kevin Hoffman
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Get time in milliseconds for later use in javascript

2008-12-01 Thread Peter

Yeah,
  Greg's method works a treat, but I'm struggling to figure out how to
go the otherway.

Cheers,
Pete

On 1 Dec, 19:06, Xavier Mathews [EMAIL PROTECTED] wrote:
 Did you try the conversion?

 Xavier A. Mathews
 Student/Browser Specialist/Developer/Web-Master
 Google Group Client Based Tech Support Specialist
 Hazel Crest Illinois
 [EMAIL PROTECTED]@[EMAIL PROTECTED]
 Fear of a name, only increases fear of the thing itself.

 On Mon, Dec 1, 2008 at 1:04 PM, Peter [EMAIL PROTECTED] wrote:

  Thanks for the tips guys!

  For bonus points, how do I go the otherway.

  That is, given a time in milliseconds how do I convert it to a
  datetime in python?

  cheers,
  Pete

  On 1 Dec, 10:25, Greg [EMAIL PROTECTED] wrote:
   Javascript requires an integer in milliseconds, and time.time() gives
   you floating point seconds, so lastUpdate=int(time.time()*1000) should
   do it.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Uploading 90'000 Records with Bulk Data Uploader

2008-12-01 Thread NoIEbrowser

Can I use bulkload_client.py to load more data?

[ data.csv ]
double, double, char(2), char(3), varchar(50)

Does any limitation exist?
(time limits?)
(request limits?)

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Get time in milliseconds for later use in javascript

2008-12-01 Thread Peter

Seem to have succeeded with datetime.fromtimestamp(float(lastUpdate) /
1000)

Cheers,
Peter

On 1 Dec, 19:45, Peter [EMAIL PROTECTED] wrote:
 Yeah,
   Greg's method works a treat, but I'm struggling to figure out how to
 go the otherway.

 Cheers,
 Pete

 On 1 Dec, 19:06, Xavier Mathews [EMAIL PROTECTED] wrote:

  Did you try the conversion?

  Xavier A. Mathews
  Student/Browser Specialist/Developer/Web-Master
  Google Group Client Based Tech Support Specialist
  Hazel Crest Illinois
  [EMAIL PROTECTED]@[EMAIL PROTECTED]
  Fear of a name, only increases fear of the thing itself.

  On Mon, Dec 1, 2008 at 1:04 PM, Peter [EMAIL PROTECTED] wrote:

   Thanks for the tips guys!

   For bonus points, how do I go the otherway.

   That is, given a time in milliseconds how do I convert it to a
   datetime in python?

   cheers,
   Pete

   On 1 Dec, 10:25, Greg [EMAIL PROTECTED] wrote:
Javascript requires an integer in milliseconds, and time.time() gives
you floating point seconds, so lastUpdate=int(time.time()*1000) should
do it.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: BadFilterError: Only one property per query may have inequality filters

2008-12-01 Thread NoIEbrowser

I've 90'000 records 8-)

On Dec 1, 12:03 pm, Arun Shanker Prasad [EMAIL PROTECTED]
wrote:
 Hi,

   I think that inequality filter can be applied on only one of the
 properties.

 query.filter('my_field1 =',  123)
 query.filter('my_field2 =', 123)

   In this case the filter can only be applied to my_field1. You may
 have to fetch the result and then process it based on the second
 property.

 On Nov 30, 8:49 pm, NoIEbrowser [EMAIL PROTECTED] wrote:

  Hi All,
  I see the error when I run this code:

  query = MyModel.all()
  query.filter('my_field1 =',  123)
  query.filter('my_field2 =', 123)
  print query.get()

  I found this work around:

  Marzia Niccolai: You may be able to work around this by storing the
  start and end date in two separate entities, and referencing one from
  the other.  Then you can do one inequality filter on the start date,
  and one on the end date.

  From:http://groups.google.com/group/google-appengine/browse_thread/thread/...

  Can you post a query example, please?
  (When I will see the example: Is this the best work around?)
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Crafting a raw HTTP response header - Server injecting its own status code

2008-12-01 Thread Brian

I've decided not to use WSGI for my application, and instead I'm
crafting my HTTP responses by hand, much like the Hello World
example in the GAE documentation:

print 'Content-Type: text/plain'
print ''
print 'Hello, world!'

It seems that when this method is used, the output is buffered and
then altered by the server (I assume both development and production),
injecting additional headers -- server, content-length, cache-control,
etc.  This is all well and good, for the most part, as it doesn't seem
to overwrite any headers I've crafted.

Now on to my problem:
The server also injects a status line into my crafted response.  Any
requested URL that matches a URL pattern in app.yaml will result in a
200 OK status.  So, taking the Hello World example above, I would like
to do the following:

print 'HTTP/1.1 404 Not Found'
print 'Content-Type: text/plain'
print ''
print 'Hello world wasn't found!'

When I do this, the server doesn't recognize the HTTP status code,
injects its own status code and headers, then sends by my original
status code and headers as response content.

I assume this would be considered a bug, unless I'm doing something
wrong.  Any help would be appreciated, otherwise I will file a bug
report.

Thanks

Brian
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Get time in milliseconds for later use in javascript

2008-12-01 Thread Xavier Mathews

OK GREAT

On 12/01/2008, Peter [EMAIL PROTECTED] wrote:

 Seem to have succeeded with datetime.fromtimestamp(float(lastUpdate) /
 1000)

 Cheers,
 Peter

 On 1 Dec, 19:45, Peter [EMAIL PROTECTED] wrote:
 Yeah,
   Greg's method works a treat, but I'm struggling to figure out how to
 go the otherway.

 Cheers,
 Pete

 On 1 Dec, 19:06, Xavier Mathews [EMAIL PROTECTED] wrote:

  Did you try the conversion?

  Xavier A. Mathews
  Student/Browser Specialist/Developer/Web-Master
  Google Group Client Based Tech Support Specialist
  Hazel Crest Illinois
  [EMAIL PROTECTED]@[EMAIL PROTECTED]
  Fear of a name, only increases fear of the thing itself.

  On Mon, Dec 1, 2008 at 1:04 PM, Peter [EMAIL PROTECTED]
  wrote:

   Thanks for the tips guys!

   For bonus points, how do I go the otherway.

   That is, given a time in milliseconds how do I convert it to a
   datetime in python?

   cheers,
   Pete

   On 1 Dec, 10:25, Greg [EMAIL PROTECTED] wrote:
Javascript requires an integer in milliseconds, and time.time()
gives
you floating point seconds, so lastUpdate=int(time.time()*1000)
should
do it.
 



-- 
Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Google Group Client Based Tech Support Specialist
Hazel Crest Illinois
[EMAIL PROTECTED]@[EMAIL PROTECTED]
Fear of a name, only increases fear of the thing itself.

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Crafting a raw HTTP response header - Server injecting its own status code

2008-12-01 Thread yejun

GAE program run on a CGI server if you decide to by pass WSGI gateway.
So you should use CGI header instead of raw HTTP headers.

On Dec 1, 3:48 pm, Brian [EMAIL PROTECTED] wrote:
 I've decided not to use WSGI for my application, and instead I'm
 crafting my HTTP responses by hand, much like the Hello World
 example in the GAE documentation:

 print 'Content-Type: text/plain'
 print ''
 print 'Hello, world!'

 It seems that when this method is used, the output is buffered and
 then altered by the server (I assume both development and production),
 injecting additional headers -- server, content-length, cache-control,
 etc.  This is all well and good, for the most part, as it doesn't seem
 to overwrite any headers I've crafted.

 Now on to my problem:
 The server also injects a status line into my crafted response.  Any
 requested URL that matches a URL pattern in app.yaml will result in a
 200 OK status.  So, taking the Hello World example above, I would like
 to do the following:

 print 'HTTP/1.1 404 Not Found'
 print 'Content-Type: text/plain'
 print ''
 print 'Hello world wasn't found!'

 When I do this, the server doesn't recognize the HTTP status code,
 injects its own status code and headers, then sends by my original
 status code and headers as response content.

 I assume this would be considered a bug, unless I'm doing something
 wrong.  Any help would be appreciated, otherwise I will file a bug
 report.

 Thanks

 Brian
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] AE 1.1.7 defines has_key on db.Model

2008-12-01 Thread Ken Tidwell

Apparently, some bright spark has defined a has_key method on db.Model.

Doing so will preclude the creation of any Model derived from or 
emulating dictionary classes (such as UserDict or DictMixin).

The has_key method in question does not follow the same semantics as 
has_key on dict so the choice of name is unfortunate, to say the least.

Any chance the method could be renamed to something less toxic and more 
suggestive of its actual function (such as key_complete)?

ken

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Transaction Isolation

2008-12-01 Thread Amir Michail

Hi,

Why this inconsistency?

http://code.google.com/appengine/articles/transaction_isolation.html

Why not just delay the query until milestone B is completed?

Amir


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Programming Google App Engine, website for the book now available

2008-12-01 Thread Dan Sanderson
Hi all -

Some of you have noticed that Programming Google App Engine, a new book to
be published by O'Reilly Media in 2009, is now available through O'Reilly's
Rough Cuts program.  Rough Cuts gives you early access to electronic drafts
of the book as it is being written, and can optionally include a pre-order
of the printed book when it comes out.  The first few chapters are available
now:
  http://oreilly.com/catalog/9780596156732/

The support site and blog for the book are now available.  I'll be blogging
about the book, updates to the Rough Cuts edition, and App Engine in
general:
  http://ae-book.appspot.com/

The blog has a feed:
  feed://ae-book.appspot.com/blog/atom.xml/

I'm excited to have the opportunity to improve the book prior to publishing
based on your feedback.  Please let me know, via the site or via email, if
you have any questions or comments.

Thanks!
-- Dan

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: issues with to_xml()

2008-12-01 Thread Jeff S

Hi Colin,

It sounds like the best place for this idea is in the issue tracker:
http://code.google.com/p/googleappengine/issues/list

Right now the recommended solution is parsing the key out of the
universally unique key string, as you mentioned.

Happy coding,

Jeff

On Nov 30, 1:03 pm, hawkett [EMAIL PROTECTED] wrote:
 Hi,

 The output of Model (or Expando) to_xml() looks something like below

 entity kind=MyKind
 key=agtkaXNvcy13ZWF3ZXIjCxIFU7NvcGUiC3NlZWRQcm0jZXNzDAsSB0NvdnRleHQYCQw
   keytag:app-id.gmail.com,2008-11-30:MyKind
 [agtkaXNvcy13ZWF3ZXIjCxIFU7NvcGUiC3NlZWRQcm0jZXNzDAsSB0NvdnRleHQYCQw
 ]/key
   property name=created type=gd:when2008-11-30 19:13:52.477930/
 property
   property name=name type=stringJerome/property
   property name=selfRef type=null/property
   property name=otherKindRef type=keytag:app-id.gmail.com,
 2008-11-30:MyOtherKind
 [agtkaXNvcy13ZWF3ZXIWDxIFU7NvcGUiC3NlZWRQdm9jZXNzDA
 ]/property
 /entity

 I've got a couple of problems with this output.

 1.  The 'key' attribute of the 'entity' element is of one form, and
 all other keys in the document are of a different form.  Key
 representation should be consistent, especially considering point 2.

 2.  I cannot create a Key object using any of the key values in the
 above (except the 'key' attribute on 'entity' element) without first
 doing a string manipulation.  Why output a key value that you can't
 parse?

 And some recommendations

 1. I'm guessing the longer key form is to conform to the Atom or GData
 specs (as the docs say)  - i.e. making the key universally unique -
 even between apps.  If the GAE Data API produces this key
 representation, then it should also be able to consume this
 representation.

 2. If you are going to provide the shorthand for the actual entity
 (i.e. the 'key' attribute on 'entity' element), you should also
 provide it for the references.  This would be a workable solution for
 me - I'm not interested in the universally unique identifier.

 Maybe I've missed an API that lets me create a key without butchering
 one of those long keys - if you could point me in the right direction
 that would be great.  Cheers,

 Colin
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Small Bug - I think

2008-12-01 Thread Larry

Well deleting properties work well generally but not when the object
is a DateTimeProperty and auto_now=True. Then, if you try delete the
property, it will saved an updated value when put() is called! I am at
a loss to know how to delete these properties considering every time I
do delete it, they get a new value!

Any ideas?
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Small Bug - I think

2008-12-01 Thread Xavier Mathews
Post it in the issue tracker!

Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Google Group Client Based Tech Support Specialist
Hazel Crest Illinois
[EMAIL PROTECTED]@[EMAIL PROTECTED]
Fear of a name, only increases fear of the thing itself.










On Mon, Dec 1, 2008 at 4:25 PM, Larry [EMAIL PROTECTED] wrote:


 Well deleting properties work well generally but not when the object
 is a DateTimeProperty and auto_now=True. Then, if you try delete the
 property, it will saved an updated value when put() is called! I am at
 a loss to know how to delete these properties considering every time I
 do delete it, they get a new value!

 Any ideas?
 


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Small Bug - I think

2008-12-01 Thread Larry

Here it is:

http://code.google.com/p/googleappengine/issues/detail?id=895

On Dec 1, 10:26 pm, Xavier Mathews [EMAIL PROTECTED] wrote:
 Post it in the issue tracker!

 Xavier A. Mathews
 Student/Browser Specialist/Developer/Web-Master
 Google Group Client Based Tech Support Specialist
 Hazel Crest Illinois
 [EMAIL PROTECTED]@[EMAIL PROTECTED]
 Fear of a name, only increases fear of the thing itself.

 On Mon, Dec 1, 2008 at 4:25 PM, Larry [EMAIL PROTECTED] wrote:

  Well deleting properties work well generally but not when the object
  is a DateTimeProperty and auto_now=True. Then, if you try delete the
  property, it will saved an updated value when put() is called! I am at
  a loss to know how to delete these properties considering every time I
  do delete it, they get a new value!

  Any ideas?
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: What is a proper way to cache values on per request basis?

2008-12-01 Thread Sharp-Developer.Net

Ok, may be the problem was in json serialization/deserialization.

But I'm learning the Python/GAE and still eager to get answer to my
question regarding how to store some values accessible throug out
request without passing them through out all my layers.

Any help?
--
Alex
http://sharp-developer.net/

On Dec 1, 7:39 pm, Joel Odom [EMAIL PROTECTED] wrote:
 Try getting rid of the memcache in favor of a hard-coded value (for testing
 purposes only).  If you're still getting high CPU usage, then the problem is
 not with your use of memcache.
 You can also use global variables to cache values, as long as you're
 careful.

 On Mon, Dec 1, 2008 at 2:28 PM, Sharp-Developer.Net 



 [EMAIL PROTECTED] wrote:

  Hi,

  I have to retrieve some entities by key multiple times during single
  request.

  I do use memcache but getting quite high CPU usage and lot's of
  warnings.

  As I retrieve the same entity by it key multiple (many) times during a
  request I wonder could I improve my code by caching results on per
  request handler instance basis? I sure I could but as newbie in Python
  I'm not sure what is the best place  way to do that.

  I could add variable to a request object (I use Django) but that will
  require to pass it to every place where I need to use it. It's too
  complicated.

  I wonder is there such a thing like a HttpContext.Current in C#? In
  ASP.NET if I want to store/retrieve an object on per request basis
  I'll simply do next:

    HttpContext.Current.Items[key] = value;
    var value = HttpContext.Current.Items[key];

  Is the anything similar in AppEngine/Python?

  Again, as a Python newbie will apreciate a working code sample.

  I think this question could be interesting to many people.

 --http://giscoder.blogspot.com/
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Sorting on Properties of a Reference

2008-12-01 Thread sarp

Is it possible to order by a property belonging to a reference
property in GQL queries?

For example:
class Employee(db.Model):
 belongsto = db.ReferenceProperty(Company)

class Company(db.Model):
name = db.TextProperty()

I want to do
db.GqlQuery(SELECT * FROM Employee ORDER BY belongsto.name)

Thanks,
Sarp

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: AE 1.1.7 defines has_key on db.Model

2008-12-01 Thread Daniel O'Brien (Google)

It's worth filing this as a feature request (or defect) in the public
issue tracker, if you haven't already: 
http://code.google.com/p/googleappengine/issues/list

As far as I know this method has existed since 1.1.6: Some developers
ran into issues involving cheetah, which assumes that any has_key
method behaves like that of a dict which, as you've noted, the one no
db.Model doesn't.

Daniel

On Dec 1, 1:54 pm, Ken Tidwell [EMAIL PROTECTED] wrote:
 Apparently, some bright spark has defined a has_key method on db.Model.

 Doing so will preclude the creation of any Model derived from or
 emulating dictionary classes (such as UserDict or DictMixin).

 The has_key method in question does not follow the same semantics as
 has_key on dict so the choice of name is unfortunate, to say the least.

 Any chance the method could be renamed to something less toxic and more
 suggestive of its actual function (such as key_complete)?

 ken
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Sorting on Properties of a Reference

2008-12-01 Thread Xavier Mathews

SQL Or GQL?

On 12/01/2008, sarp [EMAIL PROTECTED] wrote:

 Is it possible to order by a property belonging to a reference
 property in GQL queries?

 For example:
 class Employee(db.Model):
  belongsto = db.ReferenceProperty(Company)

 class Company(db.Model):
 name = db.TextProperty()

 I want to do
 db.GqlQuery(SELECT * FROM Employee ORDER BY belongsto.name)

 Thanks,
 Sarp

 



-- 
Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Google Group Client Based Tech Support Specialist
Hazel Crest Illinois
[EMAIL PROTECTED]@[EMAIL PROTECTED]
Fear of a name, only increases fear of the thing itself.

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: PIckling problem and memcache

2008-12-01 Thread Tim Hoffman

Have a look at pickle docs, you will see that a class needs a
getstate,setstate methods to
support pickling. Large/complex instances of classes won't pickle out
of the box think about
classes like request handlers have many subobjects and pickle wouldn't
know how to deal with
this.

Rgds

Tim

P.S. I am not sure why you would want to cache a request handler in
the first place though.


On Dec 2, 3:08 am, hawkett [EMAIL PROTECTED] wrote:
 It occurred to me that pickle may have looked *everywhere* else, and
 __builtin__ is just the last place it looked, which explains the
 error.  So perhaps I just need to install my class definition
 *anywhere* that pickle can find it. Still the question stands though -
 what's the best approach to achieve what I am trying to do?  Thanks.

 On Dec 1, 5:26 pm, hawkett [EMAIL PROTECTED] wrote:

  Hi,

    This might be a generic pythin question, but since I'm running into
  an issue on GAE with memcache, this is probably a good place to ask.

  I've got the following code

  opGlobals = {}
  exec(requestHandlerCode, opGlobals)
  requestHandler = opGlobals[RequestHandler]()
  memcache.add(key=requestHandler, value=requestHandler)

  where 'requestHandlerCode' from the second line is just a python class
  definition retrieved from a TextProperty in the datastore.  Lines 1-3
  execute fine, and I can call methods on the class instantiated in line
  3.  However, trying to put the instance into memcache as in line 4
  generates the following error -

  PicklingError: Can't pickle class __builtin__.RequestHandler at
  0x17ef0c0: it's not found as __builtin__.RequestHandler

  Which is fine - I understand that it needs to be able to find the
  class definition in order to pickle/unpickle the object - what I'm not
  sure of is the best approach to resolving the problem.  I could put
  the code in memcache, but then I'd be compiling and instantiating it
  every request, which is no good.

  The obvious options seem to be -

  1. Install the class definition in __builtin__ so pickle does know
  what to do with it (feels like a hack?)
  2. Tell pickle to also look elsewhere for the information it needs

  If someone who knows python better than I do could point me in the
  right direction, that would be great.  Cheers,

  Colin


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Memcache errors

2008-12-01 Thread Jeff S

Hi Ben,

Where are you seeing this error? If you could provide some code
showing what triggered this error I'd be happy to track this down.

Happy coding,

Jeff

On Nov 26, 7:03 pm, Ben [EMAIL PROTECTED] wrote:
 Anyone shed some light on memcache KeyError: '4021'
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Crafting a raw HTTP response header - Server injecting its own status code

2008-12-01 Thread Brian

Thanks yejun, got it working.

On Dec 1, 3:45 pm, yejun [EMAIL PROTECTED] wrote:
 GAE program run on a CGI server if you decide to by pass WSGI gateway.
 So you should use CGI header instead of raw HTTP headers.

 On Dec 1, 3:48 pm, Brian [EMAIL PROTECTED] wrote:

  I've decided not to use WSGI for my application, and instead I'm
  crafting my HTTP responses by hand, much like the Hello World
  example in the GAE documentation:

  print 'Content-Type: text/plain'
  print ''
  print 'Hello, world!'

  It seems that when this method is used, the output is buffered and
  then altered by the server (I assume both development and production),
  injecting additional headers -- server, content-length, cache-control,
  etc.  This is all well and good, for the most part, as it doesn't seem
  to overwrite any headers I've crafted.

  Now on to my problem:
  The server also injects a status line into my crafted response.  Any
  requested URL that matches a URL pattern in app.yaml will result in a
  200 OK status.  So, taking the Hello World example above, I would like
  to do the following:

  print 'HTTP/1.1 404 Not Found'
  print 'Content-Type: text/plain'
  print ''
  print 'Hello world wasn't found!'

  When I do this, the server doesn't recognize the HTTP status code,
  injects its own status code and headers, then sends by my original
  status code and headers as response content.

  I assume this would be considered a bug, unless I'm doing something
  wrong.  Any help would be appreciated, otherwise I will file a bug
  report.

  Thanks

  Brian
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Passing template text instead of template file path to template.render()

2008-12-01 Thread Brian

I would like to be able to pass template text to template.render(),
for example:

tpl_vars = {'name' : 'brian'}
output = template.render('Hello, {{name}}!', tpl_vars)

I know I can't do this because it is expecting a path to the template
file, but I am wondering if there is some sort of workaround (or more
obvious solution that I've missed) to achieve what I want.

Thanks,

Brian
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Passing template text instead of template file path to template.render()

2008-12-01 Thread Brian

I should also note that I've tried importing django's Template and
Context objects directly but get some sort of configuration exception.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Passing template text instead of template file path to template.render()

2008-12-01 Thread Xavier Mathews

Ok so whats the problem.

On 12/01/2008, Brian [EMAIL PROTECTED] wrote:

 I would like to be able to pass template text to template.render(),
 for example:

 tpl_vars = {'name' : 'brian'}
 output = template.render('Hello, {{name}}!', tpl_vars)

 I know I can't do this because it is expecting a path to the template
 file, but I am wondering if there is some sort of workaround (or more
 obvious solution that I've missed) to achieve what I want.

 Thanks,

 Brian
 



-- 
Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Google Group Client Based Tech Support Specialist
Hazel Crest Illinois
[EMAIL PROTECTED]@[EMAIL PROTECTED]
Fear of a name, only increases fear of the thing itself.

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: What is a proper way to cache values on per request basis?

2008-12-01 Thread yejun

You can save it to a global variable as cache.
You can use a module level variable as cache and clear it in the
handler's __init__.

On Dec 1, 2:28 pm, Sharp-Developer.Net
[EMAIL PROTECTED] wrote:
 Hi,

 I have to retrieve some entities by key multiple times during single
 request.

 I do use memcache but getting quite high CPU usage and lot's of
 warnings.

 As I retrieve the same entity by it key multiple (many) times during a
 request I wonder could I improve my code by caching results on per
 request handler instance basis? I sure I could but as newbie in Python
 I'm not sure what is the best place  way to do that.

 I could add variable to a request object (I use Django) but that will
 require to pass it to every place where I need to use it. It's too
 complicated.

 I wonder is there such a thing like a HttpContext.Current in C#? In
 ASP.NET if I want to store/retrieve an object on per request basis
 I'll simply do next:

    HttpContext.Current.Items[key] = value;
    var value = HttpContext.Current.Items[key];

 Is the anything similar in AppEngine/Python?

 Again, as a Python newbie will apreciate a working code sample.

 I think this question could be interesting to many people.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: What is a proper way to cache values on per request basis?

2008-12-01 Thread yejun

For example,

import __main__

class yourhandler(webapp.RequestHandler):
def __init__():
__main__.cache = {}

On Dec 1, 9:00 pm, yejun [EMAIL PROTECTED] wrote:
 You can save it to a global variable as cache.
 You can use a module level variable as cache and clear it in the
 handler's __init__.

 On Dec 1, 2:28 pm, Sharp-Developer.Net

 [EMAIL PROTECTED] wrote:
  Hi,

  I have to retrieve some entities by key multiple times during single
  request.

  I do use memcache but getting quite high CPU usage and lot's of
  warnings.

  As I retrieve the same entity by it key multiple (many) times during a
  request I wonder could I improve my code by caching results on per
  request handler instance basis? I sure I could but as newbie in Python
  I'm not sure what is the best place  way to do that.

  I could add variable to a request object (I use Django) but that will
  require to pass it to every place where I need to use it. It's too
  complicated.

  I wonder is there such a thing like a HttpContext.Current in C#? In
  ASP.NET if I want to store/retrieve an object on per request basis
  I'll simply do next:

     HttpContext.Current.Items[key] = value;
     var value = HttpContext.Current.Items[key];

  Is the anything similar in AppEngine/Python?

  Again, as a Python newbie will apreciate a working code sample.

  I think this question could be interesting to many people.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Memcache errors

2008-12-01 Thread Xavier Mathews

If You Could Display The Error MSG I Could Run It For You!

On 12/01/2008, Jeff S [EMAIL PROTECTED] wrote:

 Hi Ben,

 Where are you seeing this error? If you could provide some code
 showing what triggered this error I'd be happy to track this down.

 Happy coding,

 Jeff

 On Nov 26, 7:03 pm, Ben [EMAIL PROTECTED] wrote:
 Anyone shed some light on memcache KeyError: '4021'
 



-- 
Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Google Group Client Based Tech Support Specialist
Hazel Crest Illinois
[EMAIL PROTECTED]@[EMAIL PROTECTED]
Fear of a name, only increases fear of the thing itself.

--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Sorting on Properties of a Reference

2008-12-01 Thread Alexander Kojevnikov

It's not possible, you will need to de-normalise your data model.
Also, it's not possible to define indices on a TextProperty, use a
StringProperty instead.

On Dec 2, 8:50 am, sarp [EMAIL PROTECTED] wrote:
 Is it possible to order by a property belonging to a reference
 property in GQL queries?

 For example:
 class Employee(db.Model):
  belongsto = db.ReferenceProperty(Company)

 class Company(db.Model):
 name = db.TextProperty()

 I want to do
 db.GqlQuery(SELECT * FROM Employee ORDER BY belongsto.name)

 Thanks,
 Sarp
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Passing template text instead of template file path to template.render()

2008-12-01 Thread Brian

I want to pass straight template text as a string to the templating
engine and get it rendered.  How can I achieve this?

On Dec 1, 6:48 pm, Xavier Mathews [EMAIL PROTECTED] wrote:
 Ok so whats the problem.

 On 12/01/2008, Brian [EMAIL PROTECTED] wrote:





  I would like to be able to pass template text to template.render(),
  for example:

  tpl_vars = {'name' : 'brian'}
  output = template.render('Hello, {{name}}!', tpl_vars)

  I know I can't do this because it is expecting a path to the template
  file, but I am wondering if there is some sort of workaround (or more
  obvious solution that I've missed) to achieve what I want.

  Thanks,

  Brian

 --
 Xavier A. Mathews
 Student/Browser Specialist/Developer/Web-Master
 Google Group Client Based Tech Support Specialist
 Hazel Crest Illinois
 [EMAIL PROTECTED]@[EMAIL PROTECTED]
 Fear of a name, only increases fear of the thing itself.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Passing template text instead of template file path to template.render()

2008-12-01 Thread Brian

I want to pass straight template text as a string to the templating
engine and get it rendered.  How can I achieve this?

On Dec 1, 6:48 pm, Xavier Mathews [EMAIL PROTECTED] wrote:
 Ok so whats the problem.

 On 12/01/2008, Brian [EMAIL PROTECTED] wrote:





  I would like to be able to pass template text to template.render(),
  for example:

  tpl_vars = {'name' : 'brian'}
  output = template.render('Hello, {{name}}!', tpl_vars)

  I know I can't do this because it is expecting a path to the template
  file, but I am wondering if there is some sort of workaround (or more
  obvious solution that I've missed) to achieve what I want.

  Thanks,

  Brian

 --
 Xavier A. Mathews
 Student/Browser Specialist/Developer/Web-Master
 Google Group Client Based Tech Support Specialist
 Hazel Crest Illinois
 [EMAIL PROTECTED]@[EMAIL PROTECTED]
 Fear of a name, only increases fear of the thing itself.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Working with a proxy for data storage and URL fetch

2008-12-01 Thread Selva

This is a situation which is completely different. I got a requirement
to store more than 15k of entities in a datastore.
I could not succeed with bulkload utility. I did a small trick for
this. I have uploaded all the data to an RDBMS and
I have  written wsgi handlers to access the db and fetch the values. I
have configured the mod_wsgi to the apache .
From the GAE application, I am calling the wsgi handlers through the
urlfetch API. Currently GAE is used as a templating language and a
platform for my application. Is this the correct solution in temporary
basis till the datastore bulkload is possible? Could you please
clarify me.
--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Why limit request time (as opposed to cpu usage)?

2008-12-01 Thread Amir Michail

Hi,

When doing a urlfetch, it may take quite a long time.  As this is not
a CPU usage issue, what's the point of limiting the request time
anyway? Why not allow the request to go on for a minute or so?

Amir


--~--~-~--~~~---~--~~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---