[google-appengine] Re: Generating cryptographically strong random numbers

2009-01-19 Thread Alexander Konovalenko

On Mon, Jan 19, 2009, Chris Tan  wrote:
>> For an estimate of the required sample size, see "A Cryptographic
>> Compendium" by J. Savard, section "The Mersenne Twister"
>> , subsection called
>> "Applications to Cryptography". He writes:
>>
>> "Despite the fact that the Mersenne Twister is an extremely good
>> pseudo-random number generator, it is not cryptographically secure by
>> itself for a very simple reason. It is possible to determine all
>> future states of the generator from the state the generator has at any
>> given time, and either 624 32-bit outputs, or 19,937 one-bit outputs
>> are sufficient to provide that state."
>
> It's actually even weaker than that.  A man in the middle attacker
> (e.g. a wifi provider) wouldn't even need to predict the next token;
> sniffing the current token and inserting a script tag into the next
> page the user requests would work perfectly (I'm using the cookie
> method).

Yes, that's just a different threat model. The best random numbers
won't save your session cookies if you have a man in the middle
listening. But that can dealt with using SSL if needed. Similarly,
even if you're https-only and all, a vulnerable RNG can still be
exploited.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Fetch callback

2009-01-19 Thread Alexander Kojevnikov

Are you trying to run this from the SDK? If so, the SDK cannot serve
more than one request at a time.

A workaround is described in the documentation:
http://code.google.com/appengine/docs/python/tools/devserver.html#Using_URL_Fetch

On Jan 19, 12:54 pm, ehmo  wrote:
> Hey guys,
> i'm trying to do something like this
>
> class check(webapp.RequestHandler):
>
>   def get(self):
>
>     url = self.request.get('url')
>     self.response.out.write(url)
>
> class MainHandler(webapp.RequestHandler):
>   def get(self):
>
>       url = "http://google.com";
>       query_args = {'url':url}
>
>       check = urllib.urlencode(query_args)
>       test = urlfetch.fetch('/check'+check)
>
> def main():
>   application = webapp.WSGIApplication([('/', MainHandler),('/check',check)],
>                                        debug=True)
>   wsgiref.handlers.CGIHandler().run(application)
>
> if __name__ == '__main__':
>   main()
>
> but result is always
>
>         raise InvalidURLError(str(e))
> InvalidURLError: ApplicationError: 1
>
> i can't find anything in docu about how to do something like this,
> maybe someone can help me? i'm preparing that check function for
> javascript ajax call, that's the reason why i'm using fetch for this.
>
> thnx
>
> --
>  [who cares?]http://blog.synopsi.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Hello,I´m new with App Engine

2009-01-19 Thread kang
use appcfg.py update e:\gae\helloworld instead

On Sat, Jan 17, 2009 at 11:17 AM, v.beh...@googlemail.com <
v.beh...@googlemail.com> wrote:

