[google-appengine] Re: deadline exceeded errors

2008-11-10 Thread Y

Any update on this?

I'm getting theres errors right now (Nov 10, 2008 at 6:45am EST)

On Nov 9, 12:43 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Hi Joey,

 Our engineering team is currently looking in to these issues, we'll post
 more information to the downtime-notify group when it is available.

 -Marzia



 On Sun, Nov 9, 2008 at 9:30 AM, jhurstus [EMAIL PROTECTED] wrote:

  This morning my application has been receiving deadline exceeded
  errors for many requests, including some that usually take very
  little time to process.  My code has not been updated recently, so I
  suspect this is an environmental issue.

  Also, the app engine dashboard is currently down (Application
  statistics are currently unavailable.).  Anybody experiencing similar
  problems?

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



[google-appengine] Re: quotas in appengine

2008-11-10 Thread Barry Hunter

Google have said that Quotas will still be there for paying customers,
most will then be higher but they wont be gone. My personal opinion of
course, but Google want you to spend time to make your application
better not just throw more money at the problem (which is just
delagating the developement to Google)

However its also been said that high CPU warnings is generally
considered a bug, so that will be 'cured' at some point for everyone.

On Mon, Nov 10, 2008 at 4:01 AM, Greg [EMAIL PROTECTED] wrote:

 It would be nice to get an assurance that paid accounts will cure
 quotas, when they arrive.

 Cheers!
 Greg.
 




-- 
Barry

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

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



[google-appengine] Re: Using ANCESTOR IS to improve datastore performance?

2008-11-10 Thread heavyz

Thanks!

On Nov 10, 1:16 pm, Rodrigo Moraes [EMAIL PROTECTED] wrote:
 On Mon, Nov 10, 2008 at 8:23 AM, heavyz wrote:
  2. Because the ancestor relationship also establishes a one-to-many
  relationship, should I remove
  CommentOnFoo's foo property (ReferenceProperty to Foo)? I think it's
  redundant.

 since you define Foo as parent of CommentOnFoo, it'd be redundant
 indeed to have it as a property.

 regarding performance, the docs says: Entity groups do not have a
 significant impact on the speed of queries., but improve the
 performance of creating and updating data. [1]

 [1]http://code.google.com/appengine/docs/datastore/keysandentitygroups.h...

 -- rodrigo
--~--~-~--~~~---~--~~
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: appcfg.py and 500 Server Error

2008-11-10 Thread Ben Nevile

Hi,

Yesterday I vaccumed an index.  It started off in the deleting
state, then moved to the error state.  I have tried to vacuum it
again and I get error 500s.

Any ideas?  Marzia?

Ben

ps. app is called n3xt.
--~--~-~--~~~---~--~~
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: dev_appserver locks up with UrlFetch to URL within same application

2008-11-10 Thread [EMAIL PROTECTED]

I ran into this same issue writing the cron application to provided
scheduled tasks for appengine applications. The current solution is to
run a second instance of the dev_appserver on a second port.

On Nov 10, 6:55 am, russ.au [EMAIL PROTECTED] wrote:
 Okay - i should've read this first:

 http://code.google.com/appengine/docs/thedevwebserver.html
 Note: dev_appserver.py can only serve one request at a time. If your
 application makes URL fetch requests to itself while processing a
 request, these requests will fail when using the development web
 server. (They will not fail when running on App Engine.) To test such
 requests, you can run a second instance of dev_appserver.py on a
 different port, then code your application to use the other server
 when making requests to itself.

 On Nov 10, 10:47 pm, Jonk [EMAIL PROTECTED] wrote:

  On 10 marras, 13:38, russ.au [EMAIL PROTECTED] wrote:

   Weird requirement I know - when I try UrlFetch another URL within my
   application the page doing the request never completes.  After this
   the dev_appserver refuses to respond to anything.  I'm definitely not
   attempting to load the SAME page and getting myself into an infinite
   loop.

  Hi.

 http://code.google.com/appengine/docs/urlfetch/fetchfunction.html
  says:

  The fetch action is synchronous. fetch() will not return until the
  server responds.

      jK


--~--~-~--~~~---~--~~
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] 'Sender' Email Address - how to assign to admin user other than original

2008-11-10 Thread Edward

I would like to use an alternative registered administrator's email
address as my 'sender' rather than the original email address which I
used to create my appEngine account.

So far I can only send email with my 'original' parent email address,
how can I use a second 'registered' admin address as the 'sender'.

Thank you, this very important to me.  I am certain this item will
also become important for many others as this service gains
popularity.

-
ed
--~--~-~--~~~---~--~~
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: dev_appserver locks up with UrlFetch to URL within same application

2008-11-10 Thread Jonk

On 10 marras, 13:38, russ.au [EMAIL PROTECTED] wrote:

 Weird requirement I know - when I try UrlFetch another URL within my
 application the page doing the request never completes.  After this
 the dev_appserver refuses to respond to anything.  I'm definitely not
 attempting to load the SAME page and getting myself into an infinite
 loop.


Hi.

http://code.google.com/appengine/docs/urlfetch/fetchfunction.html
says:

The fetch action is synchronous. fetch() will not return until the
server responds.


jK


--~--~-~--~~~---~--~~
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: Auto increment with datastore

2008-11-10 Thread Barry Hunter

When you say auto increment - do you really mean 'unique primary key'?

If so see:
http://code.google.com/appengine/docs/datastore/keysandentitygroups.html

but note An application should not rely on numeric IDs being assigned
in increasing order with the order of entity creation. This is
generally the case, but not guaranteed.

as mentioned if you want an exact numberical order then you will need
to make it yourself, and will need a counter. But you must be very
careful to ensure consistancy, it would be very easy for a counter to
get out of sync with a  high insert rate.

So unless you really need strict sequencial number I would recommend
using what is provided by the datastore.


On Mon, Nov 10, 2008 at 4:20 AM, syahreza.octadian
[EMAIL PROTECTED] wrote:

 Dear all,

 I'm new with google app engine, now i'm try to build simple task
 management with this. But i have some of problem with datastore, i
 don't have any idea to create auto increment in data store.



 Thank for any suggestion
 Syahreza Octadian

 




-- 
Barry

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

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



[google-appengine] Re: orderly iterate a dictionary in the template?

2008-11-10 Thread Calvin Spealman

Dictionaries do not have an order.

On Sun, Oct 5, 2008 at 8:23 AM, ell [EMAIL PROTECTED] wrote:

 hi,

 how do I iterate from a dictionary orderly ?

 when i try to iterate from a dictionary i use the lines

  {% for i in mydictionary.items %}

  {{i.0}} {{i.1}}

  {% endfor %}


 i seem to get it unorderly? and why is dictionary iteration not in the
 template documentation?


 




-- 
Read my blog! I depend on your acceptance of my opinion! I am interesting!
http://techblog.ironfroggy.com/
Follow me if you're into that sort of thing: http://www.twitter.com/ironfroggy

--~--~-~--~~~---~--~~
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: dev_appserver locks up with UrlFetch to URL within same application

2008-11-10 Thread russ.au

does the dev_appserver only process 1 request at a time?

