[google-appengine] Re: Why my website is speeder using www. than without ?!?

2008-10-13 Thread manatlan

thanks a lot barry, it's a lot clearer ...
Gret, I'm not mad, this trouble is recent, since naked domain aren't
supported.
Thanks a lot ...

On Oct 14, 12:10 am, "Barry Hunter" <[EMAIL PROTECTED]>
wrote:
> Google have decided they can no longer support 'naked' domains, ie
> without a www - mainly becuase naked domains cant work well with cname
> records. And the technology they used to work around that limitation
> itself has issues.
>
> http://code.google.com/appengine/kb/commontasks.html#naked_domain
>
> ... so work at 'hosting' the naked domain elsewhere, and have it
> simply redirect to the www record.
>
>
>
> On Mon, Oct 13, 2008 at 9:34 PM, manatlan <[EMAIL PROTECTED]> wrote:
>
> > I don't understand well (and it's like that since the beginning, and
> > that trouble was not here)
> > how can i correct this ?
>
> > On 13 oct, 20:58, yejun <[EMAIL PROTECTED]> wrote:
> >> That's because manatlan.com is mapped only 2 static ips,www.manatlan.com
> >> is mapped to entire ghs google servers.
>
> >> On Oct 13, 2:44 pm, manatlan <[EMAIL PROTECTED]> wrote:
>
> >> > Since some times, my website seems really down ...
> >> > when i usehttp://manatlan.com... it can make 5 minutes to response.
> >> > and when i usehttp://www.manatlan.com:it'sin a fraction of seconds
> >> > (good way).
>
> >> > This trouble is since one or two months. I can't find the trouble.
> >> > I've got a gae id, which is hosted in a "google app domain" with 2
> >> > urls :http://manatlan.comandwww.manatlan.com(dnshostedby google)
>
> >> > In the past, all was good ! But since some times : it's really hard !
> >> > Sometimes manatlan.com is really speed, sometimes not. WHere is the
> >> > trouble ? dns ?
>
> --
> 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] Unexpected timeouts

2008-10-13 Thread Roy Leban

This might be bug 764 (http://code.google.com/p/googleappengine/issues/
detail?id=764) but I'm not sure.

Sometimes, I get timeouts that don't make sense. For example,
refreshing my home page (sometimes, when it happens to include a
single database write).

0-13 05:58PM 18.196 / 500 4180ms 10883mcycles 5kb

  File "myfile.py" ...
some_entity.put()
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 618, in put
return datastore.Put(self._entity)
  File "/base/python_lib/versions/1/google/appengine/api/
datastore.py", line 162, in Put
raise _ToDatastoreError(err)
  File "/base/python_lib/versions/1/google/appengine/api/
datastore.py", line 1627, in _ToDatastoreError
raise errors[err.application_error](err.error_detail)
Timeout

It's looking like the 10883 megacycles is 20-50x a typical load of my
home page. Anybody have 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] Getting 'UnicodeDecodeError'. Please help

2008-10-13 Thread Nishu

Hello,

I am trying to develop a screen scraping application using the google
Webapp framework. The application parses the html output of some other
page to extract the required data and then forms a string out of these
data. Sometimes the application works well but at times the
application raises the following error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0x95 in
position 100: ordinal not in range(128)

After googling around for some time I tried the following:

sys.setdefaultencoding("UTF-8")

As a result the default encoding was set to 'UTF-8' but even this did
not solve the problem and now the application raised the following
error:

   UnicodeDecodeError: 'utf8' codec can't decode byte..

So please help me solve this problem. Thanking you in advance.

Nishant

--~--~-~--~~~---~--~~
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: Downloading my application

2008-10-13 Thread Arun Shanker Prasad

Definitely and an IMPORTANT one
None of us want to loose our code..

On Oct 13, 11:51 pm, Davide Rognoni <[EMAIL PROTECTED]> wrote:
> Yes, so "Downloading my application" will be a new feature.
>
> On Oct 13, 1:55 pm, Arun Shanker Prasad <[EMAIL PROTECTED]>
> wrote:
>
> > i think the static files are themselves kept in the datastore.. and
> > served. I dont think app.yaml and index.yaml are uploaded with your
> > app in the traditional sense, they are used to identify ur app and
> > create index defs during the appcfg.py call..
>
> > On Oct 13, 10:33 am, Gmail <[EMAIL PROTECTED]> wrote:
>
> > > wget -rhttp://pyoohtml.appspot.com/onlyfirefox/
> > > i have tried.but is that all your work of a full month?
> > > 在 2008-10-12,下午11:14, Davide Rognoni 写道:
>
> > > > Trying...
>
> > > > OK)http://pyoohtml.appspot.com/static/logo.gif
>
> > > > KO)http://pyoohtml.appspot.com/static/
>
> > > > Error: Not Found
> > > > The requested URL /static/ was not found on this server.
>
> > > > On Oct 12, 4:49 pm, Gmail <[EMAIL PROTECTED]> wrote:
> > > >> try this.
> > > >> wget -r -np -nd http://***.appspot.com/***/static/
>
> > > >> 在 2008-10-12,下午10:40, Davide Rognoni 写道:
>
> > > >>> Ok, but where are my YAML files?
>
> > > >>> [app.yaml, index.yaml]
>
> > > >>> and wget -p (parent) is not my static files list :-(
> > > >>> The title is "Downloading my application".
>
> > > >>> On Oct 12, 4:26 pm, Gmail <[EMAIL PROTECTED]> wrote:
> > >  they are hosted on diffrent server of google.
>
> > >  try to use the wget 's "-p" or something else that i don't remember
> > >  clearly now,
> > >  to follow the page that inclued your static files.
> > >  if you are using safari,just open the activety window to see what
> > >  static files are inclued.
> > >  在 2008-10-12,下午10:14, Davide Rognoni 写道:
>
> > > > Yes, but I can not see the static files list.
>
> > > > Using os.listdir(".")
> > > > ['pyoohtml.py', 'app.py', 'admin', 'onlyfirefox', 'IronBrowser',
> > > > 'bestempeng', 'home', 'javascriptrun', 'rsa']
>
> > > > but where is my "static" folder?
>
> > > > On Oct 12, 4:10 pm, Gmail <[EMAIL PROTECTED]> wrote:
> > > >> They are static,so you can download them just type the URL in the
> > > >> Browser,
> > > >> if they are lots of files ,
> > > >> you can write a small script to download them,
> > > >> wget ,curl ,will works well.
> > > >> 在 2008-10-12,下午7:59, Davide Rognoni 写道:
>
> > > >>> Where is my directory? {using os.listdir("static")
>
> > > >>> OSError: [Errno 2] No such file or directory: 'static'
>
> > > >>> But I can see the others  {using os.listdir(".")
> > > >>> ['pyoohtml.py', 'app.py', 'admin', 'onlyfirefox', 'IronBrowser',
> > > >>> 'bestempeng', 'home', 'javascriptrun', 'rsa']
>
> > > >>> On Oct 12, 9:53 am, Sylvain <[EMAIL PROTECTED]> wrote:
> > >  Hi,
>
> > >  Currently, it is impossible.
>
> > >  But for my project I use this 
> > >  :http://manatlan.com/blog/zipme___download_sources_of_your_gae_website
> > >  ...
> > >  (but you have to use at the begining)
>
> > >  Then you can get all files (except static)
>
> > >  Regards
>
> > >  On 12 oct, 08:41, Gilbert <[EMAIL PROTECTED]> wrote:
>
> > > > Due to a development computer problem, I would like to  
> > > > download
> > > > FROM
> > > > the appengine to the new computer the content of my  
> > > > application.
>
> > > > How can I do that ?
>
> > > > Thanks for any help
--~--~-~--~~~---~--~~
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] Serving static file via Datastore and ZipHandler

2008-10-13 Thread Angel

Blog post on serving static files in GAE using the data store and zip
files:

http://appmecha.wordpress.com/2008/10/14/serving-static-files/

Fully working code example linked into the post as well. As with all
App Mecha posts, it uses CherryPy + Mako

Enjoy!
-angel
--~--~-~--~~~---~--~~
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: reading a file

2008-10-13 Thread manuelaraoz

thanks!
I have it working now :D
--~--~-~--~~~---~--~~
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: Missing Applications

2008-10-13 Thread Marzia Niccolai
Hi Matt,

This is happening because you are using an account that is both a Google
Apps account and a Google Accounts account.  The system doesn't support this
combination well.

The easiest thing to do is to use a Google Accounts account if you plan on
using Google Accounts authentication (such as an @gmail account).  If you
are planning to use Google Apps authentication, choose an Apps account that
isn't also a Google Account.

Please follow up with me directly if you need help configuring this.

-Marzia

On Mon, Oct 13, 2008 at 4:12 PM, matt jezorek <[EMAIL PROTECTED]> wrote:

>
> Anyone run across missing applications in the appengine administrator?
> I have 1 application in particular where somehow I am not the
> developer on it yet it shows in the drop down for the dashboard I can
> not do anything with it. It disappeared when I tried to make a new
> application and now it says I have 6 available to make but I am only
> showing 1 application. Anyone run across this before?
>
> >
>

--~--~-~--~~~---~--~~
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] Missing Applications

2008-10-13 Thread matt jezorek

Anyone run across missing applications in the appengine administrator?
I have 1 application in particular where somehow I am not the
developer on it yet it shows in the drop down for the dashboard I can
not do anything with it. It disappeared when I tried to make a new
application and now it says I have 6 available to make but I am only
showing 1 application. Anyone run across this before?

--~--~-~--~~~---~--~~
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: Uploading app behind proxy

2008-10-13 Thread Rob

DId you try seting the proxy environment variable before starting
appcfg.py

set http_proxy=http://www-proxy.us..com:80


On Oct 12, 10:49 am, uo <[EMAIL PROTECTED]> wrote:
> And i cant make use ofhttp://code.activestate.com/recipes/456195/
>  because it uses sockets
--~--~-~--~~~---~--~~
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] Random HTTP 500 37315 - - errors

