[google-appengine] hard to fetch a single entry

2009-03-22 Thread neoedmund

why this happens?

a model has 100,000+ entries in it.
q=Foo.all()
e=q.get()

error occurs:

  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 1346, in get
results = self.fetch(1)
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 1390, in fetch
raw = self._get_query().Get(limit, offset)
  File "/base/python_lib/versions/1/google/appengine/api/datastore.py"
, line 942, in Get
return self._Run(limit, offset)._Next(limit)
  File "/base/python_lib/versions/1/google/appengine/api/datastore.py"
, line 886, in _Run
_ToDatastoreError(err)
  File "/base/python_lib/versions/1/google/appengine/api/datastore.py"
, line 1965, in _ToDatastoreError
raise errors[err.application_error](err.error_detail)
Timeout
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: what about memcache flush_all() performance

2009-03-22 Thread Chris

Thanks for your answer.

On Mar 12, 12:28 am, Brett Slatkin  wrote:
> On Wed, Mar 11, 2009 at 8:39 AM, Chris  wrote:
>
> > If my app has a lot of data in memcache, and calls flush_all() now,
> > what about the performance of this function call? I'm not sure how the
> > memcache backend is implemented.
>
> Like all memcache calls, flush is O(1). Everything is done lazily. So
> there is no overhead.
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Intercepting Model Creation

2009-03-22 Thread Kugutsumen

Same problem here; I starred 844.

In the meantime if I need to check within __init__ if an entity is
already
in the datastore I use this ugly workaround:

bool(self.is_saved() or kwds.has_key('_from_entity') and kwds
['_from_entity'])

--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] FileField is not defined

2009-03-22 Thread codingJoe

I am trying to load an image into my app.  I am getting the error that
FileField is not defined.

I've seen other posts where people have this error, but have not found
a solution.

class Photo(db.Model):
   createdBy = db.UserProperty(required=False)
   title = db.StringProperty(required=True)
   description = db.TextProperty(required=False)
   photo = db.BlobProperty(required=True)

class PhotoForm(djangoforms.ModelForm):
  description = forms.Field(widget=forms.Textarea)
  photo_proxy  = FileField()


I tried to use a django solution from:
   http://docs.djangoproject.com/en/dev/topics/forms/modelforms/?from=olddocs

from django.forms import ModelForm

Here I get the error:  : cannot import
name ModelForm


How do I upload photos?  Can someone post an example?

Thanks!!

T
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: crazy ORDER BY bug...?!

2009-03-22 Thread Ian Lewis

David,

Please see this issue,

http://code.google.com/p/googleappengine/issues/detail?id=901&q=order%20by&colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component

On Mon, Mar 23, 2009 at 10:38 AM, David I. Murray  wrote:
>
> Consider these 2 queries:
>
> Query 1:
> SELECT * FROM Action WHERE study= '2a' and type = 'o' ORDER BY __key__
>
> Query 2:
> SELECT * FROM Action WHERE study= '2a' and type = 'o'
>
> Is there any reason why query 1 would return fewer results than query
> 2? Because when I run them (just via the admin console), this is what
> happens... I am convinced it's an App Engine bug. Here's my action
> model:
>
> class Action(db.Model):
>  participantID = db.StringProperty()
>  study = db.StringProperty()
>  date = db.IntegerProperty()
>  type = db.StringProperty()
>  value = db.TextProperty()
>
> Any help is greatly appreciated!
>
> Thanks,
> Dave
> >
>



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] crazy ORDER BY bug...?!

2009-03-22 Thread David I. Murray

Consider these 2 queries:

Query 1:
SELECT * FROM Action WHERE study= '2a' and type = 'o' ORDER BY __key__

Query 2:
SELECT * FROM Action WHERE study= '2a' and type = 'o'

Is there any reason why query 1 would return fewer results than query
2? Because when I run them (just via the admin console), this is what
happens... I am convinced it's an App Engine bug. Here's my action
model:

class Action(db.Model):
  participantID = db.StringProperty()
  study = db.StringProperty()
  date = db.IntegerProperty()
  type = db.StringProperty()
  value = db.TextProperty()

Any help is greatly appreciated!

Thanks,
Dave
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Blocking bad IPs