On Nov 10, 10:47 pm, Jonk [EMAIL PROTECTED] wrote:
 On 10 marras, 13:38, russ.au [EMAIL PROTECTED] wrote:

  Weird requirement I know - when I try UrlFetch another URL within my
  application the page doing the request never completes.  After this
  the dev_appserver refuses to respond to anything.  I'm definitely not
  attempting to load the SAME page and getting myself into an infinite
  loop.

 Hi.

 http://code.google.com/appengine/docs/urlfetch/fetchfunction.html
 says:

 The fetch action is synchronous. fetch() will not return until the
 server responds.

     jK
--~--~-~--~~~---~--~~
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] DistributionNotFound When Deploying App to GAE

2008-11-10 Thread campos

Hi,

I'm just following http://code.google.com/p/appengine-monkey/wiki/Pylons
to create a pylons featured GAE application. One thing I changed is
that I specified the pylons version to 0.9.6.2 because pylons==0.9.7
requires webob==0.9.4, but latest GAE only provides webob==0.9.0,
there's a conflict on the version. I can't get it sovled.

So I used pylons 0.9.6.2, and modified setup.py to set the
pylons=0.9.6.2 to pylons==0.9.6.2 so as not to get the latest pylons
version. Then everything works fine locally on my machine (Windows
XP). But when I
upload the app onto GAE, there's an error.

Error loading application:
Traceback (most recent call last):
  File /base/data/home/apps/ddviolinshop/1.29/paste-deploy.py, line
50, in module
app = loadapp(CONF_FILE)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 204, in
loadapp
return loadobj(APP, uri, name=name, **kw)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 225, in
loadobj
global_conf=global_conf)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 249, in
loadcontext
global_conf=global_conf)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 280, in
_loadconfig
return loader.get_context(object_type, name, global_conf)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 413, in
get_context
global_additions=global_additions)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 509, in
_pipeline_app_context
APP, pipeline[-1], global_conf)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 417, in
get_context
section)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 440, in
_context_from_use
object_type, name=use, global_conf=global_conf)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 368, in
get_context
global_conf=global_conf)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 249, in
loadcontext
global_conf=global_conf)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 292, in
_loadegg
return loader.get_context(object_type, name, global_conf)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 570, in
get_context
object_type, name=name)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
pastedeploy-1.3.2-py2.5.egg/paste/deploy/loadwsgi.py, line 591, in
find_egg_entry_point
pkg_resources.require(self.spec)
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
setuptools-0.6c9-py2.5.egg/pkg_resources.py, line 626, in require
needed = self.resolve(parse_requirements(requirements))
  File /base/data/home/apps/ddviolinshop/1.29/Lib/site-packages/
setuptools-0.6c9-py2.5.egg/pkg_resources.py, line 524, in resolve
raise DistributionNotFound(req)  # XXX put more info here
DistributionNotFound: buttons

buttons is the app name.

Please help me to solve this problem.

--~--~-~--~~~---~--~~
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: DistributionNotFound When Deploying App to GAE

2008-11-10 Thread Walter Cruz

Have you tried python setup.py develop (using the python from virtualenv)?
-- 
[]'
- Walter
waltercruz.com

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



[google-appengine] Re: Heavy BlobProperty() in model

2008-11-10 Thread Sylvain

Check this :  http://d.hatena.ne.jp/ikasamaH/20080612

On 10 nov, 17:50, Kenchu [EMAIL PROTECTED] wrote:
 Let's say I've got a model with a BlobProperty() holding data up to 2
 MB. Take this for example:

 class SomeDataFile(db.Model):
 title = db.StringProperty()
 data = db.BlobProperty()

 Now imagine I'd just want to fetch the title property for the items in
 this model. if I'd query the model, then the datastore would fetch the
 data property for every item. As far as I know, there's no way to ask
 the datastore to select specific fields, making this query extremely
 heavy since each data property would be fetched as well (which might
 be 2 MB / item).

 I thought I might solve this by using another table for the actual
 data, and then reference it in the SomeDataFile model as such:

 class Data(db.Model):
 data = db.BlobProperty()

 class SomeDataFile(db.Model):
 title = db.StringProperty()
 data = db.ReferenceProperty(Data)

 But as it turns out, referenced items are included in the result
 making it equally heavy.

 One solution might be to do this instead:

 class Data(db.Model):
 data = db.BlobProperty()

 class SomeDataFile(db.Model):
 title = db.StringProperty()
 data = db.StringProperty()

 Where SomeDataFile.data is a string value of the key for the Data
 item. But is that really a good solution?

 So the question is:
 How do you NOT fetch a BlobProperty in a model (you want everything
 but the Blob)? How would you model that?
--~--~-~--~~~---~--~~
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: unable to import from folder called 'profile' in production

2008-11-10 Thread Marzia Niccolai
Hi,

This seems to be a bug with the SDK, it should fail there as well as
production.  The problem is it conflicts with the standard Python profile
module.  Please file an issue about this.

-Marzia

On Sat, Nov 8, 2008 at 2:57 AM, James [EMAIL PROTECTED] wrote:


 I get import errors when importing views from a folder called
 'profile', only on production. When I change the name, it works.



 This seems like a bug?
 


--~--~-~--~~~---~--~~
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: SMS verification: Digicel (St. Kitts Nevis) not supported

2008-11-10 Thread Marzia Niccolai
If you have SMS issues, please fill out this form:
http://appengine.google.com/waitlist/sms_issues

-Marzia

On Sat, Nov 8, 2008 at 6:54 PM, denis bider [EMAIL PROTECTED]wrote:


 Hello,

 I tried to sign up to Google App Engine, but the SMS verification step
 is failing apparently because my provider is not supported. The list
 of supported providers does include Digicel in Barbados, but does not
 include Digicel in St. Kitts  Nevis. It would be great if support for
 this provider could be added.

 In case it helps, my Digicel phone number starts with +1 869 762 .

 The other local mobile phone provider here is Cable  Wireless.

 denis

 


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



[google-appengine] Re: get_by_id for subclasses

2008-11-10 Thread Marzia Niccolai
Hi Craig,

Currently we do not support this type of operation.  You must know the exact
model type to retrieve an entity by key, id, or key name, or to construct
the key from path.

Polymorphic queries are certainly something we've had requests for, you
should star the issue in the issue tracker since this is something you are
interested in:
http://code.google.com/p/googleappengine/issues/detail?id=475

-Marzia

On Sat, Nov 8, 2008 at 12:32 PM, Craig [EMAIL PROTECTED] wrote:


 I have a simple inheritance hierarchy of classes of objects that I
 have stored in my datastore. I wish to fetch these objects from the
 datastore using get_by_id(), and this works fine if I know the exact
 class of the object that I am about to fetch. However, I would like to
 be able to fetch using a parent class, and be able to get object of
 any subclass. Unfortunately, the datastore does not seem to know about
 the class inheritance of these objects.

 For example:

class Entry(db.Model):
title = db.StringProperty(required=True)

class BinaryEntry(Entry):
content = db.BlobProperty(required=True)

class TextEntry(Entry):
content = db.TextProperty(required=True)

 If I have a TextEntry in the datastore with an id of 1, this works:

entry = TextEntry.get_by_id(1)

 but this does not:

entry = Entry.get_by_id(1)

 Is there any simple way, without using the Expando model, that I can
 do this? Note that I do not have the Key of the object I wish to
 fetch, only the ID, and since I would need the Kind in order to create
 the Key from the ID with db.Key.from_path(), I can't do a generic
 db.get(key) either.

 Thanks for any help,

 Craig

 