2008-10-13 Thread phtq

I have a PC program which sends HTTP requests to the GoogleAppEngine
in order to load the database for our project. The application works
fine using the PC based dev environment but when applied to the online
environment occasionally a request fails with error code 500 as shown
by the online log. The failure appears to happen without generating an
exception in the python code as the debug output inside the exception
handler never appears.

How do I debug this?

PS. The first few time this db upload was done online it also worked
fine. The problems just started appearing today.

--~--~-~--~~~---~--~~
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: Why my website is speeder using www. than without ?!?

2008-10-13 Thread Barry Hunter

Google have decided they can no longer support 'naked' domains, ie
without a www - mainly becuase naked domains cant work well with cname
records. And the technology they used to work around that limitation
itself has issues.

http://code.google.com/appengine/kb/commontasks.html#naked_domain


... so work at 'hosting' the naked domain elsewhere, and have it
simply redirect to the www record.


On Mon, Oct 13, 2008 at 9:34 PM, manatlan <[EMAIL PROTECTED]> wrote:
>
> I don't understand well (and it's like that since the beginning, and
> that trouble was not here)
> how can i correct this ?
>
> On 13 oct, 20:58, yejun <[EMAIL PROTECTED]> wrote:
>> That's because manatlan.com is mapped only 2 static ips,www.manatlan.com
>> is mapped to entire ghs google servers.
>>
>> On Oct 13, 2:44 pm, manatlan <[EMAIL PROTECTED]> wrote:
>>
>> > Since some times, my website seems really down ...
>> > when i usehttp://manatlan.com... it can make 5 minutes to response.
>> > and when i usehttp://www.manatlan.com:it's in a fraction of seconds
>> > (good way).
>>
>> > This trouble is since one or two months. I can't find the trouble.
>> > I've got a gae id, which is hosted in a "google app domain" with 2
>> > urls :http://manatlan.comandwww.manatlan.com(dnshosted by google)
>>
>> > In the past, all was good ! But since some times : it's really hard !
>> > Sometimes manatlan.com is really speed, sometimes not. WHere is the
>> > trouble ? dns ?
> >
>



-- 
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] Faster choices code

2008-10-13 Thread Andy Freeman

google/appengine/db/__init__.py starting at line 401 is:
  if self.choices:
match = False
for choice in self.choices:
  if choice == value:
match = True
if not match:
  raise BadValueError('Property %s is %r; must be one of %r' %
(self.name, value,
self.choices))

It could be:
  if value not in (self.choices or (value,)):
raise BadValueError('Property %s is %r; must be one of %r' %
  (self.name, value,
self.choices))

"not in" will stop when it finds a match and may be faster for each
element checked.

Note that making self.choices a set would make the "not in" test O(1).





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-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: Data Viewer Errors

2008-10-13 Thread _phred



On Oct 13, 7:42 am, gg <[EMAIL PROTECTED]> wrote:
> Anyone else seeing:
>
> Server Error
>
> A server error has occured.
>
> Return to Applications screen »
>
> When trying to paginate through your data in Data Viewer

Haven't seen it while paging through, but I've definitely had that
error when editing an entity -- both on the production server and the
local development server.  I've observed a weak correlation between
seeing the error message and having data in the Datastore that
violates model constraints (e.g., I altered the model and made a field
required that previously wasn't, but I have old data in the datastore
that have that field set to null).  In development, I've only been
able to solve it by blowing away my datastore, and in production it
seems to have resolved itself.

best,
- Fred.
--~--~-~--~~~---~--~~
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: Why my website is speeder using www. than without ?!?

2008-10-13 Thread manatlan

I don't understand well (and it's like that since the beginning, and
that trouble was not here)
how can i correct this ?

On 13 oct, 20:58, yejun <[EMAIL PROTECTED]> wrote:
> That's because manatlan.com is mapped only 2 static ips,www.manatlan.com
> is mapped to entire ghs google servers.
>
> On Oct 13, 2:44 pm, manatlan <[EMAIL PROTECTED]> wrote:
>
> > Since some times, my website seems really down ...
> > when i usehttp://manatlan.com... it can make 5 minutes to response.
> > and when i usehttp://www.manatlan.com:it's in a fraction of seconds
> > (good way).
>
> > This trouble is since one or two months. I can't find the trouble.
> > I've got a gae id, which is hosted in a "google app domain" with 2
> > urls :http://manatlan.comandwww.manatlan.com(dnshosted by google)
>
> > In the past, all was good ! But since some times : it's really hard !
> > Sometimes manatlan.com is really speed, sometimes not. WHere is the
> > trouble ? dns ?
--~--~-~--~~~---~--~~
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: Why python?

2008-10-13 Thread gmalquestion



On Oct 13, 9:01 pm, Davide Rognoni <[EMAIL PROTECTED]> wrote:
> "python, java, c#, c++, c" 
> trendshttp://www.google.com/trends?q=python%2C+java%2C+c%23%2C+c%2B%2B%2C+c...
>

Taking a look at the right side shows the letter "c" occurs in lots of
places unrelated to programming. It's probably true for c# and even c+
+, because search engines usually don't take punctuation into account.

Considering that python and java too have additional meanings I'd say
this trend graph is pretty much useless for comparing interest for
these languages.

--~--~-~--~~~---~--~~
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] ModelChoiceField

2008-10-13 Thread [EMAIL PROTECTED]

So below I have a snippet of my model form code. I was wondering does
anyone know the correct format for the choices attribute of the
ModelChoiceField class.


channel =
djangoforms.ModelChoiceField(Channel,query=Channel.all().filter('publish_status
= ',True).filter('user =
',users.get_current_user()),choices=(Channel.title,Channel.title),widget=djangoforms.forms.SelectMultiple)

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] Members: 4994

2008-10-13 Thread Davide Rognoni

- 5
- 4
- 3
- 2
- 1
5000 :-)

--~--~-~--~~~---~--~~
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: datastore .order question

2008-10-13 Thread David Wilson (entertainment cloud)


good news all round :) thanks for clearing that up everyone.


On Oct 13, 7:05 pm, yejun <[EMAIL PROTECTED]> wrote:
> It will only pull unnecessary data when you use offset parameter in
> fetch(limit,offset=0). Because when you set an offset, the datastore
> still need to iterate all previous data before that offset.
>
> On Oct 13, 1:25 pm, "David Wilson (entertainment cloud)"
>
> <[EMAIL PROTECTED]> wrote:
> > when you say the same is not true of filter, are you saying that
>
> > Thing.all().filter('value >'  5).get()
>
> > will pull Things 1,2,3,4,5(like the offset issue) the records from the
> > datastore, but just return Things 6 from the query.
>
> > this seems wrong to me.
>
> > The reason im making sure on this is that my Thing has a large Blob in
> > it that i really need to make sure is not getting pulled apart from
> > the ones im displaying at the time. Otherwise i will split up the
> > model and put an id in the Thing to a new model ThingBlob.
>
> > On Oct 13, 5:34 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > The same is not true of filter().  Filter will start at the first value
> > > larger than x, and should be used if you want to paginate your records.
>
> > > Brett Slatkin's IO talk covers scalable pagination recipes, and I suggest
> > > checking it 
> > > out:http://sites.google.com/site/io/building-scalable-web-applications-wi...
>
> > > -Marzia
>
> > > On Mon, Oct 13, 2008 at 6:24 AM, David Wilson (entertainment cloud) <
>
> > > [EMAIL PROTECTED]> wrote:
>
> > > > ok, i wanted to be sure about this, as pulling all the records and
> > > > just returning one would have been a performance disaster for my app.
>
> > > > my question was raised because i was a little surprised to read that
> > > > offset queries still pull all the 'upto' offset out of the store.
>
> > > > does the same apply to Thing.all().filter('value >'  x).get()  ?
>
> > > > and thus is it possible to page without pulling all the previous pages
> > > > data from the store each time?
>
> > > > On Oct 13, 1:01 pm, Sylvain <[EMAIL PROTECTED]> wrote:
> > > > > Only '1'
>
> > > > >http://code.google.com/appengine/docs/datastore/queryclass.html#Query...
>
> > > > > On 13 oct, 13:41, "David Wilson (entertainment cloud)"
>
> > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > Hi,
>
> > > > > > class Thing(db.Model):
>
> > > > > >     value = db.IntegerProperty(required=True)
>
> > > > > > datastore has 10 Things with value 1..10
>
> > > > > > Question:
>
> > > > > > How many records does the query Thing.all().order('-value').get() 
> > > > > > pull
> > > > > > from the datastore?
--~--~-~--~~~---~--~~
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: Implement AJAX in App Engine

2008-10-13 Thread Davide Rognoni

"Ajax Requests"
http://docs.jquery.com/Ajax

"setInterval(func, interval, [args])"
Calls the specified "func" (or a JavaScript statement) repeatedly per
the "interval" interval, in milliseconds (ie: 1000=every 1 second).
"func" must be surrounded in quotations, as if it was a string. Use
the optional "args" to pass any number of arguments to the function.
http://www.javascriptkit.com/jsref/window.shtml