>
> Hello,I´m new with App Engine and I can´t upload my developments.
> I always tap: appcfg.py update helloworld/
> but there`s only an error massage:Usage: appcfg.py [options] update
> 
>appcfg.py:
> error: Not a directory: helloworld/
>
> Is anyone able to help me,please?
>
>
> Thank you in advance
>
> >
>


-- 
Stay hungry,Stay foolish.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] how to post arrays via html web page to app engine

2009-01-19 Thread ajaxer

hi, all

I am new to python and appengine.

I am encountering a problem on posting data to the server.

there is a situation that I want to delete or modify many items at one
post to the server,

in php, we can do this by giving a name ended with "[]" to the input
element,
and in server side we can use $_POST[element_name] to get the whole
data

my question is how can I do this with appengine ?

thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: how to post arrays via html web page to app engine

2009-01-19 Thread ajaxer

solved

On Jan 19, 5:29 pm, ajaxer  wrote:
> hi, all
>
> I am new to python and appengine.
>
> I am encountering a problem on posting data to the server.
>
> there is a situation that I want to delete or modify many items at one
> post to the server,
>
> in php, we can do this by giving a name ended with "[]" to the input
> element,
> and in server side we can use $_POST[element_name] to get the whole
> data
>
> my question is how can I do this with appengine ?
>
> thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Having trouble with Django model.objects

2009-01-19 Thread Dave

Hi Alexander, Thanks for the info. Actually I am using app-engine-
patch since I wanted to use Django 1(btw, it's a very cool way to get
to Django 1 vs. doing all the other manual installs). I just read the
links below and think I now understand how to use the rajenda code and
will give it a try. I saw this before but guess I forget/didn't
understand what I was reading.

Thx so much!

On Jan 18, 6:06 pm, Alexander Kojevnikov 
wrote:
> Dave, I suggest that you give app-engine-patch [1] a try. It's the
> same Django we all love, but uses GAE Models for datastore access.
>
> You can use django.contrib.auth with it, in fact the patch has extra
> support for user authentication, check out this [2] page.
>
> If you include
> 'django.contrib.auth.middleware.AuthenticationMiddleware' to your
> MIDDLEWARE_CLASSES, all your templates will have access to the
> request.user variable. [3]
>
> If you decide to stick to the webapp framework, you can define a base
> handler class and add the user variable to the templates from its
> method.
>
> [1]http://code.google.com/p/app-engine-patch/
> [2]http://code.google.com/p/app-engine-patch/wiki/CustomUserModel
> [3]http://docs.djangoproject.com/en/dev/topics/auth/#authentication-in-w...
>
> On Jan 18, 11:42 pm, Dave  wrote:
>
> > Thanks Waldemar, That explains it and I fell back on using 'native'
> > GAE. I'm still learning what to use from Django and when to use
> > 'native' GAE.
>
> > A follow up question I have is how to add a nickname to the user
> > model. I've spent a lot of time searching/thinking/tinkering how to do
> > this and keep ending up with problems. What I really want to
> > accomplish is to have a nickname for a user available in all views/
> > templates. The user case is to enable folks to change their nickname
> > at will without changing their username/login creds(also it will be
> > possible to have multiple users with the same nickname which is fairly
> > important for my user base).
>
> > I have created a UserProfile, with back reference to user model and
> > can successfully use my_user = user.get_profile() and then access the
> > nickname via my_user.nickname. Works ok for use in views.
>
> > However, I want to be able to show the nickname when using queries w/
> > collections in templates as one can use request.user.username in views
> > and user.username in templates(i.e. user.nickname). I've looked at use
> > a custom context processor for this but wondering if that is the best/
> > most scalable/preferred method for doing so.
>
> > Ideally it would work such as:
>
> >     {% for user in users %}
> >           {{user.nickname}} {{user.email}} ***user.email,
> > user.username, etc. already work via django.auth
> >     {% endfor %}
>
> > when using a query such as users = user.connections.filter('user =',
> > myself).
>
> > Any guidance, suggestions, recommendations is 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: index.yaml not being updated

2009-01-19 Thread Dave

Gents, Thanks for the info and helping me get it. I have another app
where index.yaml was being updated so that was making me paranoid. As
you have already guessed, in the other app everything is set to
direction: desc which I've not yet set direction on any queries in
this new app.

I'm learning more everyday!

Thx again,

Dave


On Jan 18, 6:11 pm, Bill  wrote:
> Yes, that was what I was getting at.  Dave, take a look at Ryan's
> article on index 
> building:http://code.google.com/appengine/articles/index_building.html
>
> Your index.yaml won't be updated unless your queries require developer-
> defined or composite indexes.  When you do have more complex queries,
> you can manually insert the required indexes or make sure you execute
> them on your dev server.
>
> On Jan 18, 2:14 pm, djidjadji  wrote:
>
> > These simple queries don't need entries in the index.yaml file.
> > For single attribute queries there are implicit indices constructed.
> > Even is you filter multiple times for equality you don't need an
> > index.yaml entry, and maybe then only when you want a DESC sorting.
>
> > If the production server gives the correct result without raising a
> > NeedIndexError you use some implicit index.
>
> > 2009/1/18 Dave :
>
> > > request.user.invites_in.filter('invited_person =',request.user)
> > > request.user.invites_out.filter('person_inviting =',request.user)
> > > user.connections.filter('user =',request.user)
> > > Dave
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] "Ancestor is" performance

2009-01-19 Thread Tony Arkles

Hi everyone!

In a thread [1], and in the documentation [2], it says that setting
ancestors doesn't affect performance, but I'm not sure that this is
the case.

I set up two queries, one using "WHERE locationKey = :1" (locationKey
is a db.StringProperty), and one using "WHERE ANCESTOR IS :1" (the
ancestor is an entity created based on the locationKey).

The measured "ms-cpu" in the request logs comes out WAY smaller for
the "ANCESTOR IS" query (roughly 3,000ms-cpu vs. 30,000 ms-cpu for
1,000 entities, and roughly this same ratio for smaller queries)

Does anyone have any thoughts on this?  Did I mess something up, or is
there something from the documentation, or is it something else
entirely?

Cheers
Tony



[1]
http://groups.google.com/group/google-appengine/browse_thread/thread/29836be55ad7491d/f4039f9f27f31617?lnk=gst&q=ancestor+is#f4039f9f27f31617

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Having trouble with Django model.objects

2009-01-19 Thread Dave

Alexander & all,

Thanks for directing me to this. I just added it in and works
perfectly! This is just what I needed.

Your the man!

dgd

On Jan 19, 8:13 am, Dave  wrote:
> Hi Alexander, Thanks for the info. Actually I am using app-engine-
> patch since I wanted to use Django 1(btw, it's a very cool way to get
> to Django 1 vs. doing all the other manual installs). I just read the
> links below and think I now understand how to use the rajenda code and
> will give it a try. I saw this before but guess I forget/didn't
> understand what I was reading.
>
> Thx so much!
>
> On Jan 18, 6:06 pm, Alexander Kojevnikov 
> wrote:
>
> > Dave, I suggest that you give app-engine-patch [1] a try. It's the
> > same Django we all love, but uses GAE Models for datastore access.
>
> > You can use django.contrib.auth with it, in fact the patch has extra
> > support for user authentication, check out this [2] page.
>
> > If you include
> > 'django.contrib.auth.middleware.AuthenticationMiddleware' to your
> > MIDDLEWARE_CLASSES, all your templates will have access to the
> > request.user variable. [3]
>
> > If you decide to stick to the webapp framework, you can define a base
> > handler class and add the user variable to the templates from its
> > method.
>
> > [1]http://code.google.com/p/app-engine-patch/
> > [2]http://code.google.com/p/app-engine-patch/wiki/CustomUserModel
> > [3]http://docs.djangoproject.com/en/dev/topics/auth/#authentication-in-w...
>
> > On Jan 18, 11:42 pm, Dave  wrote:
>
> > > Thanks Waldemar, That explains it and I fell back on using 'native'
> > > GAE. I'm still learning what to use from Django and when to use
> > > 'native' GAE.
>
> > > A follow up question I have is how to add a nickname to the user
> > > model. I've spent a lot of time searching/thinking/tinkering how to do
> > > this and keep ending up with problems. What I really want to
> > > accomplish is to have a nickname for a user available in all views/
> > > templates. The user case is to enable folks to change their nickname
> > > at will without changing their username/login creds(also it will be
> > > possible to have multiple users with the same nickname which is fairly
> > > important for my user base).
>
> > > I have created a UserProfile, with back reference to user model and
> > > can successfully use my_user = user.get_profile() and then access the
> > > nickname via my_user.nickname. Works ok for use in views.
>
> > > However, I want to be able to show the nickname when using queries w/
> > > collections in templates as one can use request.user.username in views
> > > and user.username in templates(i.e. user.nickname). I've looked at use
> > > a custom context processor for this but wondering if that is the best/
> > > most scalable/preferred method for doing so.
>
> > > Ideally it would work such as:
>
> > >     {% for user in users %}
> > >           {{user.nickname}} {{user.email}} ***user.email,
> > > user.username, etc. already work via django.auth
> > >     {% endfor %}
>
> > > when using a query such as users = user.connections.filter('user =',
> > > myself).
>
> > > Any guidance, suggestions, recommendations is 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] exploring appengine cron

2009-01-19 Thread Ross M Karchner
I've been looking at the latest checkout (35) of the AppEngine SDK (which
might be the same as 1.1.8), trying to at least figure out how cron *will*
work. Here's what I've found so far.

Interestingly, the SDK's antlr definitions are incompatible with the version
of antlr invluded in the sdk, so I had to rename lib/antlr3 and install
3.1.1 from http://www.antlr.org/download/Python

There's a new yaml file at the root of your application, "cron.yaml". Here's
a simple one that validates:
---
cron:
- url: /cron
  schedule: every 2 hours

---

You can also optionally include a timezone and description. Here's what
groctimespecification.py says about the schedule format:

"A Groc schedule looks like '1st,2nd monday 9:00', or 'every 20 mins'. This
module takes a parsed schedule (produced by Antlr) and creates objects that
can produce times that match this schedule."

If cron.yaml is present but empty or invalid, appcfg.py update fails with
"google.appengine.api.croninfo.MalformedCronfigurationFile", if the schedule
line is invalid, it fails with "Error parsing yaml file:". Otherwise, cron
definitions are uploaded distinctly from all the other files.


ther...@localhost:~/projects/appname$ appcfg.py update .
Scanning files on local disk.
Scanned 500 files.
Initiating update.
Cloning 155 static files.
Cloned 100 files.
Cloning 57 application files.
Closing update.
Uploading index definitions.
*Uploading cron entries.*


So, all the SDK pieces appear to work, but my testing indicates this isn't
running on the production servers yet-- I set up an "every 1 minutes" cron
that logs when it runs, and it hasn't been called yet

They DO show up in the dashboard though, under admin logs:

01/19/09 07:32:28
rosskarch...@gmail.com  Added cron job 'None' schedule=every 2 hours,
url=/cron  01/19/09 07:32:28
rosskarch...@gmail.com  Removed cron job 'None ' schedule=every 1 minutes,
url=/cron

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: "Ancestor is" performance

2009-01-19 Thread Tony Arkles

Oops, missed the second reference:

[2] Section "Tips for using entity groups: " in
http://code.google.com/appengine/docs/python/datastore/keysandentitygroups.html

On Jan 19, 9:10 am, Tony Arkles  wrote:
> Hi everyone!
>
> In a thread [1], and in the documentation [2], it says that setting
> ancestors doesn't affect performance, but I'm not sure that this is
> the case.
>
> I set up two queries, one using "WHERE locationKey = :1" (locationKey
> is a db.StringProperty), and one using "WHERE ANCESTOR IS :1" (the
> ancestor is an entity created based on the locationKey).
>
> The measured "ms-cpu" in the request logs comes out WAY smaller for
> the "ANCESTOR IS" query (roughly 3,000ms-cpu vs. 30,000 ms-cpu for
> 1,000 entities, and roughly this same ratio for smaller queries)
>
> Does anyone have any thoughts on this?  Did I mess something up, or is
> there something from the documentation, or is it something else
> entirely?
>
> Cheers
> Tony
>
> [1]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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Hello,I´m new with App Engine

2009-01-19 Thread dartdog

see this thread I had the same issue:
a. It is a windows command, and due to the long strings you maybe
shouyld consider putting the whole thing in a "bat" file.
http://groups.google.com/group/google-appengine/browse_thread/thread/08e7124bb77efacf/3788ddbec978bb3d#3788ddbec978bb3d

On Jan 17, 1:17 pm, "v.beh...@googlemail.com"
 wrote:
> Hello,I´m new with App Engine and I can´t upload my developments.
> I always tap: appcfg.py update helloworld/
> but there`s only an error massage:Usage: appcfg.py [options] update
> 
>                                                             appcfg.py:
> error: Not a directory: helloworld/
>
> Is anyone able to help me,please?
>
> Thank you in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can't start debug server, i will crazy!