--~--~-~--~~~---~--~~
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: ImportError: No module named foo.bar

2008-11-10 Thread Marzia Niccolai
Hi Rodrigo,

Is this a standard Python module or your own code? If your own code, does
the folder in which the code resides contain an __init__.py file?  Could you
provide your directory structure and the exact module(s) name(s) that are
being effected?

Thanks,
Marzia

On Sun, Nov 9, 2008 at 11:17 AM, Rodrigo Moraes [EMAIL PROTECTED]wrote:


 sometimes i get a ImportError: No module named foo.bar, although the
 module is there. then i restart the server and the module is loaded
 normally (the error goes away).
 does this occur with you? is there a way to avoid this?

 -- rodrigo

 


--~--~-~--~~~---~--~~
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: Using ANCESTOR IS to improve datastore performance?

2008-11-10 Thread Rodrigo Moraes

On Mon, Nov 10, 2008 at 8:23 AM, heavyz wrote:
 2. Because the ancestor relationship also establishes a one-to-many
 relationship, should I remove
 CommentOnFoo's foo property (ReferenceProperty to Foo)? I think it's
 redundant.

since you define Foo as parent of CommentOnFoo, it'd be redundant
indeed to have it as a property.

regarding performance, the docs says: Entity groups do not have a
significant impact on the speed of queries., but improve the
performance of creating and updating data. [1]

[1] 
http://code.google.com/appengine/docs/datastore/keysandentitygroups.html#Entity_Groups_Ancestors_and_Paths

-- rodrigo

--~--~-~--~~~---~--~~
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: Can't modify app since signing up to Google Apps for my domain

2008-11-10 Thread Marzia Niccolai
Hi Matt,

I suspect that this is an issue because the email address
[EMAIL PROTECTED] is BOTH a Google Account and a Google Apps account.

What happens is that only the Google Account is a developer of the app, but
upon upload it tries to authenticate against Google Apps first.

There are a couple ways to fix this.  The easiest is to add an account that
is either a Google Account (such as a Gmail account) or an Apps account (but
not both) and use that to upload your app.

The other way would be to modify the appcfg code on line 170 to set the
authentication explicitly to GOOGLE instead of HOSTED_OR_GOOGLE.

Please let me know if you need any help/clarification.

Thanks,
-Marzia

On Sun, Nov 9, 2008 at 11:45 AM, Matt Webb [EMAIL PROTECTED] wrote:


 I run at app at dirk.blogspot.com using this email address
 ([EMAIL PROTECTED]) which is a Google Account.

 But since signing up to Google Apps for the schulzeandwebb.com domain,
 using this same email address, I can no longer modify the app. I get
 this error:

 *** Running appfg.py with the following flags:
--no_cookies [EMAIL PROTECTED] --passin update
 Password for [EMAIL PROTECTED]: Scanning files on local disk.
 Initiating update.
 2008-11-09 19:33:31,723 ERROR appcfg.py:1334 An unexpected error
 occurred. Aborting.
 Error 403: --- begin server output ---
 You do not have permission to modify this app (app_id=u'dirk').
 --- end server output ---
 If deploy fails you might need to 'rollback' manually.
 The Make Symlinks... menu option can help with command-line work.
 *** appcfg.py has finished with exit code 0 ***

 I'm using GoogleAppEngineLauncher on Mac OS X 10.5.5. I can still log
 in at appengine.google.com, see my app, browse the datastore, etc. I
 have also successfully added this app to my domain (at
 dirk.schulzeandwebb.com).

 Any ideas what I can try to get access to my app again?

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



[google-appengine] Re: dev_appserver locks up with UrlFetch to URL within same application

2008-11-10 Thread russ.au

Forgot to mention - I don't have any problem with the same code on the
'live' appspot webserver.

On Nov 10, 10:38 pm, russ.au [EMAIL PROTECTED] wrote:
 Weird requirement I know - when I try UrlFetch another URL within my
 application the page doing the request never completes.  After this
 the dev_appserver refuses to respond to anything.  I'm definitely not
 attempting to load the SAME page and getting myself into an infinite
 loop.

 I can post code to reproduce this if anyone in the google team is
 interested.
--~--~-~--~~~---~--~~
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: 'Sender' Email Address - how to assign to admin user other than original

2008-11-10 Thread Marzia Niccolai
Hi,

If you add the other email address as a developer for your application, you
can assign that address to be the email sender.  Just log in to the Admin
Console and click on the 'Developers' link on the left hand side.

-Marzia

On Mon, Nov 10, 2008 at 7:00 AM, Edward [EMAIL PROTECTED] wrote:


 I would like to use an alternative registered administrator's email
 address as my 'sender' rather than the original email address which I
 used to create my appEngine account.

 So far I can only send email with my 'original' parent email address,
 how can I use a second 'registered' admin address as the 'sender'.

 Thank you, this very important to me.  I am certain this item will
 also become important for many others as this service gains
 popularity.

 -
 ed
 


--~--~-~--~~~---~--~~
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: Appengine SDK: Could not read datastore data?

2008-11-10 Thread jmay

Yes, on MacOSX by default the SDK puts the datastore in your $TMPDIR
(looks like /var/folders/.../Tmp-).  Anything in TMPDIR might be
erased on reboot or login.

Use the config options to put the datastore somewhere persistent.

-Jason


On Sep 15, 2:43 am, Cat [EMAIL PROTECTED] wrote:
 I am getting: Could not read datastore data on MacOS 10.5.4. I never
 used clear datastore.

 It happened to me now 3 times that the SDK datastore vanished. Does
 anyone know why? It seems to be stored in the user's tmp directory.
 Isn't that cleared by the system on reboot or so?
--~--~-~--~~~---~--~~
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] Using ANCESTOR IS to improve datastore performance?

2008-11-10 Thread heavyz

Hi,

As described in the GAE document: Every entity with a given root
entity as an ancestor is in the
same entity group. All entities in a group are stored in the same
datastore node. Imagine that I
have two model classes: Foo and CommentOnFoo:

class Foo(db.Model):
# some properties...

class CommentOnFoo(db.Model):
foo = db.ReferenceProperty(Foo)
# some other properties...

In my webapp, when I create a CommentOnFoo entity, I always associate
a Foo entity as its parent.
Now I have some questions about the ancestor relationship between Foo
and CommentOnFoo...

1. Does it mean that searching entities in the same datastore node is
faster? If yes, to make the
query faster, shall I always use the 'ANCESTOR IS' condition? For
example, given a Foo entity
foo, to retrieve all the comments on it, I can use the following
GQLs:

#1: comments = CommentOnFoo.gql(WHERE foo=:foo, foo=foo)
#2: comments = CommentOnFoo.gql(WHERE ANCESTOR IS :foo AND foo=:foo,
foo=foo)

Will the #2 query be faster than #1 (since #2 will be run in a single
datastore node)?

2. Because the ancestor relationship also establishes a one-to-many
relationship, should I remove
CommentOnFoo's foo property (ReferenceProperty to Foo)? I think it's
redundant.

PS. I know that I should not use ancestor just to make one-to-many
relationship. I used ancestor as
it's a requirement of transaction.

BTW: I will greatly appreciate if Google could publish a GAE best
practice article...

Thanks  regards.