On Oct 13, 1:00 pm, "David Symonds" <[EMAIL PROTECTED]> wrote:
> On Sun, Oct 12, 2008 at 7:06 PM, Shay Ben Dov <[EMAIL PROTECTED]> wrote:
>
> > I wonder is there a way to implement AJAX in an application like the
> > easy way it is done in Rails:
>
> > you write 1 line in the header to include  Javascript, defaults and
> > other
>
> > then you issue a simple command in your HTML body like:
>
> App Engine is really a much lower level platform than that. You could
> probably write your own AJAX stuff like you suggest using JavaScript,
> being helped out by a library like jQuery.
>
> 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Why python?

2008-10-13 Thread Davide Rognoni

"python, java, c#, c++, c" trends
http://www.google.com/trends?q=python%2C+java%2C+c%23%2C+c%2B%2B%2C+c&ctab=0&geo=all&date=all&sort=0

On Oct 13, 4:08 pm, luismgz <[EMAIL PROTECTED]> wrote:
> My Kung-Fu is better than yours!
>
> On Oct 10, 3:50 am, Leo(雷傲) <[EMAIL PROTECTED]> wrote:
>
> > I hate python's strange grammer! It's not neccesary to build a new
> > style of grammer since the c-like grammer is so successful !
>
> > And I think the "OOP" is not so great. The procedure programming
> > language is still powerful and will continue its power!
--~--~-~--~~~---~--~~
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: Why my website is speeder using www. than without ?!?

2008-10-13 Thread yejun

That's because manatlan.com is mapped only 2 static ips, www.manatlan.com
is mapped to entire ghs google servers.


On Oct 13, 2:44 pm, manatlan <[EMAIL PROTECTED]> wrote:
> Since some times, my website seems really down ...
> when i usehttp://manatlan.com... it can make 5 minutes to response.
> and when i usehttp://www.manatlan.com: it's in a fraction of seconds
> (good way).
>
> This trouble is since one or two months. I can't find the trouble.
> I've got a gae id, which is hosted in a "google app domain" with 2
> urls :http://manatlan.comandwww.manatlan.com(dns hosted by google)
>
> In the past, all was good ! But since some times : it's really hard !
> Sometimes manatlan.com is really speed, sometimes not. WHere is the
> trouble ? dns ?
--~--~-~--~~~---~--~~
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: Why my website is speeder using www. than without ?!?

2008-10-13 Thread manatlan

and better :

If i go there : http://www.manatlan.com/test/ (which is a simple
redirect to "/"), browser try to bring me to https://www.manatlan.com/
?!?

really strange

On 13 oct, 20:44, manatlan <[EMAIL PROTECTED]> wrote:
> Since some times, my website seems really down ...
> when i usehttp://manatlan.com... it can make 5 minutes to response.
> and when i usehttp://www.manatlan.com: it's in a fraction of seconds
> (good way).
>
> This trouble is since one or two months. I can't find the trouble.
> I've got a gae id, which is hosted in a "google app domain" with 2
> urls :http://manatlan.comandwww.manatlan.com(dns hosted by google)
>
> In the past, all was good ! But since some times : it's really hard !
> Sometimes manatlan.com is really speed, sometimes not. WHere is the
> trouble ? dns ?
--~--~-~--~~~---~--~~
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: Downloading my application

2008-10-13 Thread Davide Rognoni

Yes, so "Downloading my application" will be a new feature.

