[google-appengine] Re: Site pages static vs dynamic

2009-05-29 Thread

The login/logout URL is dynamic, while your static files are, hm,
static.
So the short answer is that you cannot embed the dynamic URL in your
static files.
You can provide a template, which contains the login/logout URL and an
iframe to wrap your static file.

Regards.

On May 28, 2:52 am, jonbutler88  wrote:
> Hi all,
>
> Just started using app engine yesterday, and so far very impressed. Im
> used to PHP, so the different structure takes some getting used to,
> but its coming along nicely. I've run into some problems with my
> site's structure, and was wondering what the web app way of solving
> this was.
>
> I have my home page which is a template, populated by my main python
> script. I also have several other 95% static pages, which at the
> moment are being served statically. My problem is that on my home page
> I have a test to see if a user is logged in. If the user isn't logged
> in they get a login url, else they get a logout url. On my static
> pages however, there seems to be no way to implement this. This is the
> only dynamic value I need on the whole page, do I need to make a new
> python file or is there a way around this?
>
> Thanks in advance,
> Jon
--~--~-~--~~~---~--~~
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: Apps engine and google data centers abroad

2009-05-22 Thread

It's strange that Google Apps site is localized in Chinese while
ghs.google.com gets banned by the GFW.
Just wondering why this happens...


ZHENG Zhong
http://buggarden.zhengzhong.net/

On 5月21日, 上午3时21分, 风笑雪  wrote:
> For Chinese visitors, you have to point your apps domain to 74.125.113.121
> instead of ghs.google.com.But I'm not sure when GFW will ban this ip.
>
> Once it happens again, you may find a new ip
> via:http://www.mob.net/~ted/tools/dns.php3?domain=ghs.google.com
>
> 2009/5/21 Lec 
>
>
>
> > I would like to know if the apps engine applications developed on the
> > USA based apps engine ie; usa data center are mirrored all over the
> > world? Will the same app run in asia, europe, middle east, etc.?
>
> > How do i localize access to that data center, does google route it
> > automatically or do i need to give it a hint? Does apps engine support
> > Unicode and localization for text strings?
>
> > As example, if I have  calculator.mydomain.com -->
> > calculator.appspot.com, from a website in usa just a link, from
>
> > France it would be  calculator.mydomain.com --> calculator.appspot.fr
> > HongKong  it would be  calculator.mydomain.com -->
> > calculator.appspot.hk
>
> > We want the best performance possible from anywhere in the world,
> > perhaps have the app localized for language as well. I noticed when
> > abroad mail.google.com goes local to mail.google.com?lang=fr or
> > something like that, we can still tell it to use lang=en, but not sure
> > what happens behind the scenes. I do not think it travels to usa to
> > get the en localization, for apps is it the same?
>
> > One last one; China :) I have huge problem of my lovely domain not
> > working from china 1/2 the time. It is being blocked because google
> > stuff is being blocked. So sites, nada, is there a chinese local
> > version of the data center we can setup which would prevent this. I
> > know it is beyond google's control. But my domain should not be
> > blocked just because it sits on google servers every time google,
> > youtube, what ever is blocked. So need a way around this problem, have
> > some ideas, would love to work with someone to implement them. You
> > know you also want to do business there.
>
> > * if someone gives a detailed answer there is beer waiting for you
> > (from me) one nite after google IO next week.
>
> > L
--~--~-~--~~~---~--~~
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 I use more than one application with Google Apps?

2009-05-19 Thread

I succeeded running 2 webapps on my two subdomains. All you need is to

1) add a domain to your GAE-based app (on appengine's dashboard)
2) add a CNAME record pointing to ghs.google.com

You can add a domain to your webapp via:
appengine dashboard / administration / versions / domain setup

Hope that helps.
Regards.

ZHENG Zhong
http://buggarden.zhengzhong.net/

On 5月20日, 上午12时04分, Florian  wrote:
> They do - it was just a try.
>
> Any idea to get more than 1 of 10 apps working on a Google Apps domain
> simultaneously?
>
> If you can use only one application another problem is that you are
> not able to specify one.
>
> The first one is chosen automatically.
>
> On May 19, 8:24 pm, Wooble  wrote:
>
> > Your CNAME records should be pointing to ghs.google.com.
>
> > On May 19, 6:55 am, Florian  wrote:
>
> > > I use Google App Engine with my own domain (Google Apps) and I would
> > > like to use different applications on different subdomains.
>
> > > However I am able to set up the subdomains on my control panel but I
> > > am not able to map them to different applications.
>
> > > As required I created cname records pointing at ghs.google.com for all
> > > subdomains but at the end all of them deliver the first application I
> > > have deployed.
>
> > > If I create cname records pointing at my subdomains at appspot.com no
> > > application is delivered at all. I get the Google homepage instead.
--~--~-~--~~~---~--~~
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: Sorting more than 1000 entities

2009-05-19 Thread

The problem is not about sorting. The problem is that you cannot get
more than 1000 entries.
You need to "paginate" on the last_name property (if it is guaranteed
to be unique).

all_students = [ ]
next = ''
while True:
students = Student.all().order('last_name').filter('last_name >',
next).fetch(100)
if students:
all_students.extends(students)
next = all_students[-1].last_name
else:
break

Just pay attention that the code above may use too much CPU time if
you really have a lot of entries.

More details about paging:

http://code.google.com/intl/en/appengine/articles/paging.html

Regards.

ZHENG Zhong
http://buggarden.zhengzhong.net/

On May 18, 10:16 pm, daiski  wrote:
> Hi.
>
> I have more than 1000 entities in one kind (Students).
>
> How can I retrieve from (or iterate through) the datastore *all*
> Students sorted by a StringProperty last_name?
>
> Thanks :)
>
> Mo
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---