2009-03-22 Thread Sargis Dallakyan

Thank you for starring these issues. I've got another spammer today
with IP  address 194.8.75.147. This one is from UK.

Cheers,
Sargis

On Mar 22, 4:07 am, xml2jsonp  wrote:
> I starred the issues 718 and 644.
>
> --
> Web Blue Screen of Deathhttp://pyoohtml.appspot.com/web-blue-screen-of-death
>
> On Mar 22, 4:50 am, Sargis Dallakyan  wrote:
>
>
>
> > I've got a user with 61.175.215.214 IP address (registered in China)
> > tring to hack my app and I was wandering what would be the best way to
> > handle this kind of users? I've searched and found issue 
> > 718:http://code.google.com/p/googleappengine/issues/detail?id=718
>
> > But, for now, I'm thinking of redirecting them either to a login page
> > or to some other URL. What would be the best URL to redirect
> > unauthorized users who are trying  to harm your app?
>
> > Thank you,
> > Sargis- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: "Let Delete My Apps" (3 apps)

2009-03-22 Thread Tim Hoffman

Yes many people care, however it is almost spamming the repeated posts
on this issue.

Google people will have got the message, now it is just becoming
annoying.

T

On Mar 23, 7:39 am, Panos  wrote:
> As of the time of writing there are 306 other people who care about
> this. Please visit the GAE issue database and
> star this issue to let Google know that you care about this issue.
>
> http://code.google.com/p/googleappengine/issues/detail?id=335
>
> --Panos
>
> On Mar 17, 4:49 am, Ronn Ross  wrote:
>
> > I second that motion.
>
> > On Mon, Mar 16, 2009 at 11:16 PM, Adam  wrote:
>
> > > If you must subject us to this every day, for the love of god please
> > > change it to 'let ME delete my apps'.
>
> > > Or better yet, just stop.
>
> > > A
>
> > > On Mar 16, 4:31 pm, xml2jsonp  wrote:
> > > > Thanks to:
> > > > - ikoo-dirtylife
> > > > - gythialy-app
> > > > - pyoohtml
>
> > > >http://pyoohtml.appspot.com/let-delete-my-apps/home
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: "Let Delete My Apps" (3 apps)

2009-03-22 Thread Panos

As of the time of writing there are 306 other people who care about
this. Please visit the GAE issue database and
star this issue to let Google know that you care about this issue.

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

--Panos

On Mar 17, 4:49 am, Ronn Ross  wrote:
> I second that motion.
>
> On Mon, Mar 16, 2009 at 11:16 PM, Adam  wrote:
>
> > If you must subject us to this every day, for the love of god please
> > change it to 'let ME delete my apps'.
>
> > Or better yet, just stop.
>
> > A
>
> > On Mar 16, 4:31 pm, xml2jsonp  wrote:
> > > Thanks to:
> > > - ikoo-dirtylife
> > > - gythialy-app
> > > - pyoohtml
>
> > >http://pyoohtml.appspot.com/let-delete-my-apps/home
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] failure in Django 1.0.2 and Helper r76 only in deployed app about AttributeError for HttpResponse

2009-03-22 Thread Brett C.

I am getting a failure on deployment that I am not getting through the
dev_appserver and for the life of me I can't figure out what the heck
could be causing this.

I had not touched my site prior to 1.1.9 and the released copy (r52)
of the Django helper was obviously not working anymore against
dev_appserver. So I grabbed svn (r76) of the Helper and Django 1.0.2,
fixed my templates, and thought everything was great as everything ran
fine locally.

Then I deployed where I keep getting the following error:

: 'HttpResponse' object has no
attribute '_headers'
Traceback (most recent call last):
  File "/base/data/home/apps/dr-brett/4.332258713963491395/main.py",
line 51, in 
main()
  File "/base/data/home/apps/dr-brett/4.332258713963491395/main.py",
line 48, in main
util.run_wsgi_app(application)
  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
util.py", line 76, in run_wsgi_app
result = application(env, _start_response)
  File "/base/data/home/apps/dr-brett/4.332258713963491395/django.zip/
django/core/handlers/wsgi.py", line 244, in __call__
  File "/base/data/home/apps/dr-brett/4.332258713963491395/django.zip/