On Oct 13, 1:55 pm, Arun Shanker Prasad <[EMAIL PROTECTED]>
wrote:
> i think the static files are themselves kept in the datastore.. and
> served. I dont think app.yaml and index.yaml are uploaded with your
> app in the traditional sense, they are used to identify ur app and
> create index defs during the appcfg.py call..
>
> On Oct 13, 10:33 am, Gmail <[EMAIL PROTECTED]> wrote:
>
> > wget -rhttp://pyoohtml.appspot.com/onlyfirefox/
> > i have tried.but is that all your work of a full month?
> > 在 2008-10-12,下午11:14, Davide Rognoni 写道:
>
> > > Trying...
>
> > > OK)http://pyoohtml.appspot.com/static/logo.gif
>
> > > KO)http://pyoohtml.appspot.com/static/
>
> > > Error: Not Found
> > > The requested URL /static/ was not found on this server.
>
> > > On Oct 12, 4:49 pm, Gmail <[EMAIL PROTECTED]> wrote:
> > >> try this.
> > >> wget -r -np -nd http://***.appspot.com/***/static/
>
> > >> 在 2008-10-12,下午10:40, Davide Rognoni 写道:
>
> > >>> Ok, but where are my YAML files?
>
> > >>> [app.yaml, index.yaml]
>
> > >>> and wget -p (parent) is not my static files list :-(
> > >>> The title is "Downloading my application".
>
> > >>> On Oct 12, 4:26 pm, Gmail <[EMAIL PROTECTED]> wrote:
> >  they are hosted on diffrent server of google.
>
> >  try to use the wget 's "-p" or something else that i don't remember
> >  clearly now,
> >  to follow the page that inclued your static files.
> >  if you are using safari,just open the activety window to see what
> >  static files are inclued.
> >  在 2008-10-12,下午10:14, Davide Rognoni 写道:
>
> > > Yes, but I can not see the static files list.
>
> > > Using os.listdir(".")
> > > ['pyoohtml.py', 'app.py', 'admin', 'onlyfirefox', 'IronBrowser',
> > > 'bestempeng', 'home', 'javascriptrun', 'rsa']
>
> > > but where is my "static" folder?
>
> > > On Oct 12, 4:10 pm, Gmail <[EMAIL PROTECTED]> wrote:
> > >> They are static,so you can download them just type the URL in the
> > >> Browser,
> > >> if they are lots of files ,
> > >> you can write a small script to download them,
> > >> wget ,curl ,will works well.
> > >> 在 2008-10-12,下午7:59, Davide Rognoni 写道:
>
> > >>> Where is my directory? {using os.listdir("static")
>
> > >>> OSError: [Errno 2] No such file or directory: 'static'
>
> > >>> But I can see the others  {using os.listdir(".")
> > >>> ['pyoohtml.py', 'app.py', 'admin', 'onlyfirefox', 'IronBrowser',
> > >>> 'bestempeng', 'home', 'javascriptrun', 'rsa']
>
> > >>> On Oct 12, 9:53 am, Sylvain <[EMAIL PROTECTED]> wrote:
> >  Hi,
>
> >  Currently, it is impossible.
>
> >  But for my project I use this 
> >  :http://manatlan.com/blog/zipme___download_sources_of_your_gae_website
> >  ...
> >  (but you have to use at the begining)
>
> >  Then you can get all files (except static)
>
> >  Regards
>
> >  On 12 oct, 08:41, Gilbert <[EMAIL PROTECTED]> wrote:
>
> > > Due to a development computer problem, I would like to  
> > > download
> > > FROM
> > > the appengine to the new computer the content of my  
> > > application.
>
> > > How can I do that ?
>
> > > Thanks for any help
--~--~-~--~~~---~--~~
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: Why my website is speeder using www. than without ?!?

2008-10-13 Thread manatlan

and more : this url http://manatlan.com/test/ is a simple redirect to
"/" ... and it takes a very very long time ...

dns trouble, no ?, but where ?

On 13 oct, 20:44, manatlan <[EMAIL PROTECTED]> wrote:
> Since some times, my website seems really down ...
> when i usehttp://manatlan.com... it can make 5 minutes to response.
> and when i usehttp://www.manatlan.com: it's in a fraction of seconds
> (good way).
>
> This trouble is since one or two months. I can't find the trouble.
> I've got a gae id, which is hosted in a "google app domain" with 2
> urls :http://manatlan.comandwww.manatlan.com(dns hosted by google)
>
> In the past, all was good ! But since some times : it's really hard !
> Sometimes manatlan.com is really speed, sometimes not. WHere is the
> trouble ? dns ?
--~--~-~--~~~---~--~~
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 my website is speeder using www. than without ?!?

2008-10-13 Thread manatlan

Since some times, my website seems really down ...
when i use http://manatlan.com ... it can make 5 minutes to response.
and when i use http://www.manatlan.com : it's in a fraction of seconds
(good way).

This trouble is since one or two months. I can't find the trouble.
I've got a gae id, which is hosted in a "google app domain" with 2
urls : http://manatlan.com and www.manatlan.com (dns hosted by google)

In the past, all was good ! But since some times : it's really hard !
Sometimes manatlan.com is really speed, sometimes not. WHere is the
trouble ? dns ?
--~--~-~--~~~---~--~~
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: BaseModel IndexError: list index out of range

2008-10-13 Thread yejun

Model can't be in your root directory.

On Oct 13, 1:03 pm, ghostrocket <[EMAIL PROTECTED]> wrote:
> this is the issue:
>
> line  51 of appengine_dango/models.py is:
>
> self.app_label = model_module.__name__.split('.')[-2]
>
> i'm not sure why we need the ".split('.')[-2]" but my model_module is
> not returning a string with a '.' in it. any idea if this is a bug or
> did i misconfigure something?
>
> On Oct 13, 12:00 pm, ghostrocket <[EMAIL PROTECTED]> wrote:
>
> > Hi All -
>
> > This is driving me crazy, any help is greatly appreciated. The
> > following:
>
> > class MyModel(BaseModel):
> >     title      = db.StringProperty(required=True)
>
> > and
>
> > stuff =MyModel(title="mytitle")
>
> > yields "IndexError: list index out of range"
>
> > but extending db.Model instead of BaseModel works just fine. What
> > gives?
--~--~-~--~~~---~--~~
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 Log?!

2008-10-13 Thread Marzia Niccolai
Hi,

With out more information, my first advice would be to check the settings in
your app.yaml.  It seems most possible that the URL you are hitting isn't
properly mapped to a system resource.

If you are still having issues, please post your app.yaml and some
description of the code/static content to which it maps.

-Marzia

On Mon, Oct 13, 2008 at 2:01 AM, sternr <[EMAIL PROTECTED]> wrote:

>
> Hey,
> I've just uploaded my first test web-app.
> And while on my dev environment it works well, I get "Error: Server
> Error" for all my requests.
> When I look at the admin console, in the dashboard it tells me 100% of
> my requests are errored, but when I try to look at the logs - I see no
> error log (actually no logs at all besides "requests only").
>
> I'm probably missing something stupid, but have no idea what it is ;)
>
> Any help?
>
> Thanks ahead!
>
> --sternr
>
> >
>

--~--~-~--~~~---~--~~
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: datastore .order question

2008-10-13 Thread yejun

It will only pull unnecessary data when you use offset parameter in
fetch(limit,offset=0). Because when you set an offset, the datastore
still need to iterate all previous data before that offset.

On Oct 13, 1:25 pm, "David Wilson (entertainment cloud)"
<[EMAIL PROTECTED]> wrote:
> when you say the same is not true of filter, are you saying that
>
> Thing.all().filter('value >'  5).get()
>
> will pull Things 1,2,3,4,5(like the offset issue) the records from the
> datastore, but just return Things 6 from the query.
>
> this seems wrong to me.
>
> The reason im making sure on this is that my Thing has a large Blob in
> it that i really need to make sure is not getting pulled apart from
> the ones im displaying at the time. Otherwise i will split up the
> model and put an id in the Thing to a new model ThingBlob.
>
> On Oct 13, 5:34 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > The same is not true of filter().  Filter will start at the first value
> > larger than x, and should be used if you want to paginate your records.
>
> > Brett Slatkin's IO talk covers scalable pagination recipes, and I suggest
> > checking it 
> > out:http://sites.google.com/site/io/building-scalable-web-applications-wi...
>
> > -Marzia
>
> > On Mon, Oct 13, 2008 at 6:24 AM, David Wilson (entertainment cloud) <
>
> > [EMAIL PROTECTED]> wrote:
>
> > > ok, i wanted to be sure about this, as pulling all the records and
> > > just returning one would have been a performance disaster for my app.
>
> > > my question was raised because i was a little surprised to read that
> > > offset queries still pull all the 'upto' offset out of the store.
>
> > > does the same apply to Thing.all().filter('value >'  x).get()  ?
>
> > > and thus is it possible to page without pulling all the previous pages
> > > data from the store each time?
>
> > > On Oct 13, 1:01 pm, Sylvain <[EMAIL PROTECTED]> wrote:
> > > > Only '1'
>
> > > >http://code.google.com/appengine/docs/datastore/queryclass.html#Query...
>
> > > > On 13 oct, 13:41, "David Wilson (entertainment cloud)"
>
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > Hi,
>
> > > > > class Thing(db.Model):
>
> > > > >     value = db.IntegerProperty(required=True)
>
> > > > > datastore has 10 Things with value 1..10
>
> > > > > Question:
>
> > > > > How many records does the query Thing.all().order('-value').get() pull
> > > > > from the datastore?
--~--~-~--~~~---~--~~
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: Shutdown deployed application?

2008-10-13 Thread Marzia Niccolai
The FAQ 'How can I disable one of my existing applications?' covers this
topic:

http://code.google.com/appengine/kb/general.html#disable

-Marzia

On Sat, Oct 11, 2008 at 7:39 AM, Bryan A. Pendleton <[EMAIL PROTECTED]>wrote:

>
> I don't think you can as a first-order operation. But, you could
> easily upload a version of your app that is "shut down" (possibly with
> nice, simple, static messages to that effect). If you upload it under
> a different version string (change "version:" in app.yaml), then you'd
> be able to "shut down" the app by switching the version in the
> Versions section of the dashboard.
>
> Of course, anyone who can guess your other version string could still
> access the old app, so this isn't as complete as an actual app-logic
> level change.
>
> On Oct 11, 1:00 am, GMan <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Is there a way to "shutdown" the application once it isdeployed?  Is
> > this possible thru the Dashboard?  If so, is it also possible to
> > restart it, or can you simply re-deploy it?
> >
> > Thanks,
> > GMan
> >
>

--~--~-~--~~~---~--~~
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: datastore .order question

2008-10-13 Thread Marzia Niccolai
Sorry if it was unclear.  This would only pull Thing 6.

-Marzia

On Mon, Oct 13, 2008 at 10:25 AM, David Wilson (entertainment cloud) <
[EMAIL PROTECTED]> wrote:

>
>
> when you say the same is not true of filter, are you saying that
>
> Thing.all().filter('value >'  5).get()
>
> will pull Things 1,2,3,4,5(like the offset issue) the records from the
> datastore, but just return Things 6 from the query.
>
> this seems wrong to me.
>
> The reason im making sure on this is that my Thing has a large Blob in
> it that i really need to make sure is not getting pulled apart from
> the ones im displaying at the time. Otherwise i will split up the
> model and put an id in the Thing to a new model ThingBlob.
>
>
>
>
>
> On Oct 13, 5:34 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > The same is not true of filter().  Filter will start at the first value
> > larger than x, and should be used if you want to paginate your records.
> >
> > Brett Slatkin's IO talk covers scalable pagination recipes, and I suggest
> > checking it out:
> http://sites.google.com/site/io/building-scalable-web-applications-wi...
> >
> > -Marzia
> >
> > On Mon, Oct 13, 2008 at 6:24 AM, David Wilson (entertainment cloud) <
> >
> > [EMAIL PROTECTED]> wrote:
> >
> > > ok, i wanted to be sure about this, as pulling all the records and
> > > just returning one would have been a performance disaster for my app.
> >
> > > my question was raised because i was a little surprised to read that
> > > offset queries still pull all the 'upto' offset out of the store.
> >
> > > does the same apply to Thing.all().filter('value >'  x).get()  ?
> >
> > > and thus is it possible to page without pulling all the previous pages
> > > data from the store each time?
> >
> > > On Oct 13, 1:01 pm, Sylvain <[EMAIL PROTECTED]> wrote:
> > > > Only '1'
> >
> > > >
> http://code.google.com/appengine/docs/datastore/queryclass.html#Query...
> >
> > > > On 13 oct, 13:41, "David Wilson (entertainment cloud)"
> >
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > Hi,
> >
> > > > > class Thing(db.Model):
> >
> > > > > value = db.IntegerProperty(required=True)
> >
> > > > > datastore has 10 Things with value 1..10
> >
> > > > > Question:
> >
> > > > > How many records does the query Thing.all().order('-value').get()
> pull
> > > > > from the datastore?
> >
>

--~--~-~--~~~---~--~~
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: datastore .order question

2008-10-13 Thread David Wilson (entertainment cloud)


when you say the same is not true of filter, are you saying that

Thing.all().filter('value >'  5).get()

will pull Things 1,2,3,4,5(like the offset issue) the records from the
datastore, but just return Things 6 from the query.

this seems wrong to me.

The reason im making sure on this is that my Thing has a large Blob in
it that i really need to make sure is not getting pulled apart from
the ones im displaying at the time. Otherwise i will split up the
model and put an id in the Thing to a new model ThingBlob.





On Oct 13, 5:34 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> The same is not true of filter().  Filter will start at the first value
> larger than x, and should be used if you want to paginate your records.
>
> Brett Slatkin's IO talk covers scalable pagination recipes, and I suggest
> checking it 
> out:http://sites.google.com/site/io/building-scalable-web-applications-wi...
>
> -Marzia
>
> On Mon, Oct 13, 2008 at 6:24 AM, David Wilson (entertainment cloud) <
>
> [EMAIL PROTECTED]> wrote:
>
> > ok, i wanted to be sure about this, as pulling all the records and
> > just returning one would have been a performance disaster for my app.
>
> > my question was raised because i was a little surprised to read that
> > offset queries still pull all the 'upto' offset out of the store.
>
> > does the same apply to Thing.all().filter('value >'  x).get()  ?
>
> > and thus is it possible to page without pulling all the previous pages
> > data from the store each time?
>
> > On Oct 13, 1:01 pm, Sylvain <[EMAIL PROTECTED]> wrote:
> > > Only '1'
>
> > >http://code.google.com/appengine/docs/datastore/queryclass.html#Query...
>
> > > On 13 oct, 13:41, "David Wilson (entertainment cloud)"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi,
>
> > > > class Thing(db.Model):
>
> > > >     value = db.IntegerProperty(required=True)
>
> > > > datastore has 10 Things with value 1..10
>
> > > > Question:
>
> > > > How many records does the query Thing.all().order('-value').get() pull
> > > > from the datastore?
--~--~-~--~~~---~--~~
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: 3000 mcycles and This request used a amount of CPU and may soon exceed its quota

2008-10-13 Thread Josh Heitzman

I've been wondering the same thing.  When they start letting us pay
for this, will our apps still have to stay under some arbitrary
average number of CPU cycles?

On Oct 13, 3:21 am, Matija <[EMAIL PROTECTED]> wrote:
> Hi,
> I have some init stage imports to app-engine application and
> combining  with some ajax calls I was able to use maximum of 3000
> mcycles per request. When there is request that consumes more the 1000
> mcycles I have warning 'This request used a amount of CPU and may soon
> exceed its quota.' in my application log.
>
> Should I be worried because of that or not. Is this general warning
> for me to inform me that with this average CPU use i will use all my
> CPU quota eventually soon, or that app-engine quota permits this CPU
> usage only few times let's say per minute and that they will stop my
> application for several hours if I continue with this usage.
--~--~-~--~~~---~--~~
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: Longer timeouts - but not cpu

2008-10-13 Thread Jeff S

Hi Joel,

I don't recall seeing an issue listing like this, so feel free to add
it to the issue tracker: http://code.google.com/p/googleappengine/issues/list

Thank you,

Jeff

On Oct 9, 7:13 am, Joel <[EMAIL PROTECTED]> wrote:
> Similar to the problem of wanting resource intensive requests...
>
> I would find it convenient to be able to mark some of my URLs with a
> general timeout for that url.  Due to using urlfetch in certain ways I
> may be able to determine that my timeout should be closer to 20
> seconds.  But I'm not using more than a normal amount of cpu during
> this process due to the urlfetch calls.
>
> I think this makes sense in those cases where the user of my
> application expects that it may take a little longer for the response
> than typical web pages.
>
> Is this already an issue or does anyone have comments on 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: BaseModel IndexError: list index out of range

2008-10-13 Thread ghostrocket

this is the issue:

line  51 of appengine_dango/models.py is:

self.app_label = model_module.__name__.split('.')[-2]

i'm not sure why we need the ".split('.')[-2]" but my model_module is
not returning a string with a '.' in it. any idea if this is a bug or
did i misconfigure something?

On Oct 13, 12:00 pm, ghostrocket <[EMAIL PROTECTED]> wrote:
> Hi All -
>
> This is driving me crazy, any help is greatly appreciated. The
> following:
>
> class MyModel(BaseModel):
>     title      = db.StringProperty(required=True)
>
> and
>
> stuff =MyModel(title="mytitle")
>
> yields "IndexError: list index out of range"
>
> but extending db.Model instead of BaseModel works just fine. What
> gives?
--~--~-~--~~~---~--~~
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: decision to be an API and not a protocol...

2008-10-13 Thread Peter Recore

App engine to me is a hosting environmnt first, and an API second.
The API alone is no big deal. In fact, it has some annoying
limitations that many other api's don't. (I'm not complaining here)
App engine's killer feature is the fact that it is hosted within
google's infrastructure, with the ability to scale up by adding lots
of instances of your app automagically.

The challenge of implementing other languages, as I understand it, is
figuring out how to sandbox them, and bring up / take down instances
at will.

On Oct 12, 1:51 am, jsnx <[EMAIL PROTECTED]> wrote:
>   I'm curious about the App Engine team's decision to be make
>   App Engine an API and not a protocol. There must be protocols
>   underyling all this stuff -- though they may be pretty rough
>   -- and protocol level access would have facilitated use of
>   Ruby, PHP, Haskell, Bourne Shell and Perl as well as Python.
>
>   It is true that protocol level access would have perhaps
>   undermined that app hosting feature of Google App Engine, or
>   would have complicated it beyond 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Avg CPU: 6206 /!\

2008-10-13 Thread Josh Heitzman

Yeah, my requests seem to be taking about 4-6k megacycles longer to
process today then they were two days ago.  In some cases this is 100%
longer and in others its only about 35%  Interestingly my root page is
still down around 30 megacycles, so it seems that the code needs to do
certain things to be afflicted.

On Oct 12, 5:15 am, Davide Rognoni <[EMAIL PROTECTED]> wrote:
> I see:
>
> URI: /
> Requests: 1
> Avg CPU: 6206 /!\
> % CPU: 100%
>
> See the other 
> post:http://groups.google.com/group/google-appengine/browse_thread/thread/...
--~--~-~--~~~---~--~~
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: datastore .order question

2008-10-13 Thread Marzia Niccolai
Hi,

The same is not true of filter().  Filter will start at the first value
larger than x, and should be used if you want to paginate your records.

Brett Slatkin's IO talk covers scalable pagination recipes, and I suggest
checking it out:
http://sites.google.com/site/io/building-scalable-web-applications-with-google-app-engine

-Marzia

On Mon, Oct 13, 2008 at 6:24 AM, David Wilson (entertainment cloud) <
[EMAIL PROTECTED]> wrote:

>
> ok, i wanted to be sure about this, as pulling all the records and
> just returning one would have been a performance disaster for my app.
>
> my question was raised because i was a little surprised to read that
> offset queries still pull all the 'upto' offset out of the store.
>
> does the same apply to Thing.all().filter('value >'  x).get()  ?
>
> and thus is it possible to page without pulling all the previous pages
> data from the store each time?
>
>
>
> On Oct 13, 1:01 pm, Sylvain <[EMAIL PROTECTED]> wrote:
> > Only '1'
> >
> > http://code.google.com/appengine/docs/datastore/queryclass.html#Query...
> >
> > On 13 oct, 13:41, "David Wilson (entertainment cloud)"
> >
> > <[EMAIL PROTECTED]> wrote:
> > > Hi,
> >
> > > class Thing(db.Model):
> >
> > > value = db.IntegerProperty(required=True)
> >
> > > datastore has 10 Things with value 1..10
> >
> > > Question:
> >
> > > How many records does the query Thing.all().order('-value').get() pull
> > > from the datastore?
> >
>

--~--~-~--~~~---~--~~
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: Is GAE Horribly Broken?

2008-10-13 Thread Marzia Niccolai
Hi,

If you want to reply to me with the app ids with which you are experiencing
this issue, I would be happy to look in to it.

Thanks,
Marzia

On Sun, Oct 12, 2008 at 10:04 AM, gg <[EMAIL PROTECTED]> wrote:

>
> Ok, so from previous threads it is always the poster who is thought to
> be at fault for the problems with GAE. It is always stated that the
> poster must be doing something wrong, writing bad code, or not writing
> a scalable application
>
> So going on the assumption that the Google employee that codes the
> dashboard and the data viewer is not doing something wrong:
>
> Why does the data viewer consistently crash whenever you try to
> paginate through more than 7 pages (140 entities) giving:
>
> Server Error
>
> A server error has occured.
>
> Return to Applications screen »
>
>
> This would seem to suggest that it is the architecture that is
> lacking, and not the programmers using it.
>
> (I have reproduced this on 3 different apps, I am assuming that the
> problem is universal)
> >
>

--~--~-~--~~~---~--~~
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] BaseModel IndexError: list index out of range

2008-10-13 Thread ghostrocket

Hi All -

This is driving me crazy, any help is greatly appreciated. The
following:

class MyModel(BaseModel):
title  = db.StringProperty(required=True)

and

stuff =MyModel(title="mytitle")

yields "IndexError: list index out of range"

but extending db.Model instead of BaseModel works just fine. What
gives?

--~--~-~--~~~---~--~~
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] 3000 mcycles and This request used a amount of CPU and may soon exceed its quota

2008-10-13 Thread Matija

Hi,
I have some init stage imports to app-engine application and
combining  with some ajax calls I was able to use maximum of 3000
mcycles per request. When there is request that consumes more the 1000
mcycles I have warning 'This request used a amount of CPU and may soon
exceed its quota.' in my application log.

Should I be worried because of that or not. Is this general warning
for me to inform me that with this average CPU use i will use all my
CPU quota eventually soon, or that app-engine quota permits this CPU
usage only few times let's say per minute and that they will stop my
application for several hours if I continue with this usage.

--~--~-~--~~~---~--~~
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] Error Log?!

2008-10-13 Thread sternr

Hey,
I've just uploaded my first test web-app.
And while on my dev environment it works well, I get "Error: Server
Error" for all my requests.
When I look at the admin console, in the dashboard it tells me 100% of
my requests are errored, but when I try to look at the logs - I see no
error log (actually no logs at all besides "requests only").

I'm probably missing something stupid, but have no idea what it is ;)

Any help?

Thanks ahead!

--sternr

--~--~-~--~~~---~--~~
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] Cant Upload my app files to the AppEngine