--~--~-~--~~~---~--~~
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: appcfg.py .xaml files (silverlight) mimtype issue

2008-11-10 Thread Neo42

Now I also know how to pass values to and return values from the
google app engine datastore:


here's my code   - default.html, scene.js , scene.xaml, and
silverlight.js (downloadable from the web) are placed in the subfolder
silverlight.  the rest go in the root of the app.


app.yaml:

application: nameofapplicationhere
version: 1
runtime: python
api_version: 1

handlers:
- url: /stylesheets
  static_dir: stylesheets

- url: /silverlight
  static_dir: silverlight


- url: /.*
  script: helloworld.py



helloworld.py:

import cgi

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
#from django.conf.urls.defaults import *

import os
from google.appengine.ext.webapp import template

class Greeting(db.Model):
  author = db.UserProperty()
  content = db.StringProperty(multiline=True)
  date = db.DateTimeProperty(auto_now_add=True)
  entryid = db.IntegerProperty()


class MainPage(webapp.RequestHandler):
  def get(self):
greetings_query = Greeting.all().order('-date')
greetings = greetings_query.fetch(10)

if users.get_current_user():
  url = users.create_logout_url(self.request.uri)
  url_linktext = 'Logout'
else:
  url = users.create_login_url(self.request.uri)
  url_linktext = 'Login'

template_values = {
  'greetings': greetings,
  'url': url,
  'url_linktext': url_linktext,
  }

path = os.path.join(os.path.dirname(__file__), 'index.html')
self.response.out.write(template.render(path, template_values))


class Guestbook(webapp.RequestHandler):
  def post(self):
greeting = Greeting()

if users.get_current_user():
  greeting.author = users.get_current_user()

greeting.content = self.request.get('content')
greeting.entryid = eval( self.request.get('entryid') )
greeting.put()

self.redirect('/')


class funcGetDataTest(webapp.RequestHandler):
  def get(self):

greetings_query = Greeting.all().order('-date')
greetings = greetings_query.fetch(10)

if users.get_current_user():
  url = users.create_logout_url(self.request.uri)
  url_linktext = 'Logout'
else:
  url = users.create_login_url(self.request.uri)
  url_linktext = 'Login'

template_values = {
  'greetings': greetings,
  'url': url,
  'url_linktext': url_linktext,
  }

path = os.path.join(os.path.dirname(__file__), 'getDataTest.html')
self.response.out.write(template.render(path, template_values))


class paramtest(webapp.RequestHandler):
  def get(self  ):

greetings_query = db.GqlQuery(select * from Greeting  where
entryid=:1  order by date desc,
eval(self.request.get('entryid')) )
greetings = greetings_query.fetch( 1 )

greetingsmore_query = db.GqlQuery(select * from GreetingMore
where entryid=:1  order by date desc,
eval(self.request.get('entryid')) )
greetingsmore = greetingsmore_query.fetch( 1 )

if users.get_current_user():
  url = users.create_logout_url(self.request.uri)
  url_linktext = 'Logout'
else:
  url = users.create_login_url(self.request.uri)
  url_linktext = 'Login'

template_values = {
  'greetings': greetings,
  'url': url,
  'url_linktext': url_linktext,
  }

path = os.path.join(os.path.dirname(__file__), 'getDataTest.html')
self.response.out.write(template.render(path, template_values))




###

application = webapp.WSGIApplication(
 [('/', MainPage),
  ('/sign', Guestbook),
  (r'/paramtest', paramtest),
  ('/getdatatest',
funcGetDataTest)
  ],
 debug=True)

def main():
  run_wsgi_app(application)

if __name__ == __main__:
  main()



getdatatest.html:


rwrecord
{% for greeting in greetings %}
  {% if greeting.author %}
fname{{greeting.author.nickname}}/fname
lname{{greeting.author.nickname}}/lname
  {% else %}
fnameanonymous/fname
lnameanonymous/lname
  {% endif %}
id{{ greeting.content|escape }}/id
entryid{{ greeting.entryid }}/entryid
{% endfor %}
/rwrecord



scene.js:

var xmlhttp;
var senderobject;  //senderobject.findname(objectName);



function setSenderObject(sender, eventargs) {
senderobject = sender;
}