2009-01-19 Thread dartdog

Had similar issue:
Read my experience/solution at http://tombrander.wordpress.com
Suggest you use a "bat" file to get the whole string that you need

On Jan 17, 6:01 am, Maxime  wrote:
> Help!
>
> My PC is : Vista 32bit, Python 2.5, GAE 1.1.5
>
> Error message is below:
>
> Who can help me, thanks :-(
>
> -
>
> C:\google_appengine>dev_appserver.py demos/guestbook
> INFO     2009-01-17 11:53:17,653 appcfg.py] Server:
> appengine.google.com
> WARNING  2009-01-17 11:53:17,667 datastore_file_stub.py] Could not
> read datastor
> e data from c:\users\wyg\appdata\local\temp\dev_appserver.datastore
> WARNING  2009-01-17 11:53:17,667 datastore_file_stub.py] Could not
> read datastor
> e data from c:\users\wyg\appdata\local\temp
> \dev_appserver.datastore.history
> Traceback (most recent call last):
>   File "C:\google_appengine\dev_appserver.py", line 55, in 
>     execfile(script_path, globals())
>   File "C:\google_appengine\google\appengine\tools
> \dev_appserver_main.py", line
> 358, in 
>     sys.exit(main(sys.argv))
>   File "C:\google_appengine\google\appengine\tools
> \dev_appserver_main.py", line
> 337, in main
>     static_caching=static_caching)
>   File "C:\google_appengine\google\appengine\tools\dev_appserver.py",
> line 2837,
>  in CreateServer
>     return BaseHTTPServer.HTTPServer((serve_address, port),
> handler_class)
>   File "C:\Python25\lib\SocketServer.py", line 330, in __init__
>     self.server_bind()
>   File "C:\Python25\lib\BaseHTTPServer.py", line 101, in server_bind
>     SocketServer.TCPServer.server_bind(self)
>   File "C:\Python25\lib\SocketServer.py", line 341, in server_bind
>     self.socket.bind(self.server_address)
>   File "", line 1, in bind
> socket.error: (10049, "Can't assign requested address")
>
> -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Announcement: gaeutilities 1.1.1

2009-01-19 Thread bowman.jos...@gmail.com

http://gaeutilities.appspot.com/

gaeutilities has been upgraded to version 1.1.1, this is a suggested
upgrade for all developers using the libraries. This release includes
some performance optimizations, bugfixes, and the release of new
ROTModel (Retry on Timeout Model). Please note that pages that use
session will not browser cache. If you are using session, please make
sure to not use it on pages where it's not necessary (static pages),
to better optimize your site and cut down on requests.

 1.1.1
 - session and flash: added no_cache_headers() method that is called
whenever either
class is loaded. This should stop any problems with browser
caching.
 - ROTModel - new Model class added that retries put operations when
db.Timeout is encountered.
 - sessions and cache: Retuned the cleanup routines default settings.
It will happen more often, but will delete less instances, lowering
the amount of time required to run the operation in an effort to avoid
deadline exceded errors in applications.
 - session - uses the new ROTModel for both session and session data.
 - session - rewrote the Cookie handling process to work better with