django/core/handlers/base.py", line 174, in apply_response_fixes
  File "/base/data/home/apps/dr-brett/4.332258713963491395/django.zip/
django/http/utils.py", line 19, in fix_location_header
  File "/base/data/home/apps/dr-brett/4.332258713963491395/django.zip/
django/http/__init__.py", line 328, in has_header


Has anyone run into this? Any changes happened deployment-side where
run_wsgi_app could be the cause of this? I looked at the Django code I
zipped up and _headers is set in the __init__ for HttpResponse so I
can't think of what the heck could be triggering this error in a
deployed app but not locally.

-Brett
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can't access my application

2009-03-22 Thread Pete Koomen
Sorry:  this appears to be affecting some users accessing applications
served off of custom *Google Apps* domains:

On Sun, Mar 22, 2009 at 11:01 AM, Pete Koomen  wrote:

> Hi all,
>
> This is a known issue and we're looking into it now.  It appears to be
> affecting some users accessing applications served off of custom dasher
> domains:
>
> http://mail.google.com/support/bin/answer.py?hl=en&answer=46346#403
>
> We're working to lessen the impact that these problems can have on App
> Engine applications, and to provide a CAPTCHA mechanism for users who see
> this response.
>
> Pete Koomen, App Engine Team
>
>
> On Sun, Mar 22, 2009 at 8:43 AM, B.J.  wrote:
>
>>
>> Some of my users are reporting the same problem.  Anyone know what is
>> going on?
>>
>> On Mar 22, 2:37 am, WallyDD  wrote:
>> > I can't do much more than try again another day...
>> >
>> > Good ol google;http://code.google.com/status/appengine
>> >
>> > On Mar 22, 3:18 am, baytiger  wrote:
>> >
>> > > Same problem for me, many of my users are complaining they see the
>> > > same. It's been going on for more than 24 hours now.
>> >
>> > > Google can you please fix this? There has been _a lot_ of outages the
>> > > past month, it's not particularly credible for user-experience :(
>> >
>> > > On 22 Mar., 07:56, Brandon Thomson  wrote:
>> >
>> > > > I fixed it temporarily by going to a neighbor's house for internet
>> > > > connection... but it is working on my original connection again now?
>> >
>> > > > I am confused what is the cause...
>> >
>> > > > On Mar 22, 2:13 am, WallyDD  wrote:
>> >
>> > > > > Where do I get my membership badge?
>> >
>> > > > > I have the same webpage :(
>> >
>> > > > > On Mar 22, 2:00 am, William  wrote:
>> >
>> > > > > > I'm also getting this message on my app now.  )-:
>> >
>> > > > > > On Mar 21, 5:14 am, Brandon Thomson  wrote:
>> >
>> > > > > > > When I try to access my application I get the following
>> message:
>> >
>> > > > > > >We'resorry...
>> >
>> > > > > > > ... but your query looks similar to automated requests
>> from a
>> > > > > > > computer virus or spyware application. To protect our users,
>> we can't
>> > > > > > > process your request right now.
>> >
>> > > > > > > We'll restore your access as quickly as possible, so try
>> again
>> > > > > > > soon. In the meantime, if you suspect that your computer or
>> network
>> > > > > > > has been infected, you might want to run a virus checker or
>> spyware
>> > > > > > > remover to make sure that your systems are free of viruses and
>> other
>> > > > > > > spurious software.
>> >
>> > > > > > > If you're continually receiving this error, you may be
>> able to
>> > > > > > > resolve the problem by deleting your Google cookie and
>> revisiting
>> > > > > > > Google. For browser-specific instructions, please consult your
>> > > > > > > browser's online support center.
>> >
>> > > > > > > If your entire network is affected, more information is
>> available
>> > > > > > > in the Google Web Search Help Center.
>> >
>> > > > > > > We apologize for the inconvenience, and hope we'll see you
>> again
>> > > > > > > on Google.
>> >
>> > > > > > > 
>> >
>> > > > > > > What is the cause and how can this be fixed?
>> >>
>>
>
>
> --
> Pete
>



-- 
Pete

--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can't access my application

2009-03-22 Thread Pete Koomen
Hi all,

This is a known issue and we're looking into it now.  It appears to be
affecting some users accessing applications served off of custom dasher
domains:

http://mail.google.com/support/bin/answer.py?hl=en&answer=46346#403

We're working to lessen the impact that these problems can have on App
Engine applications, and to provide a CAPTCHA mechanism for users who see
this response.

Pete Koomen, App Engine Team

On Sun, Mar 22, 2009 at 8:43 AM, B.J.  wrote:

>
> Some of my users are reporting the same problem.  Anyone know what is
> going on?
>
> On Mar 22, 2:37 am, WallyDD  wrote:
> > I can't do much more than try again another day...
> >
> > Good ol google;http://code.google.com/status/appengine
> >
> > On Mar 22, 3:18 am, baytiger  wrote:
> >
> > > Same problem for me, many of my users are complaining they see the
> > > same. It's been going on for more than 24 hours now.
> >
> > > Google can you please fix this? There has been _a lot_ of outages the
> > > past month, it's not particularly credible for user-experience :(
> >
> > > On 22 Mar., 07:56, Brandon Thomson  wrote:
> >
> > > > I fixed it temporarily by going to a neighbor's house for internet
> > > > connection... but it is working on my original connection again now?
> >
> > > > I am confused what is the cause...
> >
> > > > On Mar 22, 2:13 am, WallyDD  wrote:
> >
> > > > > Where do I get my membership badge?
> >
> > > > > I have the same webpage :(
> >
> > > > > On Mar 22, 2:00 am, William  wrote:
> >
> > > > > > I'm also getting this message on my app now.  )-:
> >
> > > > > > On Mar 21, 5:14 am, Brandon Thomson  wrote:
> >
> > > > > > > When I try to access my application I get the following
> message:
> >
> > > > > > >We'resorry...
> >
> > > > > > > ... but your query looks similar to automated requests from
> a
> > > > > > > computer virus or spyware application. To protect our users, we
> can't
> > > > > > > process your request right now.
> >
> > > > > > > We'll restore your access as quickly as possible, so try
> again
> > > > > > > soon. In the meantime, if you suspect that your computer or
> network
> > > > > > > has been infected, you might want to run a virus checker or
> spyware
> > > > > > > remover to make sure that your systems are free of viruses and
> other
> > > > > > > spurious software.
> >
> > > > > > > If you're continually receiving this error, you may be able
> to
> > > > > > > resolve the problem by deleting your Google cookie and
> revisiting
> > > > > > > Google. For browser-specific instructions, please consult your
> > > > > > > browser's online support center.
> >
> > > > > > > If your entire network is affected, more information is
> available
> > > > > > > in the Google Web Search Help Center.
> >
> > > > > > > We apologize for the inconvenience, and hope we'll see you
> again
> > > > > > > on Google.
> >
> > > > > > > 
> >
> > > > > > > What is the cause and how can this be fixed?
> >
>


-- 
Pete

--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can't access my application

2009-03-22 Thread B.J.

Some of my users are reporting the same problem.  Anyone know what is
going on?

On Mar 22, 2:37 am, WallyDD  wrote:
> I can't do much more than try again another day...
>
> Good ol google;http://code.google.com/status/appengine
>
> On Mar 22, 3:18 am, baytiger  wrote:
>
> > Same problem for me, many of my users are complaining they see the
> > same. It's been going on for more than 24 hours now.
>
> > Google can you please fix this? There has been _a lot_ of outages the
> > past month, it's not particularly credible for user-experience :(
>
> > On 22 Mar., 07:56, Brandon Thomson  wrote:
>
> > > I fixed it temporarily by going to a neighbor's house for internet
> > > connection... but it is working on my original connection again now?
>
> > > I am confused what is the cause...
>
> > > On Mar 22, 2:13 am, WallyDD  wrote:
>
> > > > Where do I get my membership badge?
>
> > > > I have the same webpage :(
>
> > > > On Mar 22, 2:00 am, William  wrote:
>
> > > > > I'm also getting this message on my app now.  )-:
>
> > > > > On Mar 21, 5:14 am, Brandon Thomson  wrote:
>
> > > > > > When I try to access my application I get the following message:
>
> > > > > >    We'resorry...
>
> > > > > >     ... but your query looks similar to automated requests from a
> > > > > > computer virus or spyware application. To protect our users, we 
> > > > > > can't
> > > > > > process your request right now.
>
> > > > > >     We'll restore your access as quickly as possible, so try again
> > > > > > soon. In the meantime, if you suspect that your computer or network
> > > > > > has been infected, you might want to run a virus checker or spyware
> > > > > > remover to make sure that your systems are free of viruses and other
> > > > > > spurious software.
>
> > > > > >     If you're continually receiving this error, you may be able to
> > > > > > resolve the problem by deleting your Google cookie and revisiting
> > > > > > Google. For browser-specific instructions, please consult your
> > > > > > browser's online support center.
>
> > > > > >     If your entire network is affected, more information is 
> > > > > > available
> > > > > > in the Google Web Search Help Center.
>
> > > > > >     We apologize for the inconvenience, and hope we'll see you again
> > > > > > on Google.
>
> > > > > > 
>
> > > > > > What is the cause and how can this be fixed?
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] I found this Firefox add-on --> "FirePython"

2009-03-22 Thread xml2jsonp

The author: "Originally, I have created it to light up my lonely
nights I was spending with Google App Engine"

From:
http://github.com/darwin/firepython/tree/master
https://addons.mozilla.org/en-US/firefox/addon/9602

--
Web Blue Screen of Death
http://pyoohtml.appspot.com/web-blue-screen-of-death

--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Querying multiple tables in google app engine

2009-03-22 Thread Tim Hoffman

Personally I think you are taking the wrong approach.

Think about you data model as a set of objects/entities and their
relationships and not as relation tables.

Not knowing what you exactly trying to do means the following example
is probably wrong,
ie I don't know if you have a one to one relationship between business
and user
but if you do use references

ie user.business is a referenproperty pointing to a business

You can fetch the object in either direction, business.user_set() will
return all users that refer to the business
and user.business will return the business.

Have a think in those terms, then you don't have to do joins.

You may have to in some case create an intermediate entity that
references multiple entities .

T


On Mar 22, 8:16 pm, arnie  wrote:
> I have certain tables in datastore that are related to each other. say
> user table is related to Business table. How can we use a single query
> to fetch data from these tables at onece, say for a userid=2 we need
> the record from user table as well as from Business table with
> matching userid. I have seen that we cannot use sql like joins here in
> gql.
> So how can we construct a single query to get the desired records
> Thanks
> Arnie
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Querying multiple tables in google app engine

2009-03-22 Thread xml2jsonp

>From docs:
http://code.google.com/appengine/docs/python/datastore/entitiesandmodels.html

The name of the back-reference property defaults to modelname_set
(with the name of the model class in lowercase letters, and "_set"
added to the end), and can be adjusted using the collection_name
argument to the ReferenceProperty constructor.

--
Web Blue Screen of Death
http://pyoohtml.appspot.com/web-blue-screen-of-death

On Mar 22, 12:16 pm, arnie  wrote:
> I have certain tables in datastore that are related to each other. say
> user table is related to Business table. How can we use a single query
> to fetch data from these tables at onece, say for a userid=2 we need
> the record from user table as well as from Business table with
> matching userid. I have seen that we cannot use sql like joins here in
> gql.
> So how can we construct a single query to get the desired records
> Thanks
> Arnie
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: UnknownTimeZoneError

2009-03-22 Thread xml2jsonp

Can you use the "time" module?

Code from:
http://www.experts-exchange.com/Programming/Languages/Scripting/Python/Q_21220085.html

def convert_time( intime, newoffset ):
# import the time module:
import time
# set the format:
fmt = '%Y -%m-%d  %H:%M:%S'
# split the input time into a time string and a time zone:
intimestring, zone = [ x.strip( ) for x in intime.split( 'GMT' ) ]
# parse intimestring and convert to a list:
t = list( time.strptime( intimestring, fmt ) )
# convert the time zone into an integer
z = int( zone )
# convert newoffset into an integer
n = int( newoffset )
# convert the hour of the list to the new hour:
t[ 3 ] += n - z
# return the new time as a string:
return '%s GMT %+d' % ( time.strftime( fmt, time.localtime
( time.mktime( t ) ) ), n )

print convert_time( '2004 -11-25  01:45:12 GMT +8', '-5' )

--
Web Blue Screen of Death
http://pyoohtml.appspot.com/web-blue-screen-of-death

On Mar 22, 12:28 pm, Brian  wrote:
> I'm running App Engine with Django. I'm having troubles executing
> timezone conversion via pytz. I have looked at the Google example
> implementation. The following works in IDLE:
>
> >>> import pytz
> >>> from pytz import common_timezones
> >>> from pytz import timezone
> >>> import datetime
> >>> timestamp = datetime.datetime.utcnow()
> >>> print timestamp
>
> 2009-03-22 11:02:41.578000>>> translated = 
> timestamp.replace(tzinfo=pytz.utc).astimezone(timezone('US/Central'))
> >>> print translated
>
> 2009-03-22 06:02:41.578000-05:00
>
> I have tried to run the following in my app (modules imported, too):
>
> def tz(request):
>     timestamp = datetime.datetime.utcnow()
>     translated = timestamp.replace(tzinfo=pytz.utc).astimezone(timezone
> ('US/Central'))
>     return respond(request, user, 'tz',
> {'translated':translated,'timestamp':timestamp})
>
> When I pull up the page, I get the following error:
> UnknownTimeZoneError at /tz
> 'US/Central'
> Request Method:         GET
> Request URL:    http://localhost:8080/tz
> Exception Type:         UnknownTimeZoneError
> Exception Value:        'US/Central'
>
> Does this not work in App Engine for some reason?
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] UnknownTimeZoneError

2009-03-22 Thread Brian

I'm running App Engine with Django. I'm having troubles executing
timezone conversion via pytz. I have looked at the Google example
implementation. The following works in IDLE:

>>> import pytz
>>> from pytz import common_timezones
>>> from pytz import timezone
>>> import datetime
>>> timestamp = datetime.datetime.utcnow()
>>> print timestamp
2009-03-22 11:02:41.578000
>>> translated = 
>>> timestamp.replace(tzinfo=pytz.utc).astimezone(timezone('US/Central'))
>>> print translated
2009-03-22 06:02:41.578000-05:00

I have tried to run the following in my app (modules imported, too):

def tz(request):
timestamp = datetime.datetime.utcnow()
translated = timestamp.replace(tzinfo=pytz.utc).astimezone(timezone
('US/Central'))
return respond(request, user, 'tz',
{'translated':translated,'timestamp':timestamp})

When I pull up the page, I get the following error:
UnknownTimeZoneError at /tz
'US/Central'
Request Method: GET
Request URL:http://localhost:8080/tz
Exception Type: UnknownTimeZoneError
Exception Value:'US/Central'

Does this not work in App Engine for some reason?
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Querying multiple tables in google app engine

2009-03-22 Thread arnie

I have certain tables in datastore that are related to each other. say
user table is related to Business table. How can we use a single query
to fetch data from these tables at onece, say for a userid=2 we need
the record from user table as well as from Business table with
matching userid. I have seen that we cannot use sql like joins here in
gql.
So how can we construct a single query to get the desired records
Thanks
Arnie
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] LetDeleteMyApps.py (5 people)