2008-10-13 Thread Blackbird

Hi,

This is a wierd problem that i've been facing... I cant upload my app
to my AppEngine account using the appcfg.py script.
The issue is, when i'm running the command through the DOS command
prompt, its giving a time out exception or a host unreachable
exception.

However, i can access appengine.google.com using my web browser, and i
have no http proxy to go through...

Any ideas guys? Or is there any other way to upload the app on to the
appengine server?

Cheers,

BlackBird

--~--~-~--~~~---~--~~
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 response?

2008-10-13 Thread sternr

I've just uploaded my first application, and no matter what request I
try, I get error 500,
And in the request log (the error log is empty) I get:

MY.IP.ADDRESS - - [13/10/2008:03:14:30 -0700] "GET / HTTP/1.1" 0 0 - -

What is http code 0? why am I getting it?

HELP?!

--sternr

--~--~-~--~~~---~--~~
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] Data Viewer Errors

2008-10-13 Thread gg

Anyone else seeing:

Server Error

A server error has occured.

Return to Applications screen »

When trying to paginate through your data in Data Viewer

This is not a problem with corrupt data (should not matter but I guess
there is a bug that says it does) as I can replicate it on 3 different
applications and it occurs randomly. It also seems to occur 100% of
the time when you reach a certain point in your data. My guess is the
Data Viewer is suffering from the same time outs that are ubiquitous
to our Google App Engine Applications.
--~--~-~--~~~---~--~~
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: Why python?