other applications that use the cookies in applications, Google
Analytics for example.
 - cron - Fixed a bug in the form for deleting cron entries.
 - Project - The 1.1 branch is now the suggested branch to use, 1.0 is
being deprecated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Rendring data on django from ulrfetch

2009-01-19 Thread anand

Hi All,

I am trying to display one page (having text and images) to a django
template, however I am getting following errors:

My code:
from google.appengine.api import urlfetch
class Test(webapp.RequestHandler):
  def get(self):
url = "http://docs.google.com/View?
docID=df4xszgg_66635wx5ck&revision=_latest"
result = urlfetch.fetch(url, urlfetch.GET)

page_content = '%s' % '\n'.join(cgi.escape(unicode
(result.content,'utf8')).splitlines())

template_values = {'full_page_content': page_content, }
path = os.path.join(os.path.dirname(__file__),
'test_page_data.html')



My test_page_date.html contains :

 {{ full_page_content }}



I am getting following errors:
  File "C:\Program Files\Google\google_appengine\google\appengine\ext
\webapp\template.py", line 121, in wrap_render
return orig_render(context)
  File "C:\Program Files\Google\google_appengine\lib\django\django
\template\__init__.py", line 168, in render
return self.nodelist.render(context)
  File "C:\Program Files\Google\google_appengine\lib\django\django
\template\__init__.py", line 705, in render
bits.append(self.render_node(node, context))
  File "C:\Program Files\Google\google_appengine\lib\django\django
\template\__init__.py", line 718, in render_node
return(node.render(context))
  File "C:\Program Files\Google\google_appengine\lib\django\django
\template\defaulttags.py", line 124, in render
return nodelist.render(context)
  File "C:\Program Files\Google\google_appengine\lib\django\django
\template\__init__.py", line 708, in render
return ''.join(bits)
OverflowError: join() result is too long for a Python string

I am sure anyone should has done it, please let me know if I am
missing it.

Thanks a lot for your help.

Regards,
Innu Anand







--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] API for quota usage?

2009-01-19 Thread devj

The dashboard is cool but was wondering if you have APIs to build
monitoring and alerting systems on top of it?

Thanks,
Jay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] How expensive are queries

2009-01-19 Thread Roman

I get warnings in my app that some requests used high amount of CPU
(2000ms, roughly 1 times over CPU limit).
Those requests require a few queries, e.g.:
5 of WHERE a=b type, each returning 1 object
1 of WHERE ANCESTOR IS :parent foo ORDER BY bar DESC returning 5
objects
2 of Model.ref_set type returning 1-5 objects
and finally a few of get(key) type.

The db is very small (less 100 objects).

My questions is: is this too much for one request, or am I doing
something terribly wrong?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How expensive are queries

2009-01-19 Thread Roman

I guess it's too expensive. I memcached the first 5 and it made a big
difference.

On Jan 19, 11:49 am, Roman  wrote:
> I get warnings in my app that some requests used high amount of CPU
> (2000ms, roughly 1 times over CPU limit).
> Those requests require a few queries, e.g.:
> 5 of WHERE a=b type, each returning 1 object
> 1 of WHERE ANCESTOR IS :parent foo ORDER BY bar DESC returning 5
> objects
> 2 of Model.ref_set type returning 1-5 objects
> and finally a few of get(key) type.
>
> The db is very small (less 100 objects).
>
> My questions is: is this too much for one request, or am I doing
> something terribly wrong?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] bulkload and expando

2009-01-19 Thread riq

Hi,
I'm using bulkload to upload some data to my server, but I've just
found that the entities that were created are 'Entity' but in fact I
want them to be 'Expando'.

How can create Expandos instead of Entities when I do the bulkload ?

Thanks,

riq.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: bulkload and expando

2009-01-19 Thread riq


Ok... I can create the Expando entity at the HandleEntity callback.

tnx,

riq.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Fetch callback

2009-01-19 Thread Andy Freeman

And, even if you're trying to do it in a deployed version, there's no
guarantee that the second call will be processed by the same
interpreter.  In fact, I think that you're guaranteed that the second
call will be processed by a different interpreter.

On Jan 19, 1:07 am, Alexander Kojevnikov 
wrote:
> Are you trying to run this from the SDK? If so, the SDK cannot serve
> more than one request at a time.
>
> A workaround is described in the 
> documentation:http://code.google.com/appengine/docs/python/tools/devserver.html#Usi...
>
> On Jan 19, 12:54 pm, ehmo  wrote:
>
>
>
> > Hey guys,
> > i'm trying to do something like this
>
> > class check(webapp.RequestHandler):
>
> >   def get(self):
>
> >     url = self.request.get('url')
> >     self.response.out.write(url)
>
> > class MainHandler(webapp.RequestHandler):
> >   def get(self):
>
> >       url = "http://google.com";
> >       query_args = {'url':url}
>
> >       check = urllib.urlencode(query_args)
> >       test = urlfetch.fetch('/check'+check)
>
> > def main():
> >   application = webapp.WSGIApplication([('/', 
> > MainHandler),('/check',check)],
> >                                        debug=True)
> >   wsgiref.handlers.CGIHandler().run(application)
>
> > if __name__ == '__main__':
> >   main()
>
> > but result is always
>
> >         raise InvalidURLError(str(e))
> > InvalidURLError: ApplicationError: 1
>
> > i can't find anything in docu about how to do something like this,
> > maybe someone can help me? i'm preparing that check function for
> > javascript ajax call, that's the reason why i'm using fetch for this.
>
> > thnx
>
> > --
> >  [who cares?]http://blog.synopsi.com- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: "Ancestor is" performance

2009-01-19 Thread Alexander Kojevnikov

> The measured "ms-cpu" in the request logs comes out WAY smaller for
> the "ANCESTOR IS" query (roughly 3,000ms-cpu vs. 30,000 ms-cpu for
> 1,000 entities, and roughly this same ratio for smaller queries)
>
> Does anyone have any thoughts on this?  Did I mess something up, or is
> there something from the documentation, or is it something else
> entirely?
>
>From your second link:

  All entities in a group are stored in the same datastore node.

I guess this means that entities from the same group are stored close
to each other. When your query uses "ANCESTOR IS", the query engine
can take advantage of this. Just a speculation though...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] hiding private key

2009-01-19 Thread thebrianschott