2009-03-22 Thread xml2jsonp

"Let Delete My Apps"
http://pyoohtml.appspot.com/let-delete-my-apps/home

Thanks to:
- zerofault1
- yutiyan
- ikoo-dirtylife
- gythialy-app
- pyoohtml

--
Web Blue Screen of Death
http://pyoohtml.appspot.com/web-blue-screen-of-death

--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Blocking bad IPs

2009-03-22 Thread xml2jsonp

I starred the issues 718 and 644.

--
Web Blue Screen of Death
http://pyoohtml.appspot.com/web-blue-screen-of-death

On Mar 22, 4:50 am, Sargis Dallakyan  wrote:
> I've got a user with 61.175.215.214 IP address (registered in China)
> tring to hack my app and I was wandering what would be the best way to
> handle this kind of users? I've searched and found issue 
> 718:http://code.google.com/p/googleappengine/issues/detail?id=718
>
> But, for now, I'm thinking of redirecting them either to a login page
> or to some other URL. What would be the best URL to redirect
> unauthorized users who are trying  to harm your app?
>
> Thank you,
> Sargis
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to do editing??

2009-03-22 Thread arnie

Will using "value="{{first_name}}"> " inside the input tag cause any
problem when the same page is used for creating new entries instead of
editing as the whole html page is evaluated at the server before
rendering.
Thanks
Arnie
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can't access my application