function loadXMLDoc(url) {
var ms = new Date().getTime().toString();
var seed = timestamp= + ms;  //its caching junk - using this to
make the url passed to the app engine always unique
url = url + seed;

//alert(url);
xmlhttp = null;
if (window.XMLHttpRequest) {// code for IE7, Firefox, Opera, etc.
xmlhttp = new 

[google-appengine] Re: deadline exceeded errors

2008-11-10 Thread Y

Just to be more specific, I am getting these errors when sending
email.

On Nov 10, 6:46 am, Y [EMAIL PROTECTED] wrote:
 Any update on this?

 I'm getting theres errors right now (Nov 10, 2008 at 6:45am EST)

 On Nov 9, 12:43 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:



  Hi Joey,

  Our engineering team is currently looking in to these issues, we'll post
  more information to the downtime-notify group when it is available.

  -Marzia

  On Sun, Nov 9, 2008 at 9:30 AM, jhurstus [EMAIL PROTECTED] wrote:

   This morning my application has been receiving deadline exceeded
   errors for many requests, including some that usually take very
   little time to process.  My code has not been updated recently, so I
   suspect this is an environmental issue.

   Also, the app engine dashboard is currently down (Application
   statistics are currently unavailable.).  Anybody experiencing similar
   problems?

   -Joey- Hide quoted text -

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



[google-appengine] Re: Reusing authentication from Google Checkout

2008-11-10 Thread Marzia Niccolai
Hi Issac,

This is not possible.  A user must explicitly sign in to an App Engine
application, giving permission for the application to have access to his or
her email address.

However, if the user signs in to your application, that will sign them to
their Google Account, and thus they will not have to sign in to Google
Checkout (assuming they sign in with their account that uses Google
Checkout).

-Marzia

On Sat, Nov 8, 2008 at 5:24 PM, Issac Trotts [EMAIL PROTECTED] wrote:

 Hi all, I'm working on a puzzle app where users will pay for packs of
 puzzles.  When the user clicks a Buy Now button and uses Google Checkout to
 buy a puzzle pack, I would like that to log him into my app and make the
 pack available to him right away.  Does that happen automatically, or does
 it require more work, or is it not possible?
 Thanks,
 Issac

 --
 http://svwebbuilder.com



 


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



[google-appengine] Upload data to datastore

2008-11-10 Thread Marcelo

Hi there.

I'm trying to upload some data to datastore, I can't use CSV bulk
uploader because my data is not just text. Part of the data is an
image. So I decide to make a python script to call a POST method on
the server and go saving each row of my data.

I test on local environment and works well, but after upload the
application, my script receive an error 405 Method POST not allowed.

I define my request class on server:

class BulkUpload(webapp.RequestHandler):
def post(self):

model.put()

On the client i'm using a script to call a url

content_type, body = encode_multipart_formdata(fields, files)
#here i put all my data
h = httplib.HTTP(host)
h.putrequest('POST', selector)
h.putheader('content-type', content_type)
h.putheader('content-length', str(len(body)))
h.endheaders()
h.send(body)
errcode, errmsg, headers = h.getreply()

Thanks for your 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: Heavy BlobProperty() in model

2008-11-10 Thread Kenchu

Ah read the documentation more closely.
http://code.google.com/appengine/articles/modeling.html

It reveals that a one-to-many relationship has (on the one-side) a
property of class_name_set to access the other model (it's a query
object so it wont perform query until trying to access attributes?).
--~--~-~--~~~---~--~~
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: Heavy BlobProperty() in model

2008-11-10 Thread Kenchu

btw, whats the largest size a blob can be? Is there a 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: appcfg.py and 500 Server Error

2008-11-10 Thread Marzia Niccolai
Hi Ben,

You should now be able to vacuum your indexes.

-Marzia

On Mon, Nov 10, 2008 at 6:43 AM, Ben Nevile [EMAIL PROTECTED] wrote:


 Hi,

 Yesterday I vaccumed an index.  It started off in the deleting
 state, then moved to the error state.  I have tried to vacuum it
 again and I get error 500s.

 Any ideas?  Marzia?

 Ben

 ps. app is called n3xt.
 


--~--~-~--~~~---~--~~
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] Cannot update my hosted application

2008-11-10 Thread nrabe

Hello, i cannot update my application at least since 11/02/08 (that
was the last time i updated it).
I am using the latest SDK ( 1.1.5 ), and it is a hosted account for
our organization.

Loaded authentication cookies from /home/x/.appcfg_cookies
Scanning files on local disk.
Initiating update.
Password for [EMAIL PROTECTED]:
Please go to
https://www.google.com/accounts/DisplayUnlockCaptcha
and verify you are a human.  Then try again.
Saving authentication cookies to /home/x/.appcfg_cookies

The main issue is that the URL: 
https://www.google.com/accounts/DisplayUnlockCaptcha
does not seem to work for hosted account.

Additionally, the My Account link on the google appengine admin
console does not work when accessing http://appengine.google.com/a/mydomain.com


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



[google-appengine] Re: Cannot update my hosted application

2008-11-10 Thread Marzia Niccolai
The link that is being provided is actually wrong.  Because this is a Google
Apps account, the correct link will be:

https://www.google.com/a/yourdomain.com/DisplayUnlockCaptcha

Where you replace the domain name in the above link.

-Marzia

On Mon, Nov 10, 2008 at 11:15 AM, nrabe [EMAIL PROTECTED] wrote:


 Hello, i cannot update my application at least since 11/02/08 (that
 was the last time i updated it).
 I am using the latest SDK ( 1.1.5 ), and it is a hosted account for
 our organization.

 Loaded authentication cookies from /home/x/.appcfg_cookies
 Scanning files on local disk.
 Initiating update.
 Password for [EMAIL PROTECTED]:
 Please go to
 https://www.google.com/accounts/DisplayUnlockCaptcha
 and verify you are a human.  Then try again.
 Saving authentication cookies to /home/x/.appcfg_cookies

 The main issue is that the URL:
 https://www.google.com/accounts/DisplayUnlockCaptcha
 does not seem to work for hosted account.

 Additionally, the My Account link on the google appengine admin
 console does not work when accessing
 http://appengine.google.com/a/mydomain.com


 


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



[google-appengine] Re: Heavy BlobProperty() in model

2008-11-10 Thread Kenchu

Aw, apparently you cannot have files larger than 1 MB, which kinda
sucks because then my whole business idea wont work with appengine. :(

http://googleappengine.blogspot.com/2008/04/were-up-and-running.html

They say they wanna make it possible to store larger files, but that
was 7 months ago and nothing seems to have happend. So, dont know how
seriously you can take that...
--~--~-~--~~~---~--~~
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: Heavy BlobProperty() in model

2008-11-10 Thread Kenchu

Thx for giving me that link btw, Sylvain. :)

Found this:
http://googleappengine.blogspot.com/2008/10/google-app-engine-roadmap-now-published.html

So I guess it really is coming.
I wonder what other language it will be.
--~--~-~--~~~---~--~~
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: ImportError: No module named foo.bar

2008-11-10 Thread Marzia Niccolai
I actually think this may be related to the following issue:
http://code.google.com/p/googleappengine/issues/detail?id=772

Which is related to resetting of the sys.path variable (see Guido's
explanation in the issue).

Mostly, I don't think there is any reason to modify the sys.path in your
case.  You should just eliminate the 'external' directory and include the
modules directly under the application's root folder, and import the modules
as normal in Python.

-Marzia

On Mon, Nov 10, 2008 at 10:23 AM, Rodrigo Moraes
[EMAIL PROTECTED]wrote:


 On Mon, Nov 10, 2008 at 3:27 PM, Marzia Niccolai wrote:
  Hi Rodrigo,
 
  Is this a standard Python module or your own code? If your own code, does
  the folder in which the code resides contain an __init__.py file?  Could
 you
  provide your directory structure and the exact module(s) name(s) that are
  being effected?

 Hi Marzia,
 This happens from time to time with various modules I include in my
 app directory, and it is kinda random. They all have __init__.py. For
 example, I have this in my code:

 import simplejson.decoder
 json = simplejson.decoder.JSONDecoder()

 The simplejson module is located in a 'external' directory that i add
 to sys.path in main.py:

 # Add our own directory, so we can import from it.
 root = os.path.dirname(__file__)
 sys.path.insert(0, root)
 sys.path.append(os.path.join(root, 'external'))

 A couple of times I got a No module named simplejson.decoder error,
 and after restarting the server the error was gone and the module is
 loaded normally (without any modifications in the code).

 But this doesn't help only with modules. Some templates are not found
 despite they are in the right place, and after I restart the server
 they work as they should. I guess this is related to how the sdk
 caches its stuff.

 I am developing in Mac OSX 10.5.5

 thanks,
 -- rodrigo

 


--~--~-~--~~~---~--~~
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] Displaying image from Blob

2008-11-10 Thread Toney

I’m trying to display an image from the data store using the hello
world sample.  When I run the code below I get a blank image displayed
in FireFox.  I'm sure the image is uploaded because when I initially
tried {{ greeting.pic1|escape }} in the html file I got a bunch of
garbage back.

Can someone pls let me know what i'm doing wrong.

class Greeting(db.Model):
  author = db.UserProperty()
  date = db.DateTimeProperty(auto_now_add=True)
  pic1 = db.BlobProperty()


class GetImage(webapp.RequestHandler):

  def get(self):

query_str = SELECT * FROM Greeting ORDER BY date DESC LIMIT
10result[0]
self.response.headers['Content-Type'] = 'image/jpg'
self.response.out.write(result.picture)

application = webapp.WSGIApplication(
 [('/upload/', MainPage),
 ('/upload/sign', Guestbook),
 ('/pic', GetImage)],
 debug=True)


--HTML---
 {% for greeting in greetings %}

 img src=/pic?author={{greeting. author}}/img

{% endfor %}




--~--~-~--~~~---~--~~
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: Displaying image from Blob

2008-11-10 Thread Marcelo

I think is the content-type it should be image/jpeg