To include a recaptcha feature requires the .py file to contain the
private key, as well as the public key. Is there some way to hide that
by putting the private key in the static directory and then reading it
into the .py file? If so, please tell me how. I also do not know if
placing a text file there would make it private.

Thanks,

Brian in Atlanta
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ok I know it's something really dumb but how to upload

2009-01-19 Thread djidjadji

You can copy and paste by using the System menu of the window.
You can open this menu by using Alt-Space or click on the top left icon
in the titlebar (for a cmd window it is a small c:\) In this menu you find a
submenu for clipboard operations.
If you want to copy text to the clipboard you first have to "Mark" the
text and then press "enter".


2009/1/19 dartdog :
> Just this typing will be a real drag since the conventional Cntrl C
> and Ctrl V don't work in cmd shell.. Back to the books, but then I
> suppose the real solution it to pack the whole thing in a bat file!!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: hiding private key

2009-01-19 Thread David Symonds

On Tue, Jan 20, 2009 at 10:56 AM, thebrianschott  wrote:

> To include a recaptcha feature requires the .py file to contain the
> private key, as well as the public key. Is there some way to hide that
> by putting the private key in the static directory and then reading it
> into the .py file? If so, please tell me how. I also do not know if
> placing a text file there would make it private.

What are you hiding it from? People can't download your source code
from App Engine.


Dave.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How expensive are queries

2009-01-19 Thread djidjadji

Sometimes the Datastore takes longer then expected.
You don't have to take action for the CPU used in the Datastore operations.
What you need to optimize is the Python code you write yourself, don't
do heavy math.
If you only do template stuff with the retrieved objects you will not
get entrys in the log about High CPU, Django templates are not CPU
intensive.
High CPU in the dashboard might be a reason to look if you need that
amount of objects and "can I do with less" but it will not count for
the High-CPU-quota.
If you often get log warnings for a certain query, that query needs
optimization.

2009/1/19 Roman :
>
> I get warnings in my app that some requests used high amount of CPU
> (2000ms, roughly 1 times over CPU limit).
> Those requests require a few queries, e.g.:
> 5 of WHERE a=b type, each returning 1 object
> 1 of WHERE ANCESTOR IS :parent foo ORDER BY bar DESC returning 5
> objects
> 2 of Model.ref_set type returning 1-5 objects
> and finally a few of get(key) type.
>
> The db is very small (less 100 objects).
>
> My questions is: is this too much for one request, or am I doing
> something terribly wrong?
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Can I See Google Product Ideas Code?

2009-01-19 Thread sweed

Hi everyone

I've recently started experimenting with App Engine and love it so
far.

My question is two-fold, first, is Google Product Ideas
(productideas.appspot.com) written using App Engine?

Second, is there any way that I can view the code behind this App?

I want to create something similar and would love to be able to learn
from the devs themselves.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Google Apps dashboard not recognizing Google App Engine/CNAME record

2009-01-19 Thread Benjamin Tseng

We currently have xhibitr.com registered under DreamHost with Google
Apps (Standard Edition) and have been trying to set up our appengine
application (at xhibitr.appspot.com) so that www.xhibitr.com forwards
to xhibitr.appspot.com

The instructions on the Google page ask us to set up a CNAME record
(so we created one to link "www" to "ghs.google.com") as confirmed by
DNSstuff (http://private.dnsstuff.com/tools/customlookup.ch?
formaction=DNSLOOKUP&name=www.xhibitr.com&r=235660&detail=0&type=CNAME),
but we are unable to set up URL forwarding from the Google Apps panel.

We are confused as we were able to set this recognition for
widget.xhibitr.com (http://private.dnsstuff.com/tools/customlookup.ch?
formaction=DNSLOOKUP&name=widget.xhibitr.com&r=235660&detail=0&type=CNAME).

Does anyone have any ideas why this is happening?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Where to post problems with dev_appserver?

2009-01-19 Thread eManish (Manish Agrawal)

In the Google App-Engine examples, it is mentioned that you have to
pass the Application folder name to dev_appserver.py  as shown below:
google_appengine/dev_appserver.py helloworld/

But, it actually means, you have to pass the path of your application
folder containing app.yaml (App Config) file.
Whereas in many cases app.yaml file resides in the "src" directory,
which is a sub-directory of the application.

So suppose, if your app.yaml file is in "C:\project\workspace
\helloworld\src" directory, use the following command
c:\> dev_appserver.py C:\project\workspace\helloworld\src

or

C:\project\workspace> dev_appserver.py helloworld\src

===

On Dec 9 2008, 10:52 am, djidjadji  wrote:
> That is not true.
>
> My setup works and is as follows for WindowsXP.
>
> Install Python 2.5.x on whatever drive you like, C:\Pyhon25
> Install google_appengine in whatever directory you like,
> C:\google\google_appengine
> Make sure this GAE dir is part of the PATH environment variable
> Put your project in whatever dir you want, C:\Projects\My_GAE_app
> in a command window,
>    cd C:\Projects
>    dev_appserver.py My_GAE_app
>
> 2008/12/8 wowm :
>
> > Ok, i found the solution and it is plain ridiculous.
>
> > The dev_appserver thing only works if your project is inside the
> > google_appengine folder... I don't know if we are able to put in some
> > kind of relative paths.
>
> > So... move your project to google_appengine folder, run the server,
> > and be happy.
>
> > Regards
>
> > On Oct 28, 7:14 pm, sketchor  wrote:
> >> Sorry for not responding to these sooner.
>
> >> > First, what is your full PYTHONPATH? What is the in the directory
> >> > helloworld.py, and are there any permissions issues with the files in the
> >> > directory (like not being set to readable by the dev_appserver)?
>
> >> C:\soft\python25\
>
> >> Note: the python exe in that location is python.exe.
>
> >> > Does the result change if you run this explicitly with Python 2.5 (as in
> >> > c:\python\python25.exe dev_appserver.py helloworld)?
>
> >> With the full path of python.exe specified, python.exe: Can't open
> >> file 'dev_appserver.py': [Error 2] No such file or directory
>
> >> > Does it work if you name the full path to helloworld (dev_appserver.py
> >> > c:\...\helloworld\).
>
> >> With the full path of dev_appserver.py specified, got ImportError: No
> >> Module named google.appengine.tools
>
> >> Following is the command I ran:
>
> >> C:\soft\google\helloworld>C:\"Program Files"\Google\google_appengine
> >> \google\appengine\tools\dev_appserver.py helloworld/
> >> Traceback (most recent call last):
> >> File "c:\Program Files\Google\google_appengine\googleengine\tools
> >> \dev_appengine\tools\dev_appserver.py", line 34, in (module)
> >>    from google.appengine.tools import os_compat
> >> ImportError: No module named google.appengine.tools
>
> >> This is pretty hard to just try out a simple program.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Feature request: more compatible urlfetch user agent string