2008-10-13 Thread luismgz

My Kung-Fu is better than yours!


On Oct 10, 3:50 am, Leo(雷傲) <[EMAIL PROTECTED]> wrote:
> I hate python's strange grammer! It's not neccesary to build a new
> style of grammer since the c-like grammer is so successful !
>
> And I think the "OOP" is not so great. The procedure programming
> language is still powerful and will continue its power!
--~--~-~--~~~---~--~~
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 os

2008-10-13 Thread Ilia Lobsanov

Uninstalling (trashing GoogleAppEngineLauncher from /Applications) and
reinstalling resolved my problem.

Thank you.

ilia.


On Oct 6, 1:13 pm, Josh Heitzman <[EMAIL PROTECTED]> wrote:
> Can't speak for Mac or this specific SDK, but on Windows when I
> upgraded to an earlier SDK release, I couldn't get my app working
> again on the new release until I re-imaged my hard disk to GAE SDK
> free image.  This was after having uninstalled the older SDK before
> installing the new one.
>
> The problem I encountered was alsomoduleloading related.
>
> On Oct 6, 9:51 am, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
>
> > Hi Ilia,
>
> > What python installation have you set in your preferences for the
> > MacLauncher?  Are you using the standard Mac python? Is this a fresh install
> > of the launcher or did you just download the SDK?
>
> > Sorry for the lame advice but have you tried uninstalling and
> > re-installing?  On 10.5.3 I'm able to call 'importos' withnoerrors (using
> > /usr/local/bin/python), so consider me officially flummoxed this morning.
>
> > -Marzia
>
> > On Sat, Oct 4, 2008 at 9:52 AM, Ilia Lobsanov <[EMAIL PROTECTED]> wrote:
>
> > > oh and this is on macosx 10.5.5
>
> > > On Oct 4, 12:43 pm, Ilia Lobsanov <[EMAIL PROTECTED]> wrote:
> > > > As of the 1.1.5 upgrade, I am getting this error when I try to access
> > > > my app using the dev server:
>
> > > > :Nomodulenamedos
> > > >       args = ('Nomodulenamedos',)
> > > >       message = 'Nomodulenamedos'
>
> > > > 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: datastore .order question

2008-10-13 Thread David Wilson (entertainment cloud)

ok, i wanted to be sure about this, as pulling all the records and
just returning one would have been a performance disaster for my app.

my question was raised because i was a little surprised to read that
offset queries still pull all the 'upto' offset out of the store.

does the same apply to Thing.all().filter('value >'  x).get()  ?

and thus is it possible to page without pulling all the previous pages
data from the store each time?



On Oct 13, 1:01 pm, Sylvain <[EMAIL PROTECTED]> wrote:
> Only '1'
>
> http://code.google.com/appengine/docs/datastore/queryclass.html#Query...
>
> On 13 oct, 13:41, "David Wilson (entertainment cloud)"
>
> <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> > class Thing(db.Model):
>
> >     value = db.IntegerProperty(required=True)
>
> > datastore has 10 Things with value 1..10
>
> > Question:
>
> > How many records does the query Thing.all().order('-value').get() pull
> > from the datastore?
--~--~-~--~~~---~--~~
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: Polymorphism: one-to-many relation how to store and retrieve efficiently

2008-10-13 Thread yejun

If shape details are needed in db query, I think you may just save a
pickle dump of the shape object as a blob field.

On Oct 13, 6:45 am, djidjadji <[EMAIL PROTECTED]> wrote:
> And you need multiple queries to get all the Shapes that belong to the Page.
> When we make a new Shape subclass we have to update the retrieval in
> the Page too.
>
> I just read about the entity-index-limit 
> athttp://code.google.com/appengine/docs/datastore/queriesandindexes.html
> When a Page has a lot of shapes (many items in the ListProperty) it could
> happen that the entity is not stored because we hit this limit.
>
> A possible solution is that we give the Shape a Reference to an 
> implementation.
> The implementation attribute points to a Line or Circle object.
> ---
> class ShapeProxy(db.Model):
>  onPage = db.ReferenceProperty(Page,collection_name="shapes",required=True)
>  implementation = db.ReferenceProperty(collection_name="imp",required=True)
>  def draw(self):
>    return self.implementation.draw()
>
> class Shape(db.Model):
>  color  = db.StringProperty(required=True,default='black')
>  def draw(self):
>    return ''
>
> # creation has to change too
> ---
> When retrieving shapes it might be better to collect the keys of the
> implementations first,
> then do a dg.get(shapeKeys) and then draw the Shapes.
> For this method we have 2 objects for every Shape that we use.
>
> Is there another method to prevent this entity-index-limit?
>
> 2008/10/13 djidjadji <[EMAIL PROTECTED]>:
>
> > But this will give you VERY large entity groups and that is not very
> > efficient for updates (transactions)
>
> > 2008/10/13 yejun <[EMAIL PROTECTED]>:
>
> >> Using parent = or ancestor is probably faster because the locality of
> >> datastore.
--~--~-~--~~~---~--~~
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: datastore .order question

2008-10-13 Thread Sylvain

Only '1'

http://code.google.com/appengine/docs/datastore/queryclass.html#Query_get



On 13 oct, 13:41, "David Wilson (entertainment cloud)"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> class Thing(db.Model):
>
> value = db.IntegerProperty(required=True)
>
> datastore has 10 Things with value 1..10
>
> Question:
>
> How many records does the query Thing.all().order('-value').get() pull
> from the datastore?
--~--~-~--~~~---~--~~
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: Downloading my application

2008-10-13 Thread Arun Shanker Prasad

i think the static files are themselves kept in the datastore.. and
served. I dont think app.yaml and index.yaml are uploaded with your
app in the traditional sense, they are used to identify ur app and
create index defs during the appcfg.py call..