On 10 nov, 14:53, Toney [EMAIL PROTECTED] wrote:
 I’m trying to display an image from the data store using the hello
 world sample.  When I run the code below I get a blank image displayed
 in FireFox.  I'm sure the image is uploaded because when I initially
 tried {{ greeting.pic1|escape }} in the html file I got a bunch of
 garbage back.

 Can someone pls let me know what i'm doing wrong.

 class Greeting(db.Model):
   author = db.UserProperty()
   date = db.DateTimeProperty(auto_now_add=True)
   pic1 = db.BlobProperty()

 class GetImage(webapp.RequestHandler):

   def get(self):

     query_str = SELECT * FROM Greeting ORDER BY date DESC LIMIT
 10    result[0]
     self.response.headers['Content-Type'] = 'image/jpg'
     self.response.out.write(result.picture)

 application = webapp.WSGIApplication(
                                      [('/upload/', MainPage),
                                      ('/upload/sign', Guestbook),
                                      ('/pic', GetImage)],
                                      debug=True)

 --HTML---
  {% for greeting in greetings %}

  img src=/pic?author={{greeting. author}}/img

     {% endfor %}
--~--~-~--~~~---~--~~
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: Displaying image from Blob

2008-11-10 Thread Toney

changed it, still no luck

On Nov 10, 3:15 pm, Marcelo [EMAIL PROTECTED] wrote:
 I think is the content-type it should be image/jpeg

 On 10 nov, 14:53, Toney [EMAIL PROTECTED] wrote:

  I’m trying to display an image from the data store using the hello
  world sample.  When I run the code below I get a blank image displayed
  in FireFox.  I'm sure the image is uploaded because when I initially
  tried {{ greeting.pic1|escape }} in the html file I got a bunch of
  garbage back.

  Can someone pls let me know what i'm doing wrong.

  class Greeting(db.Model):
    author = db.UserProperty()
    date = db.DateTimeProperty(auto_now_add=True)
    pic1 = db.BlobProperty()

  class GetImage(webapp.RequestHandler):

    def get(self):

      query_str = SELECT * FROM Greeting ORDER BY date DESC LIMIT
  10    result[0]
      self.response.headers['Content-Type'] = 'image/jpg'
      self.response.out.write(result.picture)

  application = webapp.WSGIApplication(
                                       [('/upload/', MainPage),
                                       ('/upload/sign', Guestbook),
                                       ('/pic', GetImage)],
                                       debug=True)

  --HTML---
   {% for greeting in greetings %}

   img src=/pic?author={{greeting. author}}/img

      {% endfor %}
--~--~-~--~~~---~--~~
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: app engine with django and google maps

2008-11-10 Thread Jeff S

When you say that you are not having much luck integrating, could you
be more specific? :-) From taking a 30-second glance at the samples,
it looks like they were written for a pure Django environment, which
has slightly different requirements than App Engine. This article
might be helpful: http://code.google.com/appengine/articles/django.html

Happy coding,

Jeff

On Nov 8, 4:22 am, murray3 [EMAIL PROTECTED] wrote:
 Anyone give me some direction with getting google maps to show in
 django views with app engine, I want to show a marker as well.
 I have tried various code from thehttp://code.google.com/p/django-googlemap/
 project and tried integrating without much luck! Any ideas or help
 most 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] Getting host of application..?

2008-11-10 Thread jago

I wonder how to get the 'host' of an application.

As 'host' I mean http://localhost:8080 or http://www.example.com/ ?

With self.request.url I have the current host + path. Is there a clean
way to only get the host without splitting strings?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting host of application..?

2008-11-10 Thread Marzia Niccolai
Hi,

You can find it in the os.environ dictionary. os.environ['SERVER_NAME']  I
believe is what you are looking for.

-Marzia

On Mon, Nov 10, 2008 at 1:13 PM, jago [EMAIL PROTECTED] wrote:


 I wonder how to get the 'host' of an application.

 As 'host' I mean http://localhost:8080 or http://www.example.com/ ?

 With self.request.url I have the current host + path. Is there a clean
 way to only get the host without splitting strings?
 


--~--~-~--~~~---~--~~
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: 502 Bad Gateway on XMLHttpRequest from Firefox Extension

2008-11-10 Thread Marzia Niccolai
Hi,

Do you have the exact contents of one of these requests available?  Also the
app id and domain name would be helpful.  As always, if you aren't
comfortable providing this info in the groups, you can reply with it
directly to me.

-Marzia

On Sat, Nov 8, 2008 at 12:37 PM, Gijsbert [EMAIL PROTECTED]wrote:


 Hi,

 I have a Firefox extension that sends an XMLHttpRequest multipart/form-
 data request to my GAE application to upload a png screengrab (request
 uses code taken from
 http://blog.footle.org/2007/07/31/binary-multipart-posts-in-javascript/).
 All is well on my dev server and on .appspot.com.
 However, sending the same request to the same app through my own
 domain (registered through Google Apps, CNAME with ghs.google.com)
 gives me HTTP status 502 Bad Gateway after about 20 seconds. The
 message body has some blurp about temporary error and try again in 30
 seconds, but retrying gives the same result.

 Does anybody have an idea on how to debug this further?
 The logs on the admin console on appspot.com does not show any
 activity for these requests. And the logs for the same request to
 appspot.com look fine, they don't take very long (400ms,
 1000mcycles) and return less than 1KB json status (I am testing with
 small screengrabs, so the form-data is  10KB).
 I believe ghs.google.com proxies requests, is there some restriction
 there?

 Thanks,
 Gijsbert

 


--~--~-~--~~~---~--~~
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] How to find the total number of records in Datastore

2008-11-10 Thread cm_gui

Hi All

I need to know the total number of records in my Datastore in my
application.

My problem has been posted here before but there is no resolution.
http://groups.google.com/group/google-appengine/browse_thread/thread/e5c96419fa21964c/fe6def4c2dafba2c?lnk=gstq=find+total+number+for+records

The need to know the total no. of records in a database table is a
very common one. Finding the total number of records should be a
very simple task.Storing and maintaining a counter for the total
no. of records is just too much for such a simple task.

Can somebody advise?

Thank you.


--~--~-~--~~~---~--~~
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: Displaying image from Blob

2008-11-10 Thread Alexander Kojevnikov

You write 'result.picture' but your property is called 'pic1'. Try
this code:

def get(self):
query_str = SELECT * FROM Greeting ORDER BY date DESC
result = GqlQuery(query_str).get()
self.response.headers['Content-Type'] = 'image/jpeg'
self.response.out.write(result.pic1)


On Nov 11, 6:53 am, Toney [EMAIL PROTECTED] wrote:
 I’m trying to display an image from the data store using the hello
 world sample.  When I run the code below I get a blank image displayed
 in FireFox.  I'm sure the image is uploaded because when I initially
 tried {{ greeting.pic1|escape }} in the html file I got a bunch of
 garbage back.

 Can someone pls let me know what i'm doing wrong.

 class Greeting(db.Model):
   author = db.UserProperty()
   date = db.DateTimeProperty(auto_now_add=True)
   pic1 = db.BlobProperty()

 class GetImage(webapp.RequestHandler):

   def get(self):

     query_str = SELECT * FROM Greeting ORDER BY date DESC LIMIT
 10    result[0]
     self.response.headers['Content-Type'] = 'image/jpg'
     self.response.out.write(result.picture)

 application = webapp.WSGIApplication(
                                      [('/upload/', MainPage),
                                      ('/upload/sign', Guestbook),
                                      ('/pic', GetImage)],
                                      debug=True)

 --HTML---
  {% for greeting in greetings %}

  img src=/pic?author={{greeting. author}}/img

     {% endfor %}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to find the total number of records in Datastore

2008-11-10 Thread Alexander Kojevnikov