2009-01-19 Thread Pepp

Hi,

I wanted to use a Google API, but because of the user agent currently
used, it will force me to use ISO8859-1 instead of UTF-8.

I know that the "User-Agent" header is restricted, but it would be a
good idea to use one similar to the one that is used by Googlebot:
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/
bot.html)

The current one is
AppEngine-Google; (+http://code.google.com/appengine),gzip(gfe)

So the new user agent could be:
Mozilla/5.0 (compatible; AppEngine-Google/1.0; +http://code.google.com/
appengine)

It's not about "cheating the server", it's just to use a "modern" user
agent to prevent legacy paths. I'm sure that this feature would be
easy to implement and would help most of people who are having
problems with urlfetch.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: django + app-engine-patch + AttributeError 'module' object has no attribute 'Manager'

2009-01-19 Thread tallstreet

I had the same issue. Its a known problem and apparently its on
googles end. There is a workaround on here
http://code.google.com/p/app-engine-patch/issues/detail?id=39

On Jan 18, 6:04 am, rabbi  wrote:
> Hi,
> Here's the background:
> I wrote a web app in django, pure django with no GAE.
> Then I wanted to port to GAE so I used app-engine-patch.
>
> The problem:
> I finally finished porting it today and it seems to run fine on my own
> system, so I uploaded it to GAE.
> The upload seemed to complete successfully, and my application is now
> displayed in the GAE admin, but when I try to access the site I get a
> 500 error and in the logs I get a number of exceptions.
>
> This is the first exception that is thrown.
> I can post the other 3-4 if they are requested.
> Does anyone have any suggestions?
>
> : 'module' object has no attribute
> 'Manager'
> Traceback (most recent call last):
>   File "/base/data/home/apps/swewi-swenglish/1.330766009341210472/
> common/appenginepatch/main.py", line 67, in 
>     main()
>   File "/base/data/home/apps/swewi-swenglish/1.330766009341210472/
> common/appenginepatch/main.py", line 26, in real_main
>     util.run_wsgi_app(application)
>   File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> util.py", line 76, in run_wsgi_app
>     result = application(env, _start_response)
>   File "/base/data/home/apps/swewi-swenglish/1.330766009341210472/
> common/zip-packages/django-1.0.2.zip/django/core/handlers/wsgi.py",
> line 228, in __call__
>   File "/base/data/home/apps/swewi-swenglish/1.330766009341210472/
> common/zip-packages/django-1.0.2.zip/django/core/handlers/base.py",
> line 38, in load_middleware
>   File "/base/data/home/apps/swewi-swenglish/1.330766009341210472/
> common/appenginepatch/ragendja/sites/dynamicsite.py", line 2, in
> 
>     from django.contrib.sites.models import Site
>   File "/base/python_dist/lib/python2.5/py_zipimport.py", line 239, in
> load_module
>     exec code in mod.__dict__
>   File "/base/data/home/apps/swewi-swenglish/1.330766009341210472/
> common/zip-packages/django-1.0.2.zip/django/contrib/sites/models.py",
> line 7, in 
>
> Thanks,
> Alex

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Can't Sign In

2009-01-19 Thread Matt

Hi!

For the past 4 hours, I haven't been able to sign into my App Engine
account.

I keep getting this error: "Too many redirects occurred trying to open
“http://appengine.google.com/”. This might occur if you open a page
that is redirected to open another page which then is redirected to
open the original page."

Any ideas?

~Matt

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: API for quota usage?

2009-01-19 Thread Kerio

I double that
I'm not sure if there's some way to access the dashboard, but in the
final version (remember, this is a beta) they should really add some
way to alert the developers when something goes down because of a
quota limit

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Login and google session cookie problems

2009-01-19 Thread The Unlord

Hi,

I'm having troubles with logging in to my app with my google account,
because of the way the cookies are stored.
My app have several subsections, to which you can go with the url
path, so /Download/Help, lets you go the the Help page in the Download
section.

I want everyone to be able to see the main page of my app, without
needing a googleaccount, so I didn't specify login:required in the
app.yaml. However, I only want registered users (teammembers: google
accounts that are in my database) to be able to see the other
sections, based on the roles they are assigned, so I check if they are
valid users, and return a 403. On every page however, there is a login
link that refers back to the current subsection, so on a 403 they can
click the link, log in and try again, if their session had timed out
for instance.

Recently I changed this behaviour, to directly redirect to the google
login page if the user was not logged in toot google (otherwise, he's
not a teammember or doesn't have the appropriate role, and a 403 is
the appropriate page to show).
I started noticing strange things however: If I logged in and went to
a protected section, but got a google session time-out (leaving my
browser window open overnight), the next time I refreshed the page,
got redirected to the google login, logged in, and got back to the
appropriate section. So far everything OK, but if I then went to
another section, I needed to login again!
I then noticed that firefox had registered the google login cookies to
the subpaths of my app (e.g. /Download), and not for the main site
url. So I ended up having to login again for each protected section
(and having the 'same' cookie registered multiple times).
So I figured: if I redirect them to the main page after a time-out
( users.create_login_url('/') ), the cookie might be registered for
the entire site, and not the section, but no luck. Even worse! Now I
get redirected to the main page after a re-login, but as soon as I
want to go back to the protected subsection, I get redirected to the
login page again, and then back to the main page, and so on, as if I
wasn't logged in after all. Checking the browser's cookies (after
deleting them previously) shows that there are again cookies per
subsection. So I don't get what really happens now. Where are these
extra cookies created??? How can I solve this one? I just want my
browser to have 1 ACSID cookie for my entire site, and not extra
cookies per subsection...

Thanks is advance!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Unable to create application

2009-01-19 Thread Ajith Ranabahu

Hi,
I am new to Google App Engine and trying to create an application.
However at the verification step I get the message
"The phone number has been sent too many messages or has already been
used to confirm an account.". I have not made any applications in App
engine before!

Any hint on this would be helpful. Is there any other way (say via an
API or email) to obtain a verification code ?

Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] what is wrong with Category.all().filter("c_name=",'ddd'),return nothing?