On Oct 13, 10:33 am, Gmail <[EMAIL PROTECTED]> wrote:
> wget -rhttp://pyoohtml.appspot.com/onlyfirefox/
> i have tried.but is that all your work of a full month?
> 在 2008-10-12,下午11:14, Davide Rognoni 写道:
>
>
>
> > Trying...
>
> > OK)http://pyoohtml.appspot.com/static/logo.gif
>
> > KO)http://pyoohtml.appspot.com/static/
>
> > Error: Not Found
> > The requested URL /static/ was not found on this server.
>
> > On Oct 12, 4:49 pm, Gmail <[EMAIL PROTECTED]> wrote:
> >> try this.
> >> wget -r -np -nd http://***.appspot.com/***/static/
>
> >> 在 2008-10-12,下午10:40, Davide Rognoni 写道:
>
> >>> Ok, but where are my YAML files?
>
> >>> [app.yaml, index.yaml]
>
> >>> and wget -p (parent) is not my static files list :-(
> >>> The title is "Downloading my application".
>
> >>> On Oct 12, 4:26 pm, Gmail <[EMAIL PROTECTED]> wrote:
>  they are hosted on diffrent server of google.
>
>  try to use the wget 's "-p" or something else that i don't remember
>  clearly now,
>  to follow the page that inclued your static files.
>  if you are using safari,just open the activety window to see what
>  static files are inclued.
>  在 2008-10-12,下午10:14, Davide Rognoni 写道:
>
> > Yes, but I can not see the static files list.
>
> > Using os.listdir(".")
> > ['pyoohtml.py', 'app.py', 'admin', 'onlyfirefox', 'IronBrowser',
> > 'bestempeng', 'home', 'javascriptrun', 'rsa']
>
> > but where is my "static" folder?
>
> > On Oct 12, 4:10 pm, Gmail <[EMAIL PROTECTED]> wrote:
> >> They are static,so you can download them just type the URL in the
> >> Browser,
> >> if they are lots of files ,
> >> you can write a small script to download them,
> >> wget ,curl ,will works well.
> >> 在 2008-10-12,下午7:59, Davide Rognoni 写道:
>
> >>> Where is my directory? {using os.listdir("static")
>
> >>> OSError: [Errno 2] No such file or directory: 'static'
>
> >>> But I can see the others  {using os.listdir(".")
> >>> ['pyoohtml.py', 'app.py', 'admin', 'onlyfirefox', 'IronBrowser',
> >>> 'bestempeng', 'home', 'javascriptrun', 'rsa']
>
> >>> On Oct 12, 9:53 am, Sylvain <[EMAIL PROTECTED]> wrote:
>  Hi,
>
>  Currently, it is impossible.
>
>  But for my project I use this 
>  :http://manatlan.com/blog/zipme___download_sources_of_your_gae_website
>  ...
>  (but you have to use at the begining)
>
>  Then you can get all files (except static)
>
>  Regards
>
>  On 12 oct, 08:41, Gilbert <[EMAIL PROTECTED]> wrote:
>
> > Due to a development computer problem, I would like to  
> > download
> > FROM
> > the appengine to the new computer the content of my  
> > application.
>
> > How can I do that ?
>
> > Thanks for any help
--~--~-~--~~~---~--~~
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] datastore .order question

2008-10-13 Thread David Wilson (entertainment cloud)

Hi,

class Thing(db.Model):

value = db.IntegerProperty(required=True)

datastore has 10 Things with value 1..10

Question:

How many records does the query Thing.all().order('-value').get() pull
from the datastore?
--~--~-~--~~~---~--~~
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: Implement AJAX in App Engine

2008-10-13 Thread David Symonds

On Sun, Oct 12, 2008 at 7:06 PM, Shay Ben Dov <[EMAIL PROTECTED]> wrote:

> I wonder is there a way to implement AJAX in an application like the
> easy way it is done in Rails:
>
> you write 1 line in the header to include  Javascript, defaults and
> other
>
> then you issue a simple command in your HTML body like:

App Engine is really a much lower level platform than that. You could
probably write your own AJAX stuff like you suggest using JavaScript,
being helped out by a library like jQuery.


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



[google-appengine] Re: Polymorphism: one-to-many relation how to store and retrieve efficiently

2008-10-13 Thread djidjadji

And you need multiple queries to get all the Shapes that belong to the Page.
When we make a new Shape subclass we have to update the retrieval in
the Page too.

I just read about the entity-index-limit at
http://code.google.com/appengine/docs/datastore/queriesandindexes.html
When a Page has a lot of shapes (many items in the ListProperty) it could
happen that the entity is not stored because we hit this limit.

A possible solution is that we give the Shape a Reference to an implementation.
The implementation attribute points to a Line or Circle object.
---
class ShapeProxy(db.Model):
 onPage = db.ReferenceProperty(Page,collection_name="shapes",required=True)
 implementation = db.ReferenceProperty(collection_name="imp",required=True)
 def draw(self):
   return self.implementation.draw()

class Shape(db.Model):
 color  = db.StringProperty(required=True,default='black')
 def draw(self):
   return ''

# creation has to change too
---
When retrieving shapes it might be better to collect the keys of the
implementations first,
then do a dg.get(shapeKeys) and then draw the Shapes.
For this method we have 2 objects for every Shape that we use.

Is there another method to prevent this entity-index-limit?

2008/10/13 djidjadji <[EMAIL PROTECTED]>:
> But this will give you VERY large entity groups and that is not very
> efficient for updates (transactions)
>
> 2008/10/13 yejun <[EMAIL PROTECTED]>:
>>
>> Using parent = or ancestor is probably faster because the locality of
>> datastore.
>>
>

--~--~-~--~~~---~--~~
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: appenginepatch 0.8 released!

2008-10-13 Thread Aral Balkan

Thanks, Waldemar, looking forward to upgrading to it :)

For the record, appenginepatch is the bee's knees!

Aral

On Oct 13, 9:54 am, Waldemar Kornewald <[EMAIL PROTECTED]> wrote:
> Hi,
> we've released a new appenginepatch version. This time we have easy to
> use zip packages integration and a new sample project that comes with
> a zip-packaged Django version. We've also fixed a few bugs and added a
> workaround for a bug in App Engine which finally allows to use lazy
> translation objects with ModelForm.

--~--~-~--~~~---~--~~
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: Does the datastore cache?

2008-10-13 Thread Sylvain

Probably this bug (accepted)
http://code.google.com/p/googleappengine/issues/detail?id=732

On 13 oct, 10:41, Josh Heitzman <[EMAIL PROTECTED]> wrote:
> Just tried my app and I'm seeing changes show up immediately as
> expected.  I was having some issue with page caching until I added:
>
> 
>
> to the head element of my pages.  If you can reproduce the problem
> yourself, you can check your logs right after seeing the problem to
> see if the request actually got to the server or if a cached version
> was actually rendered.
>
> On Oct 12, 7:58 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > I'm having the same problem.
>
> > On Sep 19, 10:13 am, Andreas Krohn <[EMAIL PROTECTED]> wrote:
>
> > > Some clarifications from me as well... It doesn't matter how many
> > > times I force reload withoutcache, the new content doesnt show up
> > > (even if I can see it in the datastore). The delay is not just a few
> > > minutes (which I could live with) but several hours (and counting).
>
> > > Any ideas of how to get around this would be greatly appreciated!
--~--~-~--~~~---~--~~
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: Polymorphism: one-to-many relation how to store and retrieve efficiently

2008-10-13 Thread djidjadji

But this will give you VERY large entity groups and that is not very
efficient for updates (transactions)

2008/10/13 yejun <[EMAIL PROTECTED]>:
>
> Using parent = or ancestor is probably faster because the locality of
> datastore.
>

--~--~-~--~~~---~--~~
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] appenginepatch 0.8 released!

2008-10-13 Thread Waldemar Kornewald

Hi,
we've released a new appenginepatch version. This time we have easy to
use zip packages integration and a new sample project that comes with
a zip-packaged Django version. We've also fixed a few bugs and added a
workaround for a bug in App Engine which finally allows to use lazy
translation objects with ModelForm.

You can find all the details on the project page:
http://code.google.com/p/app-engine-patch/

Bye,
Waldemar Kornewald
--~--~-~--~~~---~--~~
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: Polymorphism: one-to-many relation how to store and retrieve efficiently

2008-10-13 Thread yejun

Using parent = or ancestor is probably faster because the locality of
datastore.

On Oct 13, 4:30 am, djidjadji <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm looking for a way to store and retrieve a polymorphic one-to-many 
> relation.
> The test case I used is for a drawing on a page to contain different
> shapes (lines,circles,...).
>
> In my first attempt I used a ReferenceProperty in the Shape class to
> the Page class. (see code section 1)
> The objects (lines,circle) are stored correctly with all the
> attributes, but the Page object can't retrieve
> the shapes it contains probably because the shapes-Query looks something like
> "SELECT * FROM Shape WHERE onPage=:1", page
> and there is no Shape instance, only Line and Circle instances that
> have the correct onPage attribute.
>
> My second attempt is to use a ListProperty(db.Key) in the Page class,
> like suggested for the
> many-many relations. (see code section 2).
> Now the creation of the shapes with a classmethod, extra put for every
> shape created.
> The output I get is correct. The Page draws the shapes it contains.
> ---
> Page: Number1
>         Line (0,0)-(10,5) in red
>         Line (10,5)-(5,-10) in orange
>
> Page: Number2
>         Line (0,0)-(1,5) in black
>         Circle (0,0)r3 in green
> ---
>
> The question I have is, is this the most efficient method to store
> this from a datastore point of view?
> Is there a problem when the ListProperty(db.Key) has a lot of items?
> What number of items is no problem for a ListProperty?
> Will it have a big impact in retrieving a Page instance when it has a
> lot of 'shapes'/db.Key's in the list?
>
> djidjadji
>
> - code section 1 BEGIN
> --- 
> -
> import cgi
> import os
>
> from google.appengine.ext.webapp import template
> from google.appengine.ext import db
> from google.appengine.ext import webapp
> from google.appengine.ext.webapp.util import run_wsgi_app
>
> class Page(db.Model):
>   name = db.StringProperty(required=True)
>   def draw(self):
>     drawing = '\n'.join(['\t'+s.draw() for s in self.shapes.fetch(1000)])
>     return 'Page: %s\n%s\n' % (self.name,drawing)
>
> class Shape(db.Model):
>   onPage = db.ReferenceProperty(Page,collection_name="shapes",required=True)
>   color  = db.StringProperty(required=True,default='black')
>   def draw(self):
>     return ''
>
> class Line(Shape):
>   startX = db.IntegerProperty(default=0)
>   startY = db.IntegerProperty(default=0)
>   endX = db.IntegerProperty(default=0)
>   endY = db.IntegerProperty(default=0)
>   def draw(self):
>     return 'Line (%d,%d)-(%d,%d) in %s' % (
>       self.startX,self.startY,self.endX,self.endY,self.color)
>
> class Circle(Shape):
>   centerX = db.IntegerProperty(default=0)
>   centerY = db.IntegerProperty(default=0)
>   radius  = db.IntegerProperty(default=1)
>   def draw(self):
>     return 'Circle (%d,%d)r%d in %s' % (
>       self.centerX,self.centerY,self.radius,self.color)
>
> class MainPage(webapp.RequestHandler):
>   def get(self):
>     pages = '\n'.join([p.draw() for p in Page.all().fetch(1000)])
>     self.response.headers['Content-Type'] = 'text/plain'
>     self.response.out.write(pages)
>
> class Create(webapp.RequestHandler):
>   def get(self):
>     page = Page(name='Number1')
>     page.put()
>     line = Line(onPage=page,endX=10,endY=5,color='red')
>     line.put()
>     line = Line(onPage=page,startX=10,startY=5,endX=5,endY=-10,color='orange')
>     line.put()
>     page = Page(name='Number2')
>     page.put()
>     line = Line(onPage=page,endX=1,endY=5)
>     line.put()
>     circle = Circle(onPage=page,startX=5,startY=0,radius=3,color='green')
>     circle.put()
>     self.redirect('/')
>
> application = webapp.WSGIApplication(
>       [('/', MainPage),
>        ('/create', Create),
>       ],
>       debug=False)
>
> def main():
>   run_wsgi_app(application)
>
> if __name__ == "__main__":
>   main()
> - code section 1 END
> --- 
> 
>
> - code section 2 BEGIN
>  Changed methods ---
> class Page(db.Model):
>   name = db.StringProperty(required=True)
>   shapes = db.ListProperty(db.Key)
>   def draw(self):
>     drawing = '\n'.join(['\t'+s.draw() for s in db.get(self.shapes)])
>     return 'Page: %s\n%s\n' % (self.name,drawing)
>
> class Shape(db.Model):
>   color  = db.StringProperty(required=True,default='black')
>   @classmethod
>   def create(cls,onPage,**kwds):
>     s = cls(**kwds)
>     s.put()
>     onPage.shapes.append(s.key())  # maybe better to put this in a transaction
>     onPage.put()
>   def draw(self):
>     return ''
>
> class Create(webapp.RequestHandler):
>   def get(self):
>     page = Page(name=

[google-appengine] Re: Does the datastore cache?

2008-10-13 Thread Josh Heitzman

Just tried my app and I'm seeing changes show up immediately as
expected.  I was having some issue with page caching until I added:



to the head element of my pages.  If you can reproduce the problem
yourself, you can check your logs right after seeing the problem to
see if the request actually got to the server or if a cached version
was actually rendered.

On Oct 12, 7:58 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I'm having the same problem.
>
> On Sep 19, 10:13 am, Andreas Krohn <[EMAIL PROTECTED]> wrote:
>
> > Some clarifications from me as well... It doesn't matter how many
> > times I force reload withoutcache, the new content doesnt show up
> > (even if I can see it in the datastore). The delay is not just a few
> > minutes (which I could live with) but several hours (and counting).
>
> > Any ideas of how to get around this would be greatly appreciated!
--~--~-~--~~~---~--~~
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] Polymorphism: one-to-many relation how to store and retrieve efficiently