Well, nothing has changed since September, there is still no
straightforward way to count the number of entities for a kind.

You might want to take a look and eventually star this related issue:
http://code.google.com/p/googleappengine/issues/detail?id=706

On Nov 11, 8:56 am, cm_gui [EMAIL PROTECTED] wrote:
 Hi All

 I need to know the total number of records in my Datastore in my
 application.

 My problem has been posted here before but there is no 
 resolution.http://groups.google.com/group/google-appengine/browse_thread/thread/...

 The need to know the total no. of records in a database table is a
 very common one.     Finding the total number of records should be a
 very simple task.    Storing and maintaining a counter for the total
 no. of records is just too much for such a simple task.

 Can somebody advise?

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



[google-appengine] Re: Getting host of application..?

2008-11-10 Thread jago

No.

I want the complete string:

http://localhost:8080/

in my case os.environ['SERVER_NAME'] return only 'localhost', which
does not work.

On Nov 10, 10:32 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Hi,

 You can find it in the os.environ dictionary. os.environ['SERVER_NAME']  I
 believe is what you are looking for.

 -Marzia

 On Mon, Nov 10, 2008 at 1:13 PM, jago [EMAIL PROTECTED] wrote:

  I wonder how to get the 'host' of an application.

  As 'host' I meanhttp://localhost:8080orhttp://www.example.com/?

  With self.request.url I have the current host + path. Is there a clean
  way to only get the host without splitting strings?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting host of application..?

2008-11-10 Thread Marzia Niccolai
address = 'http://' + os.environ['HTTP_HOST']

-Marzia

On Mon, Nov 10, 2008 at 2:24 PM, jago [EMAIL PROTECTED] wrote:


 No.

 I want the complete string:

 http://localhost:8080/

 in my case os.environ['SERVER_NAME'] return only 'localhost', which
 does not work.

 On Nov 10, 10:32 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
  Hi,
 
  You can find it in the os.environ dictionary. os.environ['SERVER_NAME']
  I
  believe is what you are looking for.
 
  -Marzia
 
  On Mon, Nov 10, 2008 at 1:13 PM, jago [EMAIL PROTECTED] wrote:
 
   I wonder how to get the 'host' of an application.
 
   As 'host' I meanhttp://localhost:8080orhttp://www.example.com/?
 
   With self.request.url I have the current host + path. Is there a clean
   way to only get the host without splitting strings?
 


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



[google-appengine] Re: Getting host of application..?

2008-11-10 Thread Rodrigo Moraes

On Mon, Nov 10, 2008 at 8:24 PM, jago wrote:
 in my case os.environ['SERVER_NAME'] return only 'localhost', which
 does not work.

use self.request.uri

-- rodrigo

--~--~-~--~~~---~--~~
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: DistributionNotFound When Deploying App to GAE

2008-11-10 Thread campos

yes I have. But still this error after uploading.

On Nov 11, 1:08 am, Walter Cruz [EMAIL PROTECTED] wrote:
 Have you tried python setup.py develop (using the python from virtualenv)?
 --
 []'
 - Walter
 waltercruz.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting host of application..?

2008-11-10 Thread Alexander Kojevnikov

In Django you can do:

root = request.build_absolute_uri('/')

On Nov 11, 9:24 am, jago [EMAIL PROTECTED] wrote:
 No.

 I want the complete string:

 http://localhost:8080/

 in my case os.environ['SERVER_NAME'] return only 'localhost', which
 does not work.

 On Nov 10, 10:32 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:

  Hi,

  You can find it in the os.environ dictionary. os.environ['SERVER_NAME']  I
  believe is what you are looking for.

  -Marzia

  On Mon, Nov 10, 2008 at 1:13 PM, jago [EMAIL PROTECTED] wrote:

   I wonder how to get the 'host' of an application.

   As 'host' I meanhttp://localhost:8080orhttp://www.example.com/?

   With self.request.url I have the current host + path. Is there a clean
   way to only get the host without splitting strings?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting host of application..?

2008-11-10 Thread Greg

Try request.hostname - I think it will gives you what you need.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting host of application..?

2008-11-10 Thread Rodrigo Moraes

On Mon, Nov 10, 2008 at 7:13 PM, jago wrote:
 With self.request.url I have the current host + path. Is there a clean
 way to only get the host without splitting strings?

oh, sorry, i missed this message. you can pass self.request.uri to
urlparse(), and get the components you want:

http://www.python.org/doc/2.5.2/lib/module-urlparse.html

-- rodrigo

--~--~-~--~~~---~--~~
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: App engine on mac eclipse

2008-11-10 Thread Dan Sanderson
The SDK is inside the Launcher application bundle:
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py

/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/appcfg.py

These are the destinations of the symlinks created in /usr/local/bin/.

-- Dan

On Mon, Nov 10, 2008 at 8:48 AM, Sylvain [EMAIL PROTECTED] wrote:


 Did you read this article ?

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

 It's for Windows but it should be similar for Mac.

 regards

 On 10 nov, 17:32, ohayo [EMAIL PROTECTED] wrote:
  I am still not able to link the py libs into eclipse (app engine
  related libraries). the youtube video only talks windows, and I am
  having problems with mac install. any help really appreciated.
 
  On Nov 9, 9:22 pm, Roberto Saccon [EMAIL PROTECTED] wrote:
 
   Create the symlinks (from the launcher menu), then things just work as
   expected (at least they did for me)
 
   regards
   Roberto
 
   On Nov 10, 12:12 am, ohayo [EMAIL PROTECTED] wrote:
 
hi , thanks I search for *.py files no files were found.
i also searched for djangoforms.py did I install incorrectly.
 
On Nov 9, 9:05 pm, Rodrigo Moraes [EMAIL PROTECTED]
 wrote:
 
 On Sun, Nov 9, 2008 at 10:08 PM, ohayo wrote:
  I am not sure if the app engine is available to developers any
 more.
  However I downloaded from google site - app engine sdk. i donot
 see
  any libraries to link to in eclipse. does the sdk come with the
  libraries. i am only able to see launcher.
 
 i am not sure where the libraries are placed by default, but you
 could
 use finder to look for one of the framework files, for example
 djangoforms.py, do discover the location of the libraries.
 
 hope this helps.
 
 -- rodrigo- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Comparing entities

2008-11-10 Thread David Symonds

On Mon, Nov 10, 2008 at 10:18 AM, Calvin Spealman [EMAIL PROTECTED] wrote:

 It is often preferred that you use __eq__, __ne__, __lt__, etc.
 instead of __cmp__. If you are only defined equality, define __eq__
 and (as usually applicable) __ne__.

Why is that? It seems that it would be more error-prone to implement
similar logic across two or more functions than just one function.


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: Getting host of application..?

2008-11-10 Thread yejun

self.request.host_url should return url without path.

On Nov 10, 4:13 pm, jago [EMAIL PROTECTED] wrote:
 I wonder how to get the 'host' of an application.

 As 'host' I meanhttp://localhost:8080orhttp://www.example.com/?

 With self.request.url I have the current host + path. Is there a clean
 way to only get the host without splitting strings?
--~--~-~--~~~---~--~~
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: Deleting index stuck

2008-11-10 Thread Derrick

I am having the same issue.  My application is vhac.

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



[google-appengine] Re: Displaying image from Blob