2009-01-19 Thread dd

hi,
i hava a model :
class Category(db.Model):
c_name = db.StringProperty(multiline=True)
i use Category.all().filter("c_name=",ddd)
(i am sure  there is a record )
but i can  get nothing !

so what is wrong ?
thx!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Google Apps & GAE - will not register to www

2009-01-19 Thread JMerrell

Hi,
We have converted our public website over to google app engine (great
product). The google app id for the website is mp-public-website-v1

We have tested the site and it works correctly using
beta.mipueblofoods.com. The mipueblofoods.com domain is using google
apps. We created the cname record and everything runs great.

So whats the problem

I am now trying to launch the website.

Firstly i deleted the existing DNS A record for www

then i used the exact same process as we did with beta. Created a
CNAME record for www and pointed it to ghs.google.com.

The site is not showing up in the google apps domain. The site is also
not reachable. via www.mipueblofoods.com

Please help.

Jonathan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can't start debug server, i will crazy!

2009-01-19 Thread Sumit Bando

This can be related to another instance of the app server running on
your machine.
Try killing off Python processes.
Try rebooting.

On Jan 17, 4:01 am, Maxime  wrote:
> Help!
>
> My PC is : Vista 32bit, Python 2.5, GAE 1.1.5
>
> Error message is below:
>
> Who can help me, thanks :-(
>
> -
>
> C:\google_appengine>dev_appserver.py demos/guestbook
> INFO     2009-01-17 11:53:17,653 appcfg.py] Server:
> appengine.google.com
> WARNING  2009-01-17 11:53:17,667 datastore_file_stub.py] Could not
> read datastor
> e data from c:\users\wyg\appdata\local\temp\dev_appserver.datastore
> WARNING  2009-01-17 11:53:17,667 datastore_file_stub.py] Could not
> read datastor
> e data from c:\users\wyg\appdata\local\temp
> \dev_appserver.datastore.history
> Traceback (most recent call last):
>   File "C:\google_appengine\dev_appserver.py", line 55, in 
>     execfile(script_path, globals())
>   File "C:\google_appengine\google\appengine\tools
> \dev_appserver_main.py", line
> 358, in 
>     sys.exit(main(sys.argv))
>   File "C:\google_appengine\google\appengine\tools
> \dev_appserver_main.py", line
> 337, in main
>     static_caching=static_caching)
>   File "C:\google_appengine\google\appengine\tools\dev_appserver.py",
> line 2837,
>  in CreateServer
>     return BaseHTTPServer.HTTPServer((serve_address, port),
> handler_class)
>   File "C:\Python25\lib\SocketServer.py", line 330, in __init__
>     self.server_bind()
>   File "C:\Python25\lib\BaseHTTPServer.py", line 101, in server_bind
>     SocketServer.TCPServer.server_bind(self)
>   File "C:\Python25\lib\SocketServer.py", line 341, in server_bind
>     self.socket.bind(self.server_address)
>   File "", line 1, in bind
> socket.error: (10049, "Can't assign requested address")
>
> -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Having a strange problem viewing my app

2009-01-19 Thread SpuriousGrowth

Hi appengine users, I'm experiencing a strange problem in which
following uploading my app it is displaying ... nothing. I've been
developing the app on the test appserver without a problem, and
finally went to update it for the first time yesterday. The appcfg
script runs without a problem.

So far I've update the app several times, incremented the version
number, and replaced my app with a very simple hello world example.
Pointing to specific versions also has no result. I've also submitted
a test with some static files. Trying to access the static file also
returned *nothing*. I submitted a separate test in which a debugging
message is also logged. I so far see nothing in the logs, so I don't
think anything is being executed.

I saw the entry about caching in the faq. As the test only includes
one script, it does include a call to main. I thought this might be a
propagation issue on the appengine side, but it has been a day, and I
still can't access anything from the tests I submitted yesterday.

My statistics do show page hits from the requests I've made to the
page, but the site logs are still empty. Any suggestions would be
greatly appreciated. I'm confused.

Regards,

SG

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Having a strange problem viewing my app

2009-01-19 Thread SpuriousGrowth

Hi I'm experiencing a strange problem where I cannot execute or view
an application following an upload. All I get is ... nothing, as if
the app had never been uploaded. This is the same result when visiting
the deployed version of the app or a specific version. When uploading
a new version of the app, appcfg appears to be working properly. In my
statistics I do see page views, I can so far see nothing in the logs
for the application, therefore I'm guessing that no code is being
executed. I ripped out everything in the app and made it look like the
a hello world example, and re-updated it as a new version. I still get
the same result, which is no output. I thought there might be
propagation time or something of that nature on update, but I've
waited a day.

Slightly confused.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] ifequals ifchanged

2009-01-19 Thread Birdy

Are there gotchas with these?  I've got some really simple code which
should work, to produce a sidebar with categories and pages.

First I tried this but the ifchanged page.category didn't work:


{% for page in pages %}
  
  {% ifchanged page.category %}
{% if not forloop.first %}

  
{% endif %}
  {{ page.category }}

  {% endifchanged %}
  {% ifnotequal page.name "Home" %}
  
{{page.name|escape}}
  {% endifnotequal %}
  {% if forloop.last %}
{% if is_admin %}
  Add a page
{% endif %}

  
  {% endif %}
{% endfor %}

  

Then I tried this but the ifequals doesn't work!


{% for category in categories %}
  {% ifchanged %}
{% if not forloop.first %}

  
{% endif %}
  {{ category.name }}

  {% endifchanged %}
  {% for page in pages %}
{% ifequal page.category category.name %}
   {% ifnotequal page.name "Home" %}
  
{{page.name|escape}}
   {% endifnotequal %}
{% else %}
  
{% endifequal %}
{% if forloop.last %}

  
{% endif %}
  {% endfor %}
{% endfor %}

  

I know the values are right because I examined the page source in the
comments.  ifequals works elsewhere.

Please help me somebody... any workarounds or clues anything...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Can't Sign In

2009-01-19 Thread Matt

Hi!

For the past 4 hours or so, I haven't been able to sign into my Google
App Engine account.

After entering my Google Account information, this is all I get:

Too many redirects occurred trying to open “http://
appengine.google.com/”. This might occur if you open a page that is
redirected to open another page which then is redirected to open the
original page.

Any ideas?

~Matt

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] why does Foo.all.filter get nothing?

2009-01-19 Thread potter

hi,
i use Foo.all.filter ,to hope to  get  a  result list,but  always  is
[].
so  why?
i am  sure that  there are some records in db.
need your help,
thx.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Deadline Exceeded, but not in my app code?

2009-01-19 Thread tauz...@gmail.com

I'm seeing this error message:

:
Traceback (most recent call last):
  File "/base/data/home/apps/minitracker/4.3/main.py", line 29, in

InstallAppengineHelperForDjango()
  File "/base/data/home/apps/minitracker/4.3/appengine_django/
__init__.py", line 329, in InstallAppengineHelperForDjango
PatchDjangoSerializationModules()
  File "/base/data/home/apps/minitracker/4.3/appengine_django/
__init__.py", line 165, in PatchDjangoSerializationModules
from appengine_django.serializer.python import Deserializer
  File "/base/data/home/apps/minitracker/4.3/appengine_django/
serializer/python.py", line 35, in 
from django.utils.encoding import smart_unicode
:

It appears that the deadline exceeded error is happening during an
import of some sort, but not in the application code that I wrote.

Any ideas?

-Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: why does Foo.all.filter get nothing?

2009-01-19 Thread Qian Qiao

On Mon, Jan 19, 2009 at 11:29, potter  wrote:
>
> hi,
> i use Foo.all.filter ,to hope to  get  a  result list,but  always  is
> [].
> so  why?
> i am  sure that  there are some records in db.
> need your help,
> thx.

Have you tried the using the same filter like this?

db.Query(Foo)
query.filter(your_filter)

HTH.

-- Joe

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: exploring appengine cron

2009-01-19 Thread auzhuang

I saw this:


Uploading cron entries.
Error 500: --- begin server output ---

Server Error (500)
A server error has occurred.
--- end server output ---



On 1月19日, 下午11时51分, "Ross M Karchner"  wrote:
> I've been looking at the latest checkout (35) of the AppEngine SDK (which
> might be the same as 1.1.8), trying to at least figure out how cron *will*
> work. Here's what I've found so far.
>
> Interestingly, the SDK's antlr definitions are incompatible with the version
> of antlr invluded in the sdk, so I had to rename lib/antlr3 and install
> 3.1.1 fromhttp://www.antlr.org/download/Python
>
> There's a new yaml file at the root of your application, "cron.yaml". Here's
> a simple one that validates:
> ---
> cron:
> - url: /cron
>   schedule: every 2 hours
>
> ---
>
> You can also optionally include a timezone and description. Here's what
> groctimespecification.py says about the schedule format:
>
> "A Groc schedule looks like '1st,2nd monday 9:00', or 'every 20 mins'. This
> module takes a parsed schedule (produced by Antlr) and creates objects that
> can produce times that match this schedule."
>
> If cron.yaml is present but empty or invalid, appcfg.py update fails with
> "google.appengine.api.croninfo.MalformedCronfigurationFile", if the schedule
> line is invalid, it fails with "Error parsing yaml file:". Otherwise, cron
> definitions are uploaded distinctly from all the other files.
>
> ther...@localhost:~/projects/appname$ appcfg.py update .
> Scanning files on local disk.
> Scanned 500 files.
> Initiating update.
> Cloning 155 static files.
> Cloned 100 files.
> Cloning 57 application files.
> Closing update.
> Uploading index definitions.
> *Uploading cron entries.*
>
> So, all the SDK pieces appear to work, but my testing indicates this isn't
> running on the production servers yet-- I set up an "every 1 minutes" cron
> that logs when it runs, and it hasn't been called yet
>
> They DO show up in the dashboard though, under admin logs:
>
> 01/19/09 07:32:28
> rosskarch...@gmail.com  Added cron job 'None' schedule=every 2 hours,
> url=/cron  01/19/09 07:32:28
> rosskarch...@gmail.com  Removed cron job 'None ' schedule=every 1 minutes,
> url=/cron
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Hosting question

2009-01-19 Thread arnie

hi all
There is an already hosted wsgi application [with some user interface]
using the datastore tables. I have created another wsgi application
[with no user interface just handling the requests] that needs to
access the same datastore tables and that need to be done without
using the urlfetch. Should we create a subfolder in original wsgi
folder to contain the new wsgi application and then run the update
appcfg.py update originalwsgi
Will this work? Or what other procedure do I need to adopt?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can't Sign In

2009-01-19 Thread Qian Qiao

On Tue, Jan 20, 2009 at 02:48, Matt  wrote:
>
> Hi!
>
> For the past 4 hours or so, I haven't been able to sign into my Google
> App Engine account.
>
> After entering my Google Account information, this is all I get:
>
> Too many redirects occurred trying to open "http://
> appengine.google.com/". This might occur if you open a page that is
> redirected to open another page which then is redirected to open the
> original page.
>
> Any ideas?
>
> ~Matt

Have you tried clearing your cookies?

HTH.

-- Joe

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Can't Sign In

2009-01-19 Thread Alexander Kojevnikov

Are you using a Google Apps email to sign in? If you are, you should
use this URL:
http://appengine.google.com/a//

On Jan 20, 5:48 am, Matt  wrote:
> Hi!
>
> For the past 4 hours or so, I haven't been able to sign into my Google
> App Engine account.
>
> After entering my Google Account information, this is all I get:
>
> Too many redirects occurred trying to open “http://
> appengine.google.com/”. This might occur if you open a page that is
> redirected to open another page which then is redirected to open the
> original page.
>
> Any ideas?
>
> ~Matt
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: why does Foo.all.filter get nothing?

2009-01-19 Thread dd

Qian Qiao 写道:
>> Have you tried the using the same filter like this?
>>
>> db.Query(Foo)
>> query.filter(your_filter)
>>
>> HTH.
>>
>> -- Joe
yh.
i have  a record like :
c = Cat(name='c',year=2009,month=1)
, i want to query and get this record,so i use:
Cat.all().filter('name =','c').filter('year =',2009).filter('month =',1)
,and get nothing.the result is [].
does not the query get the record Cat(name='d',year=2009,month=1)?
what is wrong with my comprehension?? and why??
thx!



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---