2008-10-13 Thread djidjadji

Hello,

I'm looking for a way to store and retrieve a polymorphic one-to-many relation.
The test case I used is for a drawing on a page to contain different
shapes (lines,circles,...).

In my first attempt I used a ReferenceProperty in the Shape class to
the Page class. (see code section 1)
The objects (lines,circle) are stored correctly with all the
attributes, but the Page object can't retrieve
the shapes it contains probably because the shapes-Query looks something like
"SELECT * FROM Shape WHERE onPage=:1", page
and there is no Shape instance, only Line and Circle instances that
have the correct onPage attribute.

My second attempt is to use a ListProperty(db.Key) in the Page class,
like suggested for the
many-many relations. (see code section 2).
Now the creation of the shapes with a classmethod, extra put for every
shape created.
The output I get is correct. The Page draws the shapes it contains.
---
Page: Number1
Line (0,0)-(10,5) in red
Line (10,5)-(5,-10) in orange

Page: Number2
Line (0,0)-(1,5) in black
Circle (0,0)r3 in green
---

The question I have is, is this the most efficient method to store
this from a datastore point of view?
Is there a problem when the ListProperty(db.Key) has a lot of items?
What number of items is no problem for a ListProperty?
Will it have a big impact in retrieving a Page instance when it has a
lot of 'shapes'/db.Key's in the list?

djidjadji

- code section 1 BEGIN

import cgi
import os

from google.appengine.ext.webapp import template
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class Page(db.Model):
  name = db.StringProperty(required=True)
  def draw(self):
drawing = '\n'.join(['\t'+s.draw() for s in self.shapes.fetch(1000)])
return 'Page: %s\n%s\n' % (self.name,drawing)

class Shape(db.Model):
  onPage = db.ReferenceProperty(Page,collection_name="shapes",required=True)
  color  = db.StringProperty(required=True,default='black')
  def draw(self):
return ''

class Line(Shape):
  startX = db.IntegerProperty(default=0)
  startY = db.IntegerProperty(default=0)
  endX = db.IntegerProperty(default=0)
  endY = db.IntegerProperty(default=0)
  def draw(self):
return 'Line (%d,%d)-(%d,%d) in %s' % (
  self.startX,self.startY,self.endX,self.endY,self.color)

class Circle(Shape):
  centerX = db.IntegerProperty(default=0)
  centerY = db.IntegerProperty(default=0)
  radius  = db.IntegerProperty(default=1)
  def draw(self):
return 'Circle (%d,%d)r%d in %s' % (
  self.centerX,self.centerY,self.radius,self.color)

class MainPage(webapp.RequestHandler):
  def get(self):
pages = '\n'.join([p.draw() for p in Page.all().fetch(1000)])
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write(pages)

class Create(webapp.RequestHandler):
  def get(self):
page = Page(name='Number1')
page.put()
line = Line(onPage=page,endX=10,endY=5,color='red')
line.put()
line = Line(onPage=page,startX=10,startY=5,endX=5,endY=-10,color='orange')
line.put()
page = Page(name='Number2')
page.put()
line = Line(onPage=page,endX=1,endY=5)
line.put()
circle = Circle(onPage=page,startX=5,startY=0,radius=3,color='green')
circle.put()
self.redirect('/')

application = webapp.WSGIApplication(
  [('/', MainPage),
   ('/create', Create),
  ],
  debug=False)

def main():
  run_wsgi_app(application)

if __name__ == "__main__":
  main()
- code section 1 END
---

- code section 2 BEGIN
 Changed methods ---
class Page(db.Model):
  name = db.StringProperty(required=True)
  shapes = db.ListProperty(db.Key)
  def draw(self):
drawing = '\n'.join(['\t'+s.draw() for s in db.get(self.shapes)])
return 'Page: %s\n%s\n' % (self.name,drawing)

class Shape(db.Model):
  color  = db.StringProperty(required=True,default='black')
  @classmethod
  def create(cls,onPage,**kwds):
s = cls(**kwds)
s.put()
onPage.shapes.append(s.key())  # maybe better to put this in a transaction
onPage.put()
  def draw(self):
return ''

class Create(webapp.RequestHandler):
  def get(self):
page = Page(name='Number1')
page.put()
Line.create(onPage=page,endX=10,endY=5,color='red')
Line.create(onPage=page,startX=10,startY=5,endX=5,endY=-10,color='orange')
page = Page(name='Number2')
page.put()
Line.create(onPage=page,endX=1,endY=5)
Circle.create(onPage=page,startX=5,startY=0,radius=3,color='green')
self.redirect('/')

- code sect

[google-appengine] Re: www [mydomain.org] Already used, please remove previous mapping first.

2008-10-13 Thread ID

hi Marzia, thank you, this resolved my problem.

originally, i have failed to realize that  Google Sites can have more
than 1 mapping, because the dashboard failed to display Sites 'www'
mapping.

all the best..
Efe


On Oct 11, 7:15 am, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> For directions on how to remove the sites 'www' mapping in Google Apps, I've
> put together a quick page (nothing fancy :)
>
> http://groups.google.com/group/google-appengine/web/deleting-existing...
>
> This seems to be the issue most people are having when receiving this
> message.
>
> -Marzia
>
> On Wed, Oct 8, 2008 at 11:03 AM, Brade <[EMAIL PROTECTED]> wrote:
>
> > In firefox I get the Address Not Found page, which would seem to mean
> > that "www" is free to use if I wanted to.
> > but I'm still not allowed to...
> > --brad g.
>
> > On Oct 8, 1:51 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
> > > Hi,
>
> > > Where are you taken when you hit 'www.yourdomain.com'?This is where the
> > > subdomain mapping is currently going, when you know that you can disable
> > > that service mapping to www.
>
> > > -Marzia
>
> > > On Wed, Oct 8, 2008 at 1:27 AM, ID <[EMAIL PROTECTED]> wrote:
>
> > > > Hi, thanks for replying.
>
> > > > I have checked,  'www' is not assigned to Sites, Pages, or anywhere
> > > > else.
>
> > > > this is a fresh domain, purchased thru google/enom.
>
> > > > sites assigned to 'sites' and pages assignd to 'pages' subdomains
> > > > already by default.
>
> > > > 'www' assigned nowhere, yet it shows error 'Duplicate value' when
> > > > trying to assign Pages or Sites.
>
> > > > and shows error 'Already used, please remove previous mapping first'
> > > > when trying to assign to Appengine app.
>
> > > > thanks
>
> > > > On Oct 7, 1:24 am, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
> > > > > Hi,
>
> > > > > The issue here is that, by default, Google Apps has assigned www to
> > > > sites,
> > > > > and you have to disable this before mapping www to an App Engine app.
>
> > > > > Unfortunately, it's not very clear on how to do this in the Google
> > Apps
> > > > > admin panel.
>
> > > > > To get www to work with your app, enable sites, if it isn't already,
> > and
> > > > go
> > > > > to the service settings for sites.  Find and delete the 'www' mapping
> > in
> > > > the
> > > > > service settings.
>
> > > > > After this, you should be able to map your App Engine app
> > > > towww.mydomain.com.
>
> > > > > -MarziaOn Mon, Oct 6, 2008 at 4:20 AM, Sylvain <
> > [EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > > Can you create an issue for this ?
>
> > > > > >http://code.google.com/p/googleappengine/issues/list
>
> > > > > > On 6 oct, 11:09, ID <[EMAIL PROTECTED]> wrote:
> > > > > > > Basically problem seems to be is this:
>
> > > > > > > Google Apps thinks 'www' is assigned to some service, thus
> > locking
> > > > > > > 'www' so it cant be assigned any other service.
>
> > > > > > > But user can not see which service 'www' was assigned to by
> > Google
> > > > > > > apps, therefore user not able  to changed or disabled it.
>
> > > > > > > On Oct 5, 7:33 pm, Tom <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > Please try the following:
>
> > > > > > > > Go to your site's dashboardhttps://
> > > > > >www.google.com/a/cpanel/[yourdomain.org]/Dashboard
> > 
> > > > 
>
> > > > > > > > From there you'll likely see the Web Pages service set
> > > > > > towww.yourdomain.org.
> > > > > > > > Clicking on that will let you rename it (to
> > home.yourdomain.orgfor
> > > > > > > > example).
>
> > > > > > > > Hope that helps!
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---