2008-11-10 Thread Toney

Thanks Alexander, I had to make some other changes but your code
helped mostly.

On Nov 10, 5:07 pm, Alexander Kojevnikov [EMAIL PROTECTED]
wrote:
 You write 'result.picture' but your property is called 'pic1'. Try
 this code:

 def get(self):
     query_str = SELECT * FROM Greeting ORDER BY date DESC
     result = GqlQuery(query_str).get()
     self.response.headers['Content-Type'] = 'image/jpeg'
     self.response.out.write(result.pic1)

 On Nov 11, 6:53 am, Toney [EMAIL PROTECTED] wrote:

  I’m trying to display an image from the data store using the hello
  world sample.  When I run the code below I get a blank image displayed
  in FireFox.  I'm sure the image is uploaded because when I initially
  tried {{ greeting.pic1|escape }} in the html file I got a bunch of
  garbage back.

  Can someone pls let me know what i'm doing wrong.

  class Greeting(db.Model):
    author = db.UserProperty()
    date = db.DateTimeProperty(auto_now_add=True)
    pic1 = db.BlobProperty()

  class GetImage(webapp.RequestHandler):

    def get(self):

      query_str = SELECT * FROM Greeting ORDER BY date DESC LIMIT
  10    result[0]
      self.response.headers['Content-Type'] = 'image/jpg'
      self.response.out.write(result.picture)

  application = webapp.WSGIApplication(
                                       [('/upload/', MainPage),
                                       ('/upload/sign', Guestbook),
                                       ('/pic', GetImage)],
                                       debug=True)

  --HTML---
   {% for greeting in greetings %}

   img src=/pic?author={{greeting. author}}/img

      {% endfor %}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting host of application..?

2008-11-10 Thread jago

In Django you can do what? I didn't know you can call methods in
Django. And what is request...it isn't the AppEngine's self.request,
is it?

On Nov 11, 12:19 am, Alexander Kojevnikov [EMAIL PROTECTED]
wrote:
 In Django you can do:

     root = request.build_absolute_uri('/')

 On Nov 11, 9:24 am, jago [EMAIL PROTECTED] wrote:

  No.

  I want the complete string:

 http://localhost:8080/

  in my case os.environ['SERVER_NAME'] return only 'localhost', which
  does not work.

  On Nov 10, 10:32 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:

   Hi,

   You can find it in the os.environ dictionary. os.environ['SERVER_NAME']  I
   believe is what you are looking for.

   -Marzia

   On Mon, Nov 10, 2008 at 1:13 PM, jago [EMAIL PROTECTED] wrote:

I wonder how to get the 'host' of an application.

As 'host' I meanhttp://localhost:8080orhttp://www.example.com/?

With self.request.url I have the current host + path. Is there a clean
way to only get the host without splitting strings?
--~--~-~--~~~---~--~~
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: Best practice for user objects

2008-11-10 Thread warreninaustintexas

That makes sense.  I will try that.

On Nov 10, 10:52 am, Mahmoud [EMAIL PROTECTED] wrote:
 I would wrap the user api object (users.user) in an application
 specific AppUser object, and use a reference property for which_user.

 -Mahmoud

 On Nov 8, 11:02 pm, warreninaustintexas [EMAIL PROTECTED]
 wrote:

  What is the best way to access one user's information from another
  user's session?  I'm building a stock market tip social networking app
  (bad timing, I know).  Obviously I need the app to share information
  between specific users.

  Here's what I have right now:

  class TopList(db.Model):
    which_user = db.UserProperty()
    # ... more properties here

  # ... lots more code ...

  # at this point ...
  # user_to_view contains the other user's screen name as a string
  # (or a blank string if the current user is looking at his own
  information)
  # ...
  user = users.get_current_user()
  iscurrentuser = False
  if user_to_view == :
    user_to_view_object = user
    iscurrentuser = True
  else:
    user_to_view_object = users.User(user_to_view)

  toplists = db.GqlQuery(SELECT * FROM TopList WHERE which_user = :1,
  user_to_view_object)

  This works fine in the development environment.  The GQL Query always
  returns an empty set, though, on the production server.

  I suspect I could replace this line:
    user_to_view_object = users.User(user_to_view)
  with this one:
    user_to_view_object = users.User(user_to_view+@gmail.com)

  ... but what about folks who are at @google.com or another domain?

  Has anyone else found an elegant way of solving this problem?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Getting host of application..?

2008-11-10 Thread yejun

Webapp's request is thin wrapper of WebOb request object.

On Nov 10, 9:49 pm, jago [EMAIL PROTECTED] wrote:
 Are there more Request attributes I don't know about? In Google
 AppEngine's docu is no self.request.host_url  listed. Where can I find
 the complete docu?

 On Nov 11, 2:17 am, yejun [EMAIL PROTECTED] wrote:

  self.request.host_url should return url without path.

  On Nov 10, 4:13 pm, jago [EMAIL PROTECTED] wrote:

   I wonder how to get the 'host' of an application.

   As 'host' I meanhttp://localhost:8080orhttp://www.example.com/?

   With self.request.url I have the current host + path. Is there a clean
   way to only get the host without splitting strings?
--~--~-~--~~~---~--~~
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: Crappiest Product from Google

2008-11-10 Thread Kannaiyan

http://c2.com/cgi/wiki?DontRepeatYourself

This is nice to represent here. Hope you guys can understand.

On Nov 4, 11:33 am, Dan Sanderson [EMAIL PROTECTED] wrote:
 On Tue, Nov 4, 2008 at 9:48 AM, Kannaiyan [EMAIL PROTECTED] wrote:
  We need to have a smart way of maintaining versions.
  What if Google Upgrades the version of Python Intrepreter to a higher
  version when the code is written for lower version?

 Runtime environments are versioned, and you control which version your app
 uses in the app.yaml configuration file.  Right now, there is only one
 version of the Python runtime: 1.  Changes made to an existing version of
 the runtime environment are intended to be backwards compatible.  If there
 is ever a non-backwards compatible change, it will be released in a new
 version of the runtime.  When a new version of the runtime is released, an
 app will continue to use the original version until the app owner changes
 the app.yaml file.

 The biggest example of this would be upgrading Python itself.  Version 1 of
 the runtime uses Python 2.5.  If App Engine were to support a later version
 of Python, it would have to be in a later version of the runtime
 environment.  You wouldn't want the version of the Python language to change
 automatically.

 Upgrading an app to a new runtime environment is likely to be non-trivial
 for everyone, so it's better if new non-backwards compatible versions are
 few and far between.  This is one of many reasons you don't want lots of
 libraries bundled with the runtime.  Consider that the runtime bundles
 Django 0.96; updating this to Django 1.0 would require a new version of the
 runtime.  I'd recommend to anyone wanting to use Django on App Engine to add
 Django 1.0 to their app instead of using the bundled 0.96 and waiting for a
 new version of the runtime.  Thankfully, this is easy to do.

  What happens if there is a bug (BETA) in GData module and the website
  is not updated with that gdata update.

 It sounds like you're asking about what would happen if we bundled the GData
 library in the runtime, and a bug were discovered in the library.  In this
 case, if the bug fix is backwards compatible, the library would be upgraded
 in place with a minor release of the runtime environment, and all apps using
 that version of the runtime would see the fix automatically, just as with
 fixes in the API libraries.

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