2009-03-22 Thread WallyDD

I can't do much more than try again another day...

Good ol google;
http://code.google.com/status/appengine



On Mar 22, 3:18 am, baytiger  wrote:
> Same problem for me, many of my users are complaining they see the
> same. It's been going on for more than 24 hours now.
>
> Google can you please fix this? There has been _a lot_ of outages the
> past month, it's not particularly credible for user-experience :(
>
> On 22 Mar., 07:56, Brandon Thomson  wrote:
>
>
>
> > I fixed it temporarily by going to a neighbor's house for internet
> > connection... but it is working on my original connection again now?
>
> > I am confused what is the cause...
>
> > On Mar 22, 2:13 am, WallyDD  wrote:
>
> > > Where do I get my membership badge?
>
> > > I have the same webpage :(
>
> > > On Mar 22, 2:00 am, William  wrote:
>
> > > > I'm also getting this message on my app now.  )-:
>
> > > > On Mar 21, 5:14 am, Brandon Thomson  wrote:
>
> > > > > When I try to access my application I get the following message:
>
> > > > >     We're sorry...
>
> > > > >     ... but your query looks similar to automated requests from a
> > > > > computer virus or spyware application. To protect our users, we can't
> > > > > process your request right now.
>
> > > > >     We'll restore your access as quickly as possible, so try again
> > > > > soon. In the meantime, if you suspect that your computer or network
> > > > > has been infected, you might want to run a virus checker or spyware
> > > > > remover to make sure that your systems are free of viruses and other
> > > > > spurious software.
>
> > > > >     If you're continually receiving this error, you may be able to
> > > > > resolve the problem by deleting your Google cookie and revisiting
> > > > > Google. For browser-specific instructions, please consult your
> > > > > browser's online support center.
>
> > > > >     If your entire network is affected, more information is available
> > > > > in the Google Web Search Help Center.
>
> > > > >     We apologize for the inconvenience, and hope we'll see you again
> > > > > on Google.
>
> > > > > 
>
> > > > > What is the cause and how can this be fixed?
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can't access my application

2009-03-22 Thread baytiger

Same problem for me, many of my users are complaining they see the
same. It's been going on for more than 24 hours now.

Google can you please fix this? There has been _a lot_ of outages the
past month, it's not particularly credible for user-experience :(


On 22 Mar., 07:56, Brandon Thomson  wrote:
> I fixed it temporarily by going to a neighbor's house for internet
> connection... but it is working on my original connection again now?
>
> I am confused what is the cause...
>
> On Mar 22, 2:13 am, WallyDD  wrote:
>
>
>
> > Where do I get my membership badge?
>
> > I have the same webpage :(
>
> > On Mar 22, 2:00 am, William  wrote:
>
> > > I'm also getting this message on my app now.  )-:
>
> > > On Mar 21, 5:14 am, Brandon Thomson  wrote:
>
> > > > When I try to access my application I get the following message:
>
> > > >     We're sorry...
>
> > > >     ... but your query looks similar to automated requests from a
> > > > computer virus or spyware application. To protect our users, we can't
> > > > process your request right now.
>
> > > >     We'll restore your access as quickly as possible, so try again
> > > > soon. In the meantime, if you suspect that your computer or network
> > > > has been infected, you might want to run a virus checker or spyware
> > > > remover to make sure that your systems are free of viruses and other
> > > > spurious software.
>
> > > >     If you're continually receiving this error, you may be able to
> > > > resolve the problem by deleting your Google cookie and revisiting
> > > > Google. For browser-specific instructions, please consult your
> > > > browser's online support center.
>
> > > >     If your entire network is affected, more information is available
> > > > in the Google Web Search Help Center.
>
> > > >     We apologize for the inconvenience, and hope we'll see you again
> > > > on Google.
>
> > > > 
>
> > > > What is the cause and how can this be fixed?
--~--~-~--~~~---~--~~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---