[google-appengine] Re: Started getting Error code 203 24 hours ago

2020-10-21 Thread NP
Hi,

I only see the option to create a public issue. How do I create a private 
issue as you said

On Wednesday, October 21, 2020 at 12:33:17 PM UTC-7 Elliott (Cloud Platform 
Support) wrote:

> Hello,
>
> The best way to move forward to report an issue is to create a private Google 
> Issue Tracker <https://cloud.google.com/support/docs/issue-trackers> to 
> investigate the error you are reporting since Google Groups is meant to 
> have general discussions. At that point, you may share project specific 
> information if needed.
>
> There are several options to choose from on that page. If you need help 
> choosing one, you may respond to this message and we will guide you then.
>
>
> On Wednesday, October 21, 2020 at 10:05:03 AM UTC-4 NP wrote:
>
>> Starting from yesterday, I now get the following error when I try to 
>> load  my home page. This started happening after I redeployed some changes
>>
>> *.The process handling this request unexpectedly died. This is likely 
>> to cause a new process to be used for the next request to your application. 
>> (Error code 203).*
>>
>> This has nothing to do with my code because everything works on my local 
>> machine. I even changed the handler on my home page route to just return 
>> "Done"  but I'm still getting the error i.e. I currently have
>>
>> @app.route("/")
>> def homePageHandler():
>> return "Done"
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/90db2e63-85e8-4fbc-a08e-9eddacd12144n%40googlegroups.com.


[google-appengine] Started getting Error code 203 24 hours ago

2020-10-21 Thread NP
Starting from yesterday, I now get the following error when I try to load  
my home page. This started happening after I redeployed some changes

*.The process handling this request unexpectedly died. This is likely 
to cause a new process to be used for the next request to your application. 
(Error code 203).*

This has nothing to do with my code because everything works on my local 
machine. I even changed the handler on my home page route to just return 
"Done"  but I'm still getting the error i.e. I currently have

@app.route("/")
def homePageHandler():
return "Done"


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/36c043ab-c931-429d-b072-763883150e9fn%40googlegroups.com.


Re: [google-appengine] Can we create a billing account without turning on the free $300/90 days credit?

2020-09-18 Thread NP
Thanks for the response.

I took a look at the SO question and it's not exactly the same thing. 

Also as an FYI for anyone else who might come across this post - Google has 
confirmed that creating a billing account automatically turns on the $300 
credit/90 day clock. It was confirmed by a Googler on this Post and from 
the Feature Request that I logged (it was set to 'Wont fix; Intended 
Behavior). 

On Thursday, September 17, 2020 at 11:33:54 AM UTC-7 Wesley C (Google) 
wrote:

> Also, track this SO question <http://stackoverflow.com/questions/63915713> 
> as some Googlers are active on it. And if you feel compelled to contact 
> Cloud billing/support folks sooner than later, here are some links:
>
>- https://console.cloud.google.com/support/chat
>- https://cloud.google.com/support/billing
>
>
> On Wed, Sep 16, 2020 at 7:35 AM 'David (Cloud Platform Support)' via 
> Google App Engine  wrote:
>
>> As per the free trial documentation 
>> <https://cloud.google.com/free/docs/gcp-free-tier>, the free trial will 
>> start automatically when you set up your billing account so you must be 
>> prepared to use your free trial when doing this.
>> On Tuesday, September 15, 2020 at 7:21:59 PM UTC-4 NP wrote:
>>
>>> >>>> then create a billing account there 
>>> <https://console.cloud.google.com/billing/create> and see if you can do 
>>> so w/o activting the Free Trial <<<
>>>
>>> Right now, it looks to me like it will activate it. I don't want to 
>>> complete the step in case it does activate the free trial (since there's no 
>>> way to turn it off). Is there any way to confirm if it will or will not 
>>> activate the free trial?
>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-appengi...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/7dd76c05-b8e7-4ee3-845e-337e6ba45cbdn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-appengine/7dd76c05-b8e7-4ee3-845e-337e6ba45cbdn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>
>
> -- 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "A computer never does what you want... only what you tell it."
> wesley chun :: @wescpy <http://twitter.com/wescpy> :: Software 
> Architect & Engineer
> Developer Advocate at Google Cloud by day; at night...
> Python training & consulting : http://CyberwebConsulting.com
> "Core Python" books : http://CorePython.com
> Python blog: http://wescpy.blogspot.com
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/bc942659-b7fa-4fc0-ae2e-caa710ce1411n%40googlegroups.com.


Re: [google-appengine] Can we create a billing account without turning on the free $300/90 days credit?

2020-09-15 Thread NP
 then create a billing account there 
 and see if you can do so 
w/o activting the Free Trial <<<

Right now, it looks to me like it will activate it. I don't want to 
complete the step in case it does activate the free trial (since there's no 
way to turn it off). Is there any way to confirm if it will or will not 
activate the free trial?


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/63f48b94-5a2b-4937-b22f-e447409358e9n%40googlegroups.com.


Re: [google-appengine] Can we create a billing account without turning on the free $300/90 days credit?

2020-09-14 Thread NP
> Can you also privately send me some terminal screenshots <

How do I do this? I can only see 'reply all' link. 'Reply to Author' is 
disabled

On Monday, September 14, 2020 at 2:55:30 PM UTC-7 Wesley C (Google) wrote:

> Hello. You're correct that appcfg.py 
> 
>  
> is going away 
> .
>  
> Try going to the cloud console , select 
> your App Engine project from the top, then create a billing account there 
>  and see if you can do 
> so w/o activting the Free Trial (which I agree with you on -- no one should 
> activate it until they have enough regular use to take advantage of it, 
> esp. since it expires in 3 mos). Once you've created a billing account 
> using a credit card, you s/b able to use gcloud deploy successfully to 
> deploy.
>
> Can you also privately send me some terminal screenshots of gcloud deploy 
> asking for a billing account, and if a new one is created, it automatically 
> activates the Cloud Console?
>
> Thank you,
> --Wesley
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a184ec2a-b662-487d-ae8a-69ae70f07736n%40googlegroups.com.


Re: [google-appengine] Can we create a billing account without turning on the free $300/90 days credit?

2020-09-14 Thread NP
...then create a billing account there 
<https://console.cloud.google.com/billing/create> and see if you can do so 
w/o activting the Free Trial...

Right now, it looks to me like I can't do that. I don't want to try it and 
then find out I've activated the free trail ($300/90 day credit)
On Monday, September 14, 2020 at 2:55:30 PM UTC-7 Wesley C (Google) wrote:

> Hello. You're correct that appcfg.py 
> <https://cloud.google.com/appengine/docs/standard/python/tools/appcfg-arguments>
>  
> is going away 
> <https://cloud.google.com/appengine/docs/standard/java/tools/migrating-from-appcfg-to-gcloud>.
>  
> Try going to the cloud console <https://console.cloud.google.com>, select 
> your App Engine project from the top, then create a billing account there 
> <https://console.cloud.google.com/billing/create> and see if you can do 
> so w/o activting the Free Trial (which I agree with you on -- no one should 
> activate it until they have enough regular use to take advantage of it, 
> esp. since it expires in 3 mos). Once you've created a billing account 
> using a credit card, you s/b able to use gcloud deploy successfully to 
> deploy.
>
> Can you also privately send me some terminal screenshots of gcloud deploy 
> asking for a billing account, and if a new one is created, it automatically 
> activates the Cloud Console?
>
> Thank you,
> --Wesley
>
> On Mon, Sep 14, 2020 at 11:36 AM NP  wrote:
>
>> Hello,
>>
>> GAE no longer allows deployment to production using app cfg. They insist 
>> you must use "gcloud deploy". 
>>
>> However, when you try to use "gcloud deploy", it insists you must enable 
>> a billing account and enabling this automatically turns on the 'free' $300 
>> credit which expires in 90 days or so.
>>
>>
>> Given that I'm still in early stages of development (only deploying to 
>> production to make sure everything works), I do not wish to waste the 90 
>> days/free $300 credit. 
>>
>> So my questions are
>>
>> 1) Is it possible to create a new billing account without turning on the 
>> free $300/90 days credit?
>>
>> 2) Is there still a way to use appcfg.py to deploy your app (which means 
>> I don't need the answer to question 1)?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-appengi...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/30bfd66c-6281-40ca-bfc0-6fb206c86c30o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-appengine/30bfd66c-6281-40ca-bfc0-6fb206c86c30o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>
>
> -- 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "A computer never does what you want... only what you tell it."
> wesley chun :: @wescpy <http://twitter.com/wescpy> :: Software 
> Architect & Engineer
> Developer Advocate at Google Cloud by day; at night...
> Python training & consulting : http://CyberwebConsulting.com
> "Core Python" books : http://CorePython.com
> Python blog: http://wescpy.blogspot.com
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/16a86e7b-3804-4cef-80de-967659befc4an%40googlegroups.com.


Re: [google-appengine] Can we create a billing account without turning on the free $300/90 days credit?

2020-09-14 Thread NP
..>>>>Can you also privately send me some terminal screenshots of 
gcloud deploy asking for a billing account, and if a new one is created, it 
automatically activates the Cloud Console?<<<<...

How do I send you a private message? I only see the 'reply all' button (the 
reply to author button is disabled)?

On Monday, September 14, 2020 at 2:55:30 PM UTC-7 Wesley C (Google) wrote:

> Hello. You're correct that appcfg.py 
> <https://cloud.google.com/appengine/docs/standard/python/tools/appcfg-arguments>
>  
> is going away 
> <https://cloud.google.com/appengine/docs/standard/java/tools/migrating-from-appcfg-to-gcloud>.
>  
> Try going to the cloud console <https://console.cloud.google.com>, select 
> your App Engine project from the top, then create a billing account there 
> <https://console.cloud.google.com/billing/create> and see if you can do 
> so w/o activting the Free Trial (which I agree with you on -- no one should 
> activate it until they have enough regular use to take advantage of it, 
> esp. since it expires in 3 mos). Once you've created a billing account 
> using a credit card, you s/b able to use gcloud deploy successfully to 
> deploy.
>
> Can you also privately send me some terminal screenshots of gcloud deploy 
> asking for a billing account, and if a new one is created, it automatically 
> activates the Cloud Console?
>
> Thank you,
> --Wesley
>
> On Mon, Sep 14, 2020 at 11:36 AM NP  wrote:
>
>> Hello,
>>
>> GAE no longer allows deployment to production using app cfg. They insist 
>> you must use "gcloud deploy". 
>>
>> However, when you try to use "gcloud deploy", it insists you must enable 
>> a billing account and enabling this automatically turns on the 'free' $300 
>> credit which expires in 90 days or so.
>>
>>
>> Given that I'm still in early stages of development (only deploying to 
>> production to make sure everything works), I do not wish to waste the 90 
>> days/free $300 credit. 
>>
>> So my questions are
>>
>> 1) Is it possible to create a new billing account without turning on the 
>> free $300/90 days credit?
>>
>> 2) Is there still a way to use appcfg.py to deploy your app (which means 
>> I don't need the answer to question 1)?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-appengi...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/30bfd66c-6281-40ca-bfc0-6fb206c86c30o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-appengine/30bfd66c-6281-40ca-bfc0-6fb206c86c30o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>
>
> -- 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "A computer never does what you want... only what you tell it."
> wesley chun :: @wescpy <http://twitter.com/wescpy> :: Software 
> Architect & Engineer
> Developer Advocate at Google Cloud by day; at night...
> Python training & consulting : http://CyberwebConsulting.com
> "Core Python" books : http://CorePython.com
> Python blog: http://wescpy.blogspot.com
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e73fc45b-2a0f-4f35-a4c7-60a0cae7e435n%40googlegroups.com.


[google-appengine] Can we create a billing account without turning on the free $300/90 days credit?

2020-09-14 Thread NP
Hello,

GAE no longer allows deployment to production using app cfg. They insist 
you must use "gcloud deploy". 

However, when you try to use "gcloud deploy", it insists you must enable a 
billing account and enabling this automatically turns on the 'free' $300 
credit which expires in 90 days or so.


Given that I'm still in early stages of development (only deploying to 
production to make sure everything works), I do not wish to waste the 90 
days/free $300 credit. 

So my questions are

1) Is it possible to create a new billing account without turning on the 
free $300/90 days credit?

2) Is there still a way to use appcfg.py to deploy your app (which means I 
don't need the answer to question 1)?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/30bfd66c-6281-40ca-bfc0-6fb206c86c30o%40googlegroups.com.


[google-appengine] Re: Any GAE Profiler for Flask

2020-01-13 Thread NP
Hi,

Thanks for the response. I asked the question here because Google had an 
'officially' documented profiler for WebApp so I was simply wondering if 
they had one for Flask. I looked at it from the POV of asking if a feature 
existed (I wasn't asking how to implement it or coding techniques). Also, 
an announcement was made on this forum (by Google) about the other 
profilers that I mentioned (see - 
https://groups.google.com/d/topic/google-appengine/uw6Ro2hLkMk/discussion 

)

On Monday, January 13, 2020 at 7:55:31 AM UTC-8, George (Cloud Platform 
Support) wrote:
>
> You may also check flask_profiler 1.8.1 
> . , or nylas/nylas-perftools 
> . 
>
> This discussion group is oriented more towards general opinions, trends, 
> and issues of general nature touching App Engine and Cloud SQL. For coding 
> and programming architecture generally, or choosing a profiler for Flask, 
> you may be better served in dedicated forums such as stackoverflow, where 
> experienced programmers are within reach and ready to help.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9b750ca9-f98a-428e-890a-7890842fb9ff%40googlegroups.com.


[google-appengine] Any GAE Profiler for Flask

2020-01-12 Thread NP
Hello,

Is there any GAE profiler for Flask?

I've seen https://github.com/passy/flask-gae-mini-profiler but it is now 
depecrated and doesn't work (at least, I couldn't get it to work; possible 
I'm missing something)

I've also seen https://github.com/muatik/flask-profiler which is for Flask 
but not specifically for GAE. I've tried it and had to do some hacks (e.g. 
to enable sqlite) to get it to work but it still misses a few things which 
are specific to GAE

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/251d8615-a9fd-4440-8c59-717eb0d94e8e%40googlegroups.com.


[google-appengine] Are Google App Engine A/AAAA records fixed?

2019-10-08 Thread NP
Hello,

The process for mapping a custom domain to an app engine project is 
documented here 


The final step is updating your DNS configuration with the records (ip 
addresses) generated by Google. 

My question is - are these records static? Put another way are the values 
always


A   216.239.32.21

A216.239.34.21

A216.239.36.21

A.  216.239.38.21

2001:4860:4802:32::15

   2001:4860:4802:34::15

   2001:4860:4802:36::15

  2001:4860:4802:38::15


for naked domains 


and CNAME.ghs.googlehosted.com. for www (or subdomains)?



I'm asking because if these values are fixed, then I should be able to add 
them to the DNS at the same that I'm adding the values (TXT or CNAME) for 
domain ownership verification. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a9993678-7ede-465d-aca6-af1c2fbe7f6a%40googlegroups.com.


[google-appengine] Re: Is Google App Engine Launcher being deprecated? Why??

2019-07-25 Thread NP
Google has recently been sending out notifications about the deprecation of 
appcfg including the launcher. Apparently, they still didn't reverse their 
decision to sunset Launcher. This is such a bummer.


On Thursday, December 8, 2016 at 11:48:35 AM UTC-8, Hannes Rydén wrote:
>
> I've been developing sites for App Engine Python for years and have always 
> loved the Google App Engine Launcher client for Windows. It makes 
> developing and publishing websites a breeze, compared to most other web 
> server software.
>
> Now I wanted to install the latest version, clicked the download button as 
> usual but were then lead to install the Cloud SDK client instead. So I did. 
> But gone was the simple graphical interface, and I was met with a confusing 
> terminal interface instead, which seemed much more limited in functionality 
> (can I even have multiple sites running at the same time on different 
> ports?). I can't even find how to start the program again after I shut it 
> down.
>
> I finally found the old client download, which was hard to find without 
> reading forums. Why would you recommend users to use a clearly inferior 
> product in terms of usability? I think that will deter many new users from 
> developing on App Engine.
>
> I think it would be much better if you make the old Launcher the 
> recommended tool for App Engine instead, and provide the Cloud SDK an 
> alternative. I really love App Engine, so that's why I'm sad to see when 
> some new changes seem to make it worse (which is usually not the case, as 
> you've been making some great changes over the years).
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/412533be-e12b-47f3-a181-e6bf48d477a4%40googlegroups.com.


[google-appengine] Re: Are datastore Ids unique across all namespaces?

2019-06-17 Thread NP
Thanks.

That link answered my question with the answer being - No, the Ids are not 
unique across all namespaces. The link also provided a solution for me if I 
need them to be unique.


On Monday, June 17, 2019 at 12:55:36 PM UTC-7, Nicolas (Google Cloud 
Platform Support) wrote:
>
> Hi,
>
>  
>
> I understand your use case and I think the best way to accomplish that 
> would be something like suggested in this StackOverflow 
> <https://stackoverflow.com/questions/51407626/google-cloud-datastore-unique-autogenerated-ids>
>  
> post and set up your own  GUIDs.
>
>  
>
> I hope that helps!
>
>
>
> On Friday, June 14, 2019 at 10:53:30 PM UTC-4, NP wrote:
>>
>> Thanks for your response. And yes, I was referring to the numeric id.
>>
>> In case it wasn't clear from my post, I actually want the ids to be 
>> unique. I was just trying to confirm that it is.
>>
>> The reason I would prefer the ids are unique is because I have seeded 
>> data which all my users can use. The users can then in turn create entities 
>> for their application which are saved with a namespace for the user. Since 
>> each user basically has access to 2 namespaces (the default or blank 
>> namespace which contains my seeded data and the namespace for their app), I 
>> would like to search for entities by just their numeric ids. If I find the 
>> record, I then check the namespace associated with the corresponding key. 
>> For this to work, the ids need to be unique across all namespaces.
>>
>>
>>
>> On Friday, June 14, 2019 at 7:06:48 PM UTC-7, Harmit Rishi (Cloud 
>> Platform Support) wrote:
>>>
>>> In order to effectively address your question, I would like to take a 
>>> moment and explain the characteristics of a Entity 
>>> <https://cloud.google.com/datastore/docs/concepts/entities>. Each 
>>> entity within Datastore has a key that uniquely identifies it. The key (as 
>>> you provided) consists of the following components: 
>>>
>>> 1. Namespace of the entity
>>> 2. The kind 
>>> <https://cloud.google.com/datastore/docs/concepts/entities#kinds_and_identifiers>
>>>  
>>> of entity (categorized for queries)
>>> 3. An Identifier 
>>> <https://cloud.google.com/datastore/docs/concepts/entities#kinds_and_identifiers>
>>>  
>>> for the individual entity (can be a key name string or a integer numeric 
>>> id.)
>>>
>>> I will be assuming that you are referring to the integer numeric id for 
>>> your question. 
>>>
>>> As far as having two of the same numeric ID's goes, indeed it is 
>>> possible and this can be done by having your application assign their own 
>>> numeric IDs manually to the entitles being created. However, as indicated 
>>> in the documentation here 
>>> <https://cloud.google.com/datastore/docs/concepts/entities#kinds_and_identifiers>,
>>>  
>>> "there is nothing to prevent a Datastore mode database from assigning one 
>>> of your manual numeric IDs to another entity". You will have to implement 
>>> the *allocateids() 
>>> <https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/datastore/DatastoreService#allocateIds-java.lang.String-long->*method
>>>  
>>> within your application which will allow you to obtain a block of IDs in 
>>> order to avoid the conflict mentioned above.
>>>
>>> Also, since you mentioned that "Datastore is the one automatically 
>>> generating the ids", the documentation found here 
>>> <https://cloud.google.com/datastore/docs/concepts/entities#kinds_and_identifiers>
>>>  states 
>>> that the "automatic ID generator will keep track of IDs that have been 
>>> allocated" and that Datastore "will avoid reusing them for another entity".
>>>
>>> Therefore to sum it all up. Yes, you can achieve the goal you want. 
>>> However, it would be a good idea to implement the best practices for it as 
>>> well such as: manually assigning Ids with implementing *allocateids() 
>>> <https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/datastore/DatastoreService#allocateIds-java.lang.String-long->*
>>> . 
>>>
>>> I hope this helps!
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/43530034-e9e4-42ad-963c-4d79faddde7c%40googlegroups.com.


[google-appengine] Re: Are datastore Ids unique across all namespaces?

2019-06-14 Thread NP
Thanks for your response. And yes, I was referring to the numeric id.

In case it wasn't clear from my post, I actually want the ids to be unique. 
I was just trying to confirm that it is.

The reason I would prefer the ids are unique is because I have seeded data 
which all my users can use. The users can then in turn create entities for 
their application which are saved with a namespace for the user. Since each 
user basically has access to 2 namespaces (the default or blank namespace 
which contains my seeded data and the namespace for their app), I would 
like to search for entities by just their numeric ids. If I find the 
record, I then check the namespace associated with the corresponding key. 
For this to work, the ids need to be unique across all namespaces.



On Friday, June 14, 2019 at 7:06:48 PM UTC-7, Harmit Rishi (Cloud Platform 
Support) wrote:
>
> In order to effectively address your question, I would like to take a 
> moment and explain the characteristics of a Entity 
> . Each entity 
> within Datastore has a key that uniquely identifies it. The key (as you 
> provided) consists of the following components: 
>
> 1. Namespace of the entity
> 2. The kind 
> 
>  
> of entity (categorized for queries)
> 3. An Identifier 
> 
>  
> for the individual entity (can be a key name string or a integer numeric 
> id.)
>
> I will be assuming that you are referring to the integer numeric id for 
> your question. 
>
> As far as having two of the same numeric ID's goes, indeed it is possible 
> and this can be done by having your application assign their own numeric 
> IDs manually to the entitles being created. However, as indicated in the 
> documentation here 
> ,
>  
> "there is nothing to prevent a Datastore mode database from assigning one 
> of your manual numeric IDs to another entity". You will have to implement 
> the *allocateids() 
> *method
>  
> within your application which will allow you to obtain a block of IDs in 
> order to avoid the conflict mentioned above.
>
> Also, since you mentioned that "Datastore is the one automatically 
> generating the ids", the documentation found here 
> 
>  states 
> that the "automatic ID generator will keep track of IDs that have been 
> allocated" and that Datastore "will avoid reusing them for another entity".
>
> Therefore to sum it all up. Yes, you can achieve the goal you want. 
> However, it would be a good idea to implement the best practices for it as 
> well such as: manually assigning Ids with implementing *allocateids() 
> *
> . 
>
> I hope this helps!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/58ed4348-39d1-4888-8b84-1fc2c45289e4%40googlegroups.com.


[google-appengine] Are datastore Ids unique across all namespaces?

2019-06-13 Thread NP
If I store an entity in the datastore within the context of a specific 
namespace, is it possible that the same id will occur in another namespace?

For example if I have   - 

Key(MODEL_NAME, 123456789, namespace=NS_1)

, is it possible for the datastore to also create a record such as

Key(MODEL_NAME, 123456789, namespace=NS_2)

where the id - 123456789 is appearing in more than 1 namespace?


Note that Datastore is the one automatically generating the ids.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/69a2d8cb-301e-49a9-890c-397f2068a00f%40googlegroups.com.


Re: [google-appengine] Re: Are wildcard subdomains and thousands of domains pointing to my domain supported?

2019-03-19 Thread NP
Hi,

Do you mind explaining how you do this?

Thanks

On Saturday, December 12, 2015 at 3:35:04 PM UTC-8, Jeff Schnitzer wrote:
>
> I run a whitelabeled ecommerce system on GAE with hundreds (and growing) 
> of custom domains. It can be done but there are a couple issues.
>
> 1) The onboarding process for each custom domain involves an extra "verify 
> your ownership of the domain to google" step. There does not appear to be 
> an API for this so it will involve handholding your partners through the 
> DNS configuration process.
>
> 2) The data on the "domains associated with your app" screen for your 
> project is wholly dependent on your *user account* and not the project 
> itself. This is batshit crazy insane. The only solution to preserve your 
> sanity is to create a fake user account and only ever touch the Custom 
> Domains screen using that fake user. 
>
> If you can live with a high-touch onboarding process, the benefits of GAE 
> outweigh the shortcomings WRT custom domains. If you're trying to run a 
> mass market solution like a public blog platform, GAE can't do it.
>
> Jeff
>
> On Fri, Dec 11, 2015 at 7:26 AM, Gitted > 
> wrote:
>
>> Hello,
>>
>> The application will run in my GAE account 100%.  The only thing I will 
>> have to ask the client to do if they want to use their own custom domain 
>> (or subdomain) is to point it to my GAE server via domain or ip-address.
>>
>> So to summarize:
>>
>> 1. My company will code the application and deploy to my own GAE account 
>> for the domain www.exampe.com
>> 2. The customers will choose their subdomain and then they can access the 
>> application at:  customer1.example.com
>> 3. If the customer wants to use their own domain, they will have to point 
>> their domain to my GAE domain/ip address.
>>They customer may point the domain e.g. www.customer1.com or they 
>> might create a subdomain like:  example.customer1.com
>>
>> SSL has to be supported for both cases #2 and #3, but for #3 they will 
>> get their own SSL certification I would imagine.
>>
>>
>> So my question is, is the above possible?  
>> If yes, do I have to make a API call to your DNS service or something for 
>> a subdomain or their own custom domain to allow the request to go through 
>> your load-balancers?
>> Is there a limit to the # of subdomains or domains?  Say I want 10,000 of 
>> them?
>>
>>
>> Thanks.
>>
>>
>>
>>
>>
>>
>> On Tuesday, December 8, 2015 at 12:00:10 PM UTC-5, Patrice (Cloud 
>> Platform Support) wrote:
>>>
>>> Hi,
>>>
>>> It is definitely a possibility, but it depends on what you're using to 
>>> host. Do you code applications for your users and then deploy on App 
>>> Engine, or do you simply host their data in a GCS bucket (or a GCE 
>>> instance)? 
>>>
>>> We'd need more information into what you are doing precisely. I think in 
>>> the meantime, this article 
>>> 
>>>  will 
>>> help out a bit.
>>>
>>> Cheers! 
>>>
>>> On Monday, December 7, 2015 at 11:47:04 AM UTC-5, Gitted wrote:


 Hi,

 If I want to build a SaaS application using appengine, all of my 
 customers would either be using a sub-domain or their own custom domain.

 Would this be something that app-engine could support?

 Say my service uses the domain example.com.

 My customers would then get their own subdomain like:

 https://customer1.example.com
 https://customer2.example.com


 Or they would use their own domain, and then point their domain to my 
 service like:

 http://example.customer-domain.com   points to http://example.com or 
 its ipaddress.


 Hope this makes sense and someone can answer this for me.

>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-appengi...@googlegroups.com .
>> To post to this group, send email to google-a...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/google-appengine.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/6a29d048-0750-4538-8aa5-5f6b0b82a0cf%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view 

[google-appengine] Re: Migrating GAE app stored user information to GAE Python 3.0 without Users API

2019-01-30 Thread NP
Hi George,

You said - .as in Google Identity Platform you are not supposed to use 
these IDs to validate user log-ins..

How then are you supposed to validate user log-ins using Google Identify 
Platform? GAE 2.7 User Object documentation specifically said that the User 
Id is stable and recommended storing that. I believe people then used it to 
validate logged in users. What is the recommended way for validating people 
in Google Identity Platform?

On Tuesday, January 29, 2019 at 3:26:11 PM UTC-8, George (Cloud Platform 
Support) wrote:
>
> Hello Marcel, 
>
> Documentation does not indicate restrictions on user ID's, you may check 
> "Getting profile information" page 
>  for related 
> details. You can choose IDs or pattern for IDs that might correlate to the 
> old App Engine IDs. This might not prove of any advantage in the end, as in 
> Google Identity Platform you are not supposed to use these IDs to validate 
> user log-ins. Same applies to emails and email variants such as 
> joh...@gmail.com  and jo...@gmail.com . You may 
> check the "Send the ID token to your server" on the "Authenticate with a 
> backend server" page 
> . 
>
> To reply to your second question, on the same documentation page you'll 
> notice that the get method for email profile.getEmail() does not allow for 
> multiple email values within the same user identity profile. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e9afe2bf-bc54-4271-b036-0023ffbf9097%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: What is the expected output for app_identity.get_default_version_hostname()

2019-01-16 Thread NP
Thanks for the response.

With regards to question 2, if the project is being deployed by different 
users (hence different domains), you wouldn't know the custom domain URL 
upfront. A work around is to have user enter the value, which then gets 
stored and then you read it. I just wanted to know if there was an API that 
provided this value directly so that I wouldn't be reinventing the wheel.


On Wednesday, January 16, 2019 at 1:44:38 PM UTC-8, George (Cloud Platform 
Support) wrote:
>
> In reply to your first question, you are right: 
> google.appengine.api.app_identity.app_identity.get_default_version_hostname() 
> gets the standard host name of the default version of the app. For example, 
> if your application_id is my-app, then the result might be 
> my-app.appspot.com. You may check this on the 
> "google.appengine.api.app_identity.app_identity module" page 
> 
> . 
>
> In what concerns question 2), there does not seem to be a compelling need 
> to programmatically obtain the custom name instead, as the standard host 
> name and the custom one point to the same site, and can be used 
> interchangeably. Mapping between custom ID has been performed by project 
> owners, and the information should be readily available, even if not by 
> means of an API call from your code. In other words, you are supposed to 
> know your custom domain URL already. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0f40e66d-bb48-4d68-a4e1-0366c28cebff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] What is the expected output for app_identity.get_default_version_hostname()

2019-01-15 Thread NP
Hello,

According to the App Identity documentation 


.By default, App Engine apps are served from URLs in the form 
http://.appspot.com, where the app ID is part of the hostname. 
If an app is served from a custom domain, it may be necessary to retrieve 
the entire hostname component. You can do this using the 
app_identity.get_default_version_hostname() method


However, when I print the output for 
app_identity.get_default_version_hostname(), it gives me 
http://.appspot.com.. not my custom domain. But if I look at 
my log files, the entry for host under the "protopayload" is my custom 
domain i.e. I see something like. 

protoPayload: {
@type: "type.googleapis.com/google.appengine.logging.v1.RequestLog"  
appEngineRelease: 
*appId: * 
cost: 1.16787e-7  
endTime: 
finished: true  
first: true  
*host: "*


My questions are

1) Does it mean app_identity.get_default_version_hostname() is not meant to 
give me my custom domain url?

2) If #1 is true, how do I programmatically determine the custom domain 
url? I don't want to hardcode it so that the same code can be used for 
different projects and different custom domain names

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/38fa3a38-4566-4905-a471-1a6867ecb651%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: GAE python 2.7 end of life

2019-01-09 Thread NP
Someone wrote a wrapper for the cloud datastore API - 
https://github.com/Bogdanp/anom-py. I haven't used it myself so can't 
comment.


On Wednesday, January 9, 2019 at 12:31:46 PM UTC-8, Blaine Garrett wrote:
>
> I asked this in a different thread, but I wonder if anyone has tried to 
> port the ndb package as a standalone python 3 package.
> Thus far, in my experiments, once I got the datastore emulator running 
> locally, converting the consumption of the datastore apis from ndb to 
> native objects has been the biggest pain. I have not tried converting my 
> deferred tasks, etc.
>
> Source code for the ndb package
>
> https://cloud.google.com/appengine/docs/standard/python/refdocs/modules/google/appengine/ext/ndb/model
>
> ~ Blaine
>
>
> On Wednesday, January 9, 2019 at 12:07:44 PM UTC-6, Rahul Ravindran wrote:
>>
>> Google has a policy of a one year deprecation policy for any GA runtime. 
>> Given that nothing has been announced yet, please know that your 
>> application will continue running for at least a year and that will be the 
>> *minimum 
>> *period for you to need to do anything. 
>>
>> I apologize on being very brief around this at this point, but there are 
>> discussions going on. Stay tuned for longer term guidance around this issue.
>>
>> ~Rahul.
>>
>> On Wed, Jan 9, 2019 at 6:47 AM bFlood  
>> wrote:
>>
>>> its not the incompatibility of python (language/runtime), its missing 
>>> services with regard to GAE Standard 2.7 and GAE Standard 3.0. (memcache, 
>>> NDB, Search, Images, Users, webapp2, etc). Are these going to be duplicated 
>>> in GAE3? and if so, will existing data and model definitions in the 2.7 
>>> datastore work in 3? 
>>>
>>> it looks like some work is being done for this but it would be great to 
>>> know officially what Google plans for this upgrade process. how much code 
>>> will need to change? 
>>>
>>> https://github.com/googleapis/google-cloud-python/issues?q=NDB+sort%3Aupdated-desc
>>>
>>> also, generally what do you mean by "not directly affected on an 
>>> immediate time frame"? a year, 2 years, 5 years before 2.7 apps stop 
>>> running? 
>>>
>>>
>>>
>>>
>>> On Wednesday, January 9, 2019 at 9:32:36 AM UTC-5, George (Cloud 
>>> Platform Support) wrote:
>>>>
>>>> You are perfectly right, NP. Python 3 is made incompatible with 2, and 
>>>> Python 3 does not support quite a few features, and will require effort to 
>>>> re-program your app in an alternative manner. I was simply saying that 
>>>> often the effort is not enormous, and becomes worthwhile on the longer 
>>>> term. 
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Google App Engine" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to google-appengi...@googlegroups.com.
>>> To post to this group, send email to google-a...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/google-appengine.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/google-appengine/8f45b06f-0852-4e46-9331-c3ebdbe3e481%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/google-appengine/8f45b06f-0852-4e46-9331-c3ebdbe3e481%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a44838dd-d2db-4547-8f4c-fb8973e99ca4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE python 2.7 end of life

2019-01-08 Thread NP
Hi, 

You said - *The effort involved is not necessary enormous in each case, in 
a lot of cases this might take minutes.*

I beg to differ. There are a significant number of things which are not 
supported in Python 3 and will require effort to find/deploy alternatives. 
These include ndb ORM, Search, Images service, etc

On Tuesday, January 8, 2019 at 1:29:55 PM UTC-8, George (Cloud Platform 
Support) wrote:
>
> The mentioned date is the end of support. Already deployed apps are not 
> directly affected on an immediate time frame. On a longer term 
> though, you'll have to migrate your code to Python 3 or delete it. The 
> effort involved is not necessary enormous in each case, in a lot of cases 
> this might take minutes. If you foresee, by contrast, considerable effort 
> to migrate to Python 3, you should contact support and ask for specific 
> help and possible transitional arrangements. Advice and custom-made tools 
> should be expected, to alleviate the effort required by migration tasks. 
> Most Python developers prefer Python 3, and there are considerable 
> advantages in following suit. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/de8bf857-202c-4b69-93f5-fcbabc6f465e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: my custom domain name is not working on google app engine.

2019-01-07 Thread NP
Can you explain what you mean by - not working on Google App Engine?

For example, were you able to add it to the Custom Domains tab on your 
console? Were you able to verify ownership of the domain?

Put another way, did you follow the steps in this documentation 

 
but you encountered an error? If so, on which step did you get an error and 
what is the error?



On Monday, January 7, 2019 at 6:13:22 AM UTC-8, Nathan Lei wrote:
>
> my custom domain name is not working on google app engine.  .
>
> my default domain which google provided is working fine, but my custom 
> domain name is not working,  I did anything what they say tried 3 
> different domain name!  
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/49da6618-a801-4d03-ac5a-1e74f6e244b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Is it possible to detect when a Google App Engine Instance starts (via a method, API, or some call or event to monitor)

2019-01-05 Thread NP
Thanks for the suggestion. I'll keep this to use as a worst case scenario 
because there are limitations to using warm-up requests - the link you sent 
me has this

.
*Note that warmup requests are not guaranteed to be called. In some 
situations loading requests are sent instead: for example, if the instance 
is the first one being started up, or if there is a steep ramp-up in 
traffic.*


As a result, you might encounter loading requests, even if warmup requests 
are enabled in your app. For example, if your app is serving no traffic, 
the first request to the app will always be a loading request, not a warmup 
request.
.


On Saturday, January 5, 2019 at 11:09:27 AM UTC-8, Vitaly Bogomolov wrote:
>
> Hi, NP.
>
> You can use warmup requests for this task:
>
> https://cloud.google.com/appengine/docs/standard/go/configuring-warmup-requests
>
> WBR, Vitaly.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/405fd967-1096-4018-8634-9d6d605a5cd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Is it possible to detect when a Google App Engine Instance starts (via a method, API, or some call or event to monitor)

2019-01-05 Thread NP
Hello,

When my application (instance) starts, I'd like to check the datastore and 
seed some values if they do not exist. I'd like to make this check only 
when the application (instance) starts. Is there a way to know when an 
instance is started/restarted?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/2f708cfe-4c32-4f7c-b77c-c6b4aede69e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Unable to verify domain registered on Fatcow

2018-01-17 Thread NP
Thanks Vick,

My friend followed up with fatcow and finally got the issue resolved (took 
some time though).

On Monday, January 15, 2018 at 6:20:34 PM UTC-8, Vick Khera wrote:
>
>
>
> On Monday, January 15, 2018 at 8:48:42 PM UTC-5, NP wrote:
>>
>> Hi Vick,
>>
>> I just tried (using https://www.digwebinterface.com and 
>> https://toolbox.googleapps.com/apps/dig/) and they both don't return the 
>> values that I created for Google.
>>
>> I just noticed that Fatcow control panel has a tab for 'Pointers' and it 
>> shows the domain as 'Parked'. Do you know if this could be the cause of 
>> this issue?
>>
>>
> I don't know their definition of "parked" but when I have used that in the 
> past I intended it to mean that it has no data of its own and just sits 
> there with an empty zone. It sounds like the DNS is not published for that 
> zone, which is exactly why it cannot be verified. Time to call fatcow 
> support and get them to tell you how to set up DNS records.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/58adc204-8ba5-40a5-b49a-dcbbabeb5687%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Unable to verify domain registered on Fatcow

2018-01-15 Thread NP
Hi Vick,

I just tried (using https://www.digwebinterface.com 
and https://toolbox.googleapps.com/apps/dig/) and they both don't return 
the values that I created for Google.

I just noticed that Fatcow control panel has a tab for 'Pointers' and it 
shows the domain as 'Parked'. Do you know if this could be the cause of 
this issue?



On Monday, January 15, 2018 at 12:16:58 PM UTC-8, Vick Khera wrote:
>
> On Monday, January 15, 2018 at 1:23:50 PM UTC-5, NP wrote:
>>
>> Hello,
>>
>> A friend registered a domain on Fatcow and is trying to map this to an 
>> App Engine Project. The first step in adding a custom domain name says to 
>> verify the domain. She has tried both the TXT and CNAME methods and it's 
>> been 2 days but webcentral still says it is unable to verify the domain. 
>> Anybody know how to solve this issue?
>>
>
> Can you manually verify either from another host? ie, can you look up the 
> DNS name using nslookup or dig or some equivalent tool? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e0da5338-534c-4c76-a3f9-b30b4c684a03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Unable to verify domain registered on Fatcow

2018-01-15 Thread NP
Hello,

A friend registered a domain on Fatcow and is trying to map this to an App 
Engine Project. The first step in adding a custom domain name says to 
verify the domain. She has tried both the TXT and CNAME methods and it's 
been 2 days but webcentral still says it is unable to verify the domain. 
Anybody know how to solve this issue?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/087b8061-48f8-41dd-aba1-198703a90cba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: image downloaded with images.get_serving_url() should default to a pre-defined name

2017-06-26 Thread NP
I thought get_serving_url was recommended because it wouldn't count against 
your bandwidth and usage. Are you saying if one is not resizing or offering 
the image at different resolutions, it is best to use the direct link to 
the cloud storage - the one of the form - storage.googleapis.com/**
/[**]?

On Friday, June 23, 2017 at 1:54:43 PM UTC-7, George (Cloud Platform 
Support) wrote:
>
> It depends, whether you need the image to be served at different 
> resolution, or not. If your purpose is to offer an image for download, you 
> could rather organize a link to cloud storage. You can gather more detail 
> from the "Request URIs" online document 
> . This is 
> one easier solution possible. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ca5a2634-abc1-4d61-9e7c-0c4f4fd13ee0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: image downloaded with images.get_serving_url() should default to a pre-defined name

2017-06-21 Thread NP
Hi,

Thanks for your response.

get_serving_url requires either a blobkey or an image name. I'm currently 
supplying a blob key. Are you saying, I should replace the blobkey with the 
image name?

On Wednesday, June 21, 2017 at 10:13:39 AM UTC-7, George (Cloud Platform 
Support) wrote:
>
> What is the whole get_serving_url line you refer to? 
>
> There is a filename parameter you may use with the get_serving_url 
> command, as documented in the "google.appengine.api.images package" online 
> document 
> 
> . 
>
> You may customize by other means the "save as" dialog on your page, for 
> instance in JavaScript, using the filename information. 
>
> The replies to the "Clear example of using Google App Engine Images 
> get_serving_url()" question 
> 
>  
> in stackoverflow should be useful as background reading. 
>
> Any extra details on your use of the Images API might prove highly 
> relevant.  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/d1df25b0-ddd6-4d6f-8fa3-14f63c6b1629%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] image downloaded with images.get_serving_url() should default to a pre-defined name

2017-06-20 Thread NP
I'm currently using app engine images API and to serve images that I've 
saved, I call 

images.get_serving_url(blobkey


I want my users to be able to click on the download link I give them and 
for the file to automatically download with the filename I've already 
predefined but because of the 'same origin' policy, this is currently not 
happening.

In addition, if you open the link and then right click to save the image, 
it doesn't default to my predefined file name. So my question is - is it 
possible to default a name in the 'save as' dialog for urls retrieved with 
images.get_serving_url()?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ee4092a0-614f-4bde-9e80-12c88fae6b4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Unable to get TLS 1.2 working on Mac OS

2017-06-14 Thread NP
I figured out the problem and my understanding is

1) GAE was still referring to the old python installation (the one that 
comes shipped with Mac). When I open the GAE Launcher,  

GAE > Preferences > Python Path is blank.


2) What I needed to do was force GAE to use the newly installed Python (the 
one I installed with Brew with the direction to use the upgraded OpenSSL). 
So I have now set

GAE > Preferences > Python Path = /usr/local/bin/python.


Everything now works and running the code below from within GAE tells me my 
TLS is OKAY


import urllib2

r = urllib2.urlopen("https://howsmyssl.com/;).read()

return r

Also running the code below now gives me the updated version of OpenSSL
 import ssl 
return ssl.OPENSSL_VERSION 

On Wednesday, June 14, 2017 at 9:52:46 AM UTC-7, NP wrote:
>
> Can anybody help out here?
>
> Thanks
>
> On Tuesday, June 13, 2017 at 9:30:20 AM UTC-7, NP wrote:
>>
>> 1) I'm running Google App Engine SDK on Mac OS X El Capitan. I have 
>> Python 2.7.13
>>
>>
>> 2) While trying to test my app with Stripe, I get the following error
>>
>>  Request req_ApPsfecKnLFJxb: Stripe no longer supports API requests 
>> made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later. 
>> You can learn more about thisat 
>> https://stripe.com/blog/upgrading-tls.
>>
>>
>> 3) I did some Googling and based on what I found, I did the following
>>
>>
>>-  Used brew to upgrade my OpenSSL
>>- Confirmed that when I do 'which openssl', I get
>>
>>  /usr/local/opt/openssl/bin/openssl
>>
>>  and when I do 'openssl version', I get
>>
>> OpenSSL 1.0.2l
>>
>>
>>
>>- If I do
>>
>>>>> import ssl
>>
>>   >>> ssl.OPENSSL_VERSION, I get
>>
>>   >>> 'OpenSSL 1.0.2l 23 May 2017'
>>
>>
>> But I still get the error from Stripe about not using TLS 1.2.
>>
>>
>> I found this SO question 
>> <https://stackoverflow.com/questions/42566809/enable-tls-1-2-on-mac-osx> but 
>> it didn't solve my problem. I also found this Google Group Discussion 
>> <https://issuetracker.google.com/issues/35900856> and after running the 
>> steps in #5, it shows app engine is still pointing to the old version of 
>> OPENSSL because the output shows 'OpenSSL 0.9.8zh 14 Jan 2016'
>>
>>
>> 4) Based on the earlier referenced Google Group Discussion, I ran the 
>> following code in both GAE Dev and directly in my python intepreter
>>
>>
>> import ssl 
>>
>> print ssl.__file__ 
>>
>>
>>
>> GAE DEV: 
>> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc
>>
>>
>> Python Interpreter: 
>> /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc
>>
>>
>>
>> They're pointing to different files. How do I fix this? How do I get App 
>> Engine to use the newer version of OpenSSL that I've installed?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6d04eaa0-9b57-46e9-8c5a-223d5e354d58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Unable to get TLS 1.2 working on Mac OS

2017-06-14 Thread NP
When you say python path, do you mean?

>>> python
>>> import sys
>>> sys.path



On Wednesday, June 14, 2017 at 10:41:48 AM UTC-7, Brian de Alwis wrote:
>
> Do you have a PYTHONPATH, PYTHONSTARTUP, or PYTHONHOME?
>
> Probably worth trying to launch your python with `-v -v -v` and see where 
> it's loading its files from.
>
> On 14-Jun-2017, at 12:52 PM, NP <neara...@gmail.com > wrote:
>
> Can anybody help out here?
>
> Thanks
>
> On Tuesday, June 13, 2017 at 9:30:20 AM UTC-7, NP wrote:
>>
>> 1) I'm running Google App Engine SDK on Mac OS X El Capitan. I have 
>> Python 2.7.13
>>
>>
>> 2) While trying to test my app with Stripe, I get the following error
>>
>>  Request req_ApPsfecKnLFJxb: Stripe no longer supports API requests 
>> made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later. 
>> You can learn more about thisat 
>> https://stripe.com/blog/upgrading-tls.
>>
>>
>> 3) I did some Googling and based on what I found, I did the following
>>
>>
>>-  Used brew to upgrade my OpenSSL
>>- Confirmed that when I do 'which openssl', I get
>>
>>
>>  /usr/local/opt/openssl/bin/openssl
>>
>>  and when I do 'openssl version', I get
>>
>> OpenSSL 1.0.2l
>>
>>
>>
>>
>>- If I do
>>
>>
>>>>> import ssl
>>
>>   >>> ssl.OPENSSL_VERSION, I get
>>
>>   >>> 'OpenSSL 1.0.2l 23 May 2017'
>>
>>
>> But I still get the error from Stripe about not using TLS 1.2.
>>
>>
>> I found this SO question 
>> <https://stackoverflow.com/questions/42566809/enable-tls-1-2-on-mac-osx> but 
>> it didn't solve my problem. I also found this Google Group Discussion 
>> <https://issuetracker.google.com/issues/35900856> and after running the 
>> steps in #5, it shows app engine is still pointing to the old version of 
>> OPENSSL because the output shows 'OpenSSL 0.9.8zh 14 Jan 2016'
>>
>>
>> 4) Based on the earlier referenced Google Group Discussion, I ran the 
>> following code in both GAE Dev and directly in my python intepreter
>>
>>
>> import ssl 
>>
>> print ssl.__file__ 
>>
>>
>>
>> GAE DEV: 
>> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc
>>
>>
>> Python Interpreter: 
>> /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc
>>
>>
>>
>> They're pointing to different files. How do I fix this? How do I get App 
>> Engine to use the newer version of OpenSSL that I've installed?
>>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to google-appengi...@googlegroups.com .
> To post to this group, send email to google-a...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-appengine/f8b1c84a-5799-479a-b4c0-1867ba10cbb2%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/google-appengine/f8b1c84a-5799-479a-b4c0-1867ba10cbb2%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a13e19f1-84a1-4932-a56c-ee1d246934ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Unable to get TLS 1.2 working on Mac OS

2017-06-14 Thread NP
Can anybody help out here?

Thanks

On Tuesday, June 13, 2017 at 9:30:20 AM UTC-7, NP wrote:
>
> 1) I'm running Google App Engine SDK on Mac OS X El Capitan. I have Python 
> 2.7.13
>
>
> 2) While trying to test my app with Stripe, I get the following error
>
>  Request req_ApPsfecKnLFJxb: Stripe no longer supports API requests 
> made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later. 
> You can learn more about thisat 
> https://stripe.com/blog/upgrading-tls.
>
>
> 3) I did some Googling and based on what I found, I did the following
>
>
>-  Used brew to upgrade my OpenSSL
>- Confirmed that when I do 'which openssl', I get
>
>  /usr/local/opt/openssl/bin/openssl
>
>  and when I do 'openssl version', I get
>
> OpenSSL 1.0.2l
>
>
>
>- If I do
>
>>>> import ssl
>
>   >>> ssl.OPENSSL_VERSION, I get
>
>   >>> 'OpenSSL 1.0.2l 23 May 2017'
>
>
> But I still get the error from Stripe about not using TLS 1.2.
>
>
> I found this SO question 
> <https://stackoverflow.com/questions/42566809/enable-tls-1-2-on-mac-osx> but 
> it didn't solve my problem. I also found this Google Group Discussion 
> <https://issuetracker.google.com/issues/35900856> and after running the 
> steps in #5, it shows app engine is still pointing to the old version of 
> OPENSSL because the output shows 'OpenSSL 0.9.8zh 14 Jan 2016'
>
>
> 4) Based on the earlier referenced Google Group Discussion, I ran the 
> following code in both GAE Dev and directly in my python intepreter
>
>
> import ssl 
>
> print ssl.__file__ 
>
>
>
> GAE DEV: 
> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc
>
>
> Python Interpreter: 
> /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc
>
>
>
> They're pointing to different files. How do I fix this? How do I get App 
> Engine to use the newer version of OpenSSL that I've installed?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f8b1c84a-5799-479a-b4c0-1867ba10cbb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Is Google App Engine Launcher being deprecated? Why??

2017-06-14 Thread NP
I had some issues with TLS and had to upgrade my SDK version which was when 
I realized it was no longer the default.

It is really sad that Google is de-prioritizing the launcher. The whole aim 
of App Engine was to get someone who is only fairly technical or knows how 
to program in high level languages without knowledge of Unix/command based 
issues, up and running. I was so confused and frustrated the first time I 
tried to use Compute Engine that I quickly went back to App Engine. I've 
also been able to sell a bunch of people on using Google Cloud by telling 
them they could easily try out their ideas via App Engine which is like 
'plug and play'.

Overall, it seems to me that Google has been making decisions that only 
meets the needs of their 'more technical' user base while ignoring the less 
technical folks. I don't know if they have data to back up this belief that 
they have more users in the former group or that the latter group are 
insignificant. But it looks to me that I should start looking for other 
cloud platforms because it is becoming more difficult to rely on Google 
cloud (they've also had frequent changes in their API and products)

On Thursday, December 8, 2016 at 11:48:35 AM UTC-8, Hannes Rydén wrote:
>
> I've been developing sites for App Engine Python for years and have always 
> loved the Google App Engine Launcher client for Windows. It makes 
> developing and publishing websites a breeze, compared to most other web 
> server software.
>
> Now I wanted to install the latest version, clicked the download button as 
> usual but were then lead to install the Cloud SDK client instead. So I did. 
> But gone was the simple graphical interface, and I was met with a confusing 
> terminal interface instead, which seemed much more limited in functionality 
> (can I even have multiple sites running at the same time on different 
> ports?). I can't even find how to start the program again after I shut it 
> down.
>
> I finally found the old client download, which was hard to find without 
> reading forums. Why would you recommend users to use a clearly inferior 
> product in terms of usability? I think that will deter many new users from 
> developing on App Engine.
>
> I think it would be much better if you make the old Launcher the 
> recommended tool for App Engine instead, and provide the Cloud SDK an 
> alternative. I really love App Engine, so that's why I'm sad to see when 
> some new changes seem to make it worse (which is usually not the case, as 
> you've been making some great changes over the years).
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/5a325d9c-7ef6-41c6-95d3-c38faa5aca69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Unable to get TLS 1.2 working on Mac OS

2017-06-13 Thread NP


1) I'm running Google App Engine SDK on Mac OS X El Capitan. I have Python 
2.7.13


2) While trying to test my app with Stripe, I get the following error

 Request req_ApPsfecKnLFJxb: Stripe no longer supports API requests 
made with TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or later. 
You can learn more about thisat 
https://stripe.com/blog/upgrading-tls.


3) I did some Googling and based on what I found, I did the following


   -  Used brew to upgrade my OpenSSL
   - Confirmed that when I do 'which openssl', I get
   
 /usr/local/opt/openssl/bin/openssl

 and when I do 'openssl version', I get

OpenSSL 1.0.2l



   - If I do
   
   >>> import ssl

  >>> ssl.OPENSSL_VERSION, I get

  >>> 'OpenSSL 1.0.2l 23 May 2017'


But I still get the error from Stripe about not using TLS 1.2.


I found this SO question 
 but 
it didn't solve my problem. I also found this Google Group Discussion 
 and after running the 
steps in #5, it shows app engine is still pointing to the old version of 
OPENSSL because the output shows 'OpenSSL 0.9.8zh 14 Jan 2016'


4) Based on the earlier referenced Google Group Discussion, I ran the 
following code in both GAE Dev and directly in my python intepreter


import ssl 

print ssl.__file__ 



GAE DEV: 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc


Python Interpreter: 
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc



They're pointing to different files. How do I fix this? How do I get App 
Engine to use the newer version of OpenSSL that I've installed?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f7852c12-254b-4df6-9bf3-d07a0e46ff73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: What triggers a call to channel disconnect (i.e. /_ah/channel/disconnected) when you are using Google Channels API?

2016-12-10 Thread NP
Thanks George.

On Friday, December 9, 2016 at 8:18:52 AM UTC-8, George (Cloud Platform 
Support) wrote:
>
> There is no doubt about the fact that browser disconnect is unreliable and 
> difficult to trace in real time. The level of inconsistency and the 
> particularities of possible disconnection detection differ from a browser 
> to another. 
>
>
> A heartbeat script causes the web browser to send a signal to the server 
> at regular intervals to advise that a page from that server is still being 
> displayed. There are numerous examples to be found, with various 
> implementations  of the 
> heartbeat principle. 
>
> Detecting that a channel is still alive, as sketched above, is different 
> from trying to keep it alive by programmatic means. Sending regular signals 
> from the server might not help when a token expires, to name an example. 
> You need to decide what architecture suits best your needs. 
>
> Firebase Database pricing might seem high at a first look, but one has to 
> to take into consideration the total usage volume planned. In comparison to 
> other solutions, it may prove advantageous in that context. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f5459d80-a67c-41a8-bc78-0ef50af13178%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: What triggers a call to channel disconnect (i.e. /_ah/channel/disconnected) when you are using Google Channels API?

2016-12-10 Thread NP
Nick,

You said --- If you want to drive behavior, I'd rely on the client making 
requests based on the js callbacks for onclose and onerror.Thanks for 
that tip. It has given me a gem of an idea.

You also said Channels only last about 20 minutes. I was under the 
impression that when you create a channel, you can specify a time limit up 
to 24 hours. Are you saying this is incorrect or this is for something else?

On Friday, December 9, 2016 at 3:21:54 PM UTC-8, Nick wrote:
>
> Managing the connection on the client side is not as simple as the server. 
> The following may be useful:
>
> The dev server simulates channels by polling, so it isn't a great guide 
> for how it works in the live environment.
>
> Channels only last about 20 minutes. On the client, pull get the js error 
> callback, just establish a new connection and continue. If this seems to 
> have some issues, there are some hacks published to stack overflow that 
> seem to make reconnecting more reliable.
>
> Disconnect is mostly reliable, but it's probably only useful for cleaning 
> up data on the server. If you want to drive behavior, I'd rely on the 
> client making requests based on the js callbacks for onclose and onerror.
>
> Once you client side and server side code is bedded down it's very 
> reliable and robust.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/b5fefd36-e92c-4d00-bb94-20c935e92cd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: What triggers a call to channel disconnect (i.e. /_ah/channel/disconnected) when you are using Google Channels API?

2016-12-08 Thread NP
Hi George,

Thanks for your response. Yes, I'm aware that Channels API will be turned 
off in October, but since I had already started working with Channels API 
before the announcement came, I wanted to quickly finish the development 
using Channels and see if I'm able to meet my functionalities. In addition, 
I briefly checked out the Firebase Database and it seems it is more 
expensive than the Channels API so I'm going to take some time to decide if 
I still want to move over to it.

So far, I feel like the calls to disconnect and connect are not reliable or 
maybe I'm the one not using it correctly. Instead of waiting for a 
hearbeat-signal from the browser, if I send one from the server (like a 
keep-alive signal) every few seconds (2 -3 secs), will that serve to keep 
the connection alive?

On Thursday, December 8, 2016 at 2:51:03 PM UTC-8, George (Cloud Platform 
Support) wrote:
>
> The disconnect detection is performed by a Web Connection Server. 
>
> There is no agreed-upon error-free detection strategy for a disconnection 
> in the browser. To determine that a channel has been disconnected, one has 
> to rely to a set of different methods for getting informed faster. These 
> methods all ultimately rely on a "heartbeat" approach, whereby the browser 
> is expected to provide a "heartbeat"-type signal within a fixed cycle. If 
> one doesn't receive any heartbeat signal for some time, the assumption is 
> that the browser got meanwhile disconnected. Based on the needs of the 
> individual application, the rhythm of the heartbeat can be tuned 
> satisfactorily. 
>
> Different browsers behave differently when a disconnection occurs, so a 
> generally valid notification method has to be implemented following the 
> above guidelines, effective for all browser models. 
>
> It is important to keep in mind that support for the Channel API will be 
> turned off  
> on October 31, 2017. The better product to replace the Channel API is the 
> Firebase 
> Database . 
>
> For certain applications, Firebase Cloud Messaging would be the 
> appropriate solution, as an alternative to some of the Channel API 
> functions. For your purpose in particular, managing presence 
>  
> would be the one important feature of Firebase. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/1efa5ad8-9814-45f1-bc52-9e767a96c4a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: What triggers a call to channel disconnect (i.e. /_ah/channel/disconnected) when you are using Google Channels API?

2016-12-08 Thread NP
Thanks for the response. 

My experience so far has been that the disconnect/connect has been 
unreliable. I noticed sometimes that if I refresh my page, I see a connect 
action in the logs without a disconnect entry at all or sometimes the 
disconnect comes after it.

I've also noticed that sometimes when I have the tab open for a while but 
no messages are coming in, I see a disconnect in the log. My assumption had 
been that once I made the connection to the channel and it hadn't expired, 
I shouldn't see a disconnect if I do not navigate away from the page.

On Thursday, December 8, 2016 at 1:36:10 PM UTC-8, Nick wrote:
>
> It's supposed to be called when the channel is disconnected (I know, 
> right?).
>
> Typically this will be the browser session ending (window close or 
> navigate away), but also the client disconnecting using the js api.
>
> Disconnected and connected aren't actually called from the client, they're 
> basically webhooks from the channel infrastructure, they seem pretty 
> reliable.
>
> If disconnected gets called, I would take that as the channel token is no 
> longer valid, so even if the client is still there it should create a new 
> channel. Make sure you put an exponential backoff on that operation, a 
> simple bug there can overwhelm your servers with even a small number of js 
> clients.
>
> You probably know channels were  recently deprecated, so if you're just 
> starting now it might be better to turn to firebase or a saas alternative.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/fdfd9c1e-c8e8-4aaa-a563-8760749a49ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] What triggers a call to channel disconnect (i.e. /_ah/channel/disconnected) when you are using Google Channels API?

2016-12-07 Thread NP
Hi,

I'm using Google Channels API and have setup the handlers for channel 
connect and disconnect. However, I still don't know all the conditions 
which can trigger a channel disconnect (i.e. a call to 
/_ah/channel/disconnected). Can anybody help out?

Thanks 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/12fed4cc-630c-4dcf-864a-535f8c259369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Does Tweepy Streaming API work on Google App Engine?

2016-08-25 Thread NP


I'm trying to use the Tweepy Library to follow a user. This means using the 
Streaming API. I'm using the Google App Engine SDK release: "1.9.40". 
Everything works on my Dev server but when I deploy to Production, it stops 
working. I don't get an error.

Basically what is happening is - the code I have in on_status is not being 
triggered i.e. my app seems not to be listening to the on_status event. I 
added a checkpoint and it is not being printed to the log file. But on Dev, 
it is being triggered.


def on_status(self, status):
decoded = json.loads(status)
logger.info(decoded) # Checkpoint


Am I doing something wrong or is this not supported in App Engine?  And if 
it is not supported, how come it works on the Dev env? Finally, what are my 
alternatives?


Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f09f0525-315a-4564-bdb8-ca59cb976c23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Ignoring invalid login cookie: true

2016-08-04 Thread NP
In addition, I just noticed that I can't sign in again as administrator in 
development server for URLs that were secured in app.yaml using #  login: 
admin

Previously, I would get a popup with email - t...@example.com and a 
checkbox saying 'sign in as administrator' and ticking this would emulate 
my signing in as an administrator. This is no longer working

On Thursday, August 4, 2016 at 10:18:28 PM UTC-7, NP wrote:
>
> Hello,
>
>
> Since upgrading to GAE release: "1.9.40", I now the see entry below in my 
> log console (development server)
>
>
> >>>>>>> WARNING  2016-08-05 05:04:05,754 login.py:99] Ignoring invalid 
> login cookie: true <<<<<<
>
>
> This wasn't showing up before I did the migration to 1.9.40. Anybody know 
> what this means?
>
>
> I searched for login.py (this is an app engine file) and I couldn't find 
> the message in the file
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/669cc08c-736c-491f-8863-c6a5d485ae44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Ignoring invalid login cookie: true

2016-08-04 Thread NP
 

Hello,


Since upgrading to GAE release: "1.9.40", I now the see entry below in my 
log console (development server)


>>> WARNING  2016-08-05 05:04:05,754 login.py:99] Ignoring invalid 
login cookie: true <<


This wasn't showing up before I did the migration to 1.9.40. Anybody know 
what this means?


I searched for login.py (this is an app engine file) and I couldn't find 
the message in the file


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/c3856264-e3c7-4bdf-9f4c-71f3afe1a02c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Can I restrict access to my site from specific domains?

2015-12-16 Thread NP
Thanks everybody for your suggestions. I will look into them all and try to 
figure out the best way forward.

>From a functional perspective, I'm not currently looking at a Denial of 
Service attack (I guess that can only possibly come if I've become very big 
/successful or if it comes from a nefarious website in which case I can use 
the DOS.yaml file). I'm more worried about someone signing up for my 
service and then inexplicably violating the terms and agreements which 
would then lead me to 'suspending' the person's account from my side. Being 
that this is a new business/service, I'm trying to make sure that I don't 
incur any unnecessary expense. In this case, that would be bearing the cost 
of a suspended client's thousands of users hitting my servers.



On Tuesday, December 15, 2015 at 2:39:47 PM UTC-8, NP wrote:
>
> Hello all,
>
> I'm working on a design (in python) where my users will embed a piece of 
> javascript code on their website. This javascript code will call my 
> application which then provides service to my users. An example of this 
> approach is signing up for Google Analytics or Google Ads. Google gives you 
> a piece of javascript code which you embed on your website and when users 
> load your page, the javascript code calls Google Servers.
>
> I'm trying to figure out what to do if a user is no longer using my 
> service but forgets to delete the javascript code from their pages. Is 
> their a way to prevent such sites from accessing my site without incurring 
> a hit on my server? The option I can think of right now is to have my code 
> catch the request and then throttle it but that still involves a hit to my 
> server and if my client's website is being accessed by thousands of users, 
> the hits to my server becomes considerable.
> I know that Google App engine has a Denial of Service Protection but as 
> far as I know, this works only for IP address. 
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a3085820-25dd-42a8-b773-a98131b70539%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Can I restrict access to my site from specific domains?

2015-12-15 Thread NP
Hello all,

I'm working on a design (in python) where my users will embed a piece of 
javascript code on their website. This javascript code will call my 
application which then provides service to my users. An example of this 
approach is signing up for Google Analytics or Google Ads. Google gives you 
a piece of javascript code which you embed on your website and when users 
load your page, the javascript code calls Google Servers.

I'm trying to figure out what to do if a user is no longer using my service 
but forgets to delete the javascript code from their pages. Is their a way 
to prevent such sites from accessing my site without incurring a hit on my 
server? The option I can think of right now is to have my code catch the 
request and then throttle it but that still involves a hit to my server and 
if my client's website is being accessed by thousands of users, the hits to 
my server becomes considerable.
I know that Google App engine has a Denial of Service Protection but as far 
as I know, this works only for IP address. 

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/5e88c15c-5270-4d51-b8c7-2f3f6ab3b5e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Can I restrict access to my site from specific domains?

2015-12-15 Thread NP
Hi Anastasios,

Thanks for your response. I currently have a variation of what you 
suggested. I have list of 'paused' sites and the JS call to my application 
includes the domain name of the website. When the JS call comes in, my 
handler first checks if it's in the list of 'paused' sites and if so, it 
terminates with a 403 error. I ran some testing with a user whose page is 
viewed about 40,000 times a day. This basically means at least 40,000 hits 
to my instance. I worry that this is a big number especially if this 
happens with multiple sites. This is why I was wondering if there's any way 
to prevent access to my site.

You also suggested - 

   - Since it seems to be your own JS code: see if you can gracefully 
   handle the Over-Quota error or the Indefinite-Terminate errors *and 
   cache the result, so the JS client will not send subsequent requests and 
   cause unnecessary resources*


Can you explain the part in bold?

Thanks
NP

On Tuesday, December 15, 2015 at 3:30:41 PM UTC-8, Anastasios Hatzis wrote:
>
> Hi NP,
>
> just a few thoughts:
>
>- I agree that ddos.yaml won't help you in your case, especially if IP 
>addresses change consistently
>- Provider per-user API keys that must be used by the javascript code 
>for each request
>- In your GAE app, the API request handlers should first check for the 
>API key and immediately terminate with a specific HTTP status code and 
>error message that communicate to the JS client that the AP key is 
>temporarily over quota or terminated indefinitely; make this part as 
>efficient as possible, so you loose as little instance runtime as possible
>- Since it seems to be your own JS code: see if you can gracefully 
>handle the Over-Quota error or the Indefinite-Terminate errors and cache 
>the result, so the JS client will not send subsequent requests and cause 
>unnecessary resources
>- I guess, your app will also receive the original host-name that 
>hosted the JS code, so you could store the host-name (and API key?); 
>automatically email or contact the user that registered the host or API 
> key 
>to inform about troubleshooting steps
>- I'm not sure if it is possible to have the JS code delivered by your 
>app (with API keys validation), so there will be just a 404 if the API key 
>is over-quote / terminated; but eventually cross-site scripting 
>vulnerability would prevent this; I hope someone with more experience in 
> JS 
>can shed some light on this
>- If you expect that too many users will not remove the JS code even 
>after the API key has expired, you might consider if there is anything you 
>could add to the JS code, that in this case, the users of that site will 
>have an experience that will have the site operator be cooperative (e.g. 
>blanking the page, or showing a huge red warning modal); that might be 
> very 
>dangerous though (for example if there is an error in your client code or 
>server code or there is a temporary outage etc. you would make your users 
>very angry or maybe you will be accountable for damages)
>
>
> On Tuesday, December 15, 2015 at 11:39:47 PM UTC+1, NP wrote:
>>
>> Hello all,
>>
>> I'm working on a design (in python) where my users will embed a piece of 
>> javascript code on their website. This javascript code will call my 
>> application which then provides service to my users. An example of this 
>> approach is signing up for Google Analytics or Google Ads. Google gives you 
>> a piece of javascript code which you embed on your website and when users 
>> load your page, the javascript code calls Google Servers.
>>
>> I'm trying to figure out what to do if a user is no longer using my 
>> service but forgets to delete the javascript code from their pages. Is 
>> their a way to prevent such sites from accessing my site without incurring 
>> a hit on my server? The option I can think of right now is to have my code 
>> catch the request and then throttle it but that still involves a hit to my 
>> server and if my client's website is being accessed by thousands of users, 
>> the hits to my server becomes considerable.
>> I know that Google App engine has a Denial of Service Protection but as 
>> far as I know, this works only for IP address. 
>>
>> Thanks
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0ad4cd1e-28a0-4950-9e9d-68302fd9c59b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: How do I use Federated Login with OpenID Connect?

2015-08-10 Thread NP
I've logged a feature request 
http://code.google.com/p/googleappengine/issues/detail?id=12245.

Nick and Jason - Thanks

On Monday, August 10, 2015 at 4:40:35 PM UTC-7, Jason Collins wrote:

 And make sure you link the feature request here; I'll gladly star it.

 On Monday, 10 August 2015 16:29:06 UTC-7, Nick (Cloud Platform Support) 
 wrote:

 Hi NP,

 They do indeed appear to be presently parallel systems. You can explore 
 the App Engine Users service and Google+ (OpenID Connect) authentication at 
 the example app gae-login-explainer.appspot.com, which goes into some 
 detail.

 I think you've got the makings of a great feature request here, and 
 encourage you to summarize the results into a Feature Request issue report 
 in the public issue tracker 
 http://code.google.com/p/google-appengine/issues/list, to request 
 tighter integration of login: required / admin in app.yaml and OpenID 
 Connect (Federated Login).

 Best wishes,

 Nick

 On Monday, August 10, 2015 at 2:47:39 AM UTC-4, NP wrote:

 Hi Nick,

 Thanks for your response.

 On further research, I discovered that the Users API from 
 google.appengine.api.users has no relation to the new Google OpenID 
 Connect i.e. even after I've successfully logged in via Google OpenID 
 Connect, calling Users.get_current_user() will return None. It seems Google 
 has not yet provided a way for the Users API to work with the Google OpenID 
 Connect. From what I understand if your application uses Federated Login, 
 then there is currently no way to support urls restricted to admin or login 
 required via app.yaml.



 On Thursday, August 6, 2015 at 3:58:28 PM UTC-7, Nick (Cloud Platform 
 Support) wrote:

 Hey NP,

 This may very well be a side-effect of the decommissioning of Google's 
 OpenID provider service and the moving to OpenID Connect. 

 Could you link which published Google Libraries for OpenID Connect 
 you've used, and if possible some of the code relevant to your use-case?

 As noted in the docs 
 https://cloud.google.com/appengine/docs/python/users/functions#create_login_url,
  
 support for OpenID was experimental, probably since the landscape of Auth 
 has been changing quite a bit, as new improvements are made through the 
 experience of successive paradigms, however all I really need to comment 
 on 
 is that it was experimental. Despite this, I'm committed to helping you 
 find a solution that works.

 There are several docs in our Developers resources which discuss OpenID 
 Connect [1] 
 https://developers.google.com/identity/protocols/OpenID2Migration?hl=en, 
 [2] https://developers.google.com/+/web/api/rest/openidconnect/, [3] 
 https://developers.google.com/identity/protocols/OpenIDConnect?hl=en, 
 and you might want to give those a read. If the login: admin feature turns 
 out to have been specific to Google OpenID accounts, you can rest assured 
 that:

 A) A feature request in the public issue tracker 
 http://code.google.com/p/google-appengine/issues/list to get this 
 function updated to work with OpenID Connect is possible and awesome

 B) you can implement your own admin feature using an admin check in 
 your request handlers and implementing an OpenID Connect auth scheme which 
 allows accounts from OpenID Connect services (you would add the various 
 sign-in buttons to the sign-in page of your (web)app).

 Best wishes,

 Nick

 On Tuesday, August 4, 2015 at 1:08:50 PM UTC-4, NP wrote:

 Hello all,

 I have an application (python) on GAE which uses Federated Login. In 
 app.yaml, I have restricted some urls to be accessible only to admins 
 (i.e. 
 login; admin). According to GAE documentation, any url restricted to 
 admin 
 for applications using Federated Login will trigger a call to 
 /_ah/loginrequired and I'm supposed to handle such calls by getting user 
 to 
 login using* users.create_login_url(dest_url, federated_identity).*

 Documentation for users.create_login_url says if no federated_identity 
 is specified (when your site is set to use federated identity), the 
 system 
 will default to Google as the OpenID provider. So the application 
 currently 
 defaults to  'https://www.google.com/accounts/o8/id' which is no 
 longer supported by Google and I believe this is the reason why it gives 
 me 
 a 500 server error.

 I have tried using the published Google Libraries for OpenID Connect. 
 If I use the library outside of the create_login_url, I'm able to log in 
 and get the user email but calling users.get_current_user() returns None 
 and so the application doesn't see me as being logged in which means I 
 don't get access to the url that I had restricted to admins. If I apply 
 the 
 OpenID Connect url to create_login_url, I get a 500 server error.

 Does anybody know how to handle requests to urls restricted to 
 logged-in users/admins using the new OpenID Connect?




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group

[google-appengine] Re: How do I use Federated Login with OpenID Connect?

2015-08-10 Thread NP
Hi Nick,

Thanks for your response.

On further research, I discovered that the Users API from 
google.appengine.api.users has no relation to the new Google OpenID Connect 
i.e. even after I've successfully logged in via Google OpenID Connect, 
calling Users.get_current_user() will return None. It seems Google has not 
yet provided a way for the Users API to work with the Google OpenID 
Connect. From what I understand if your application uses Federated Login, 
then there is currently no way to support urls restricted to admin or login 
required via app.yaml.



On Thursday, August 6, 2015 at 3:58:28 PM UTC-7, Nick (Cloud Platform 
Support) wrote:

 Hey NP,

 This may very well be a side-effect of the decommissioning of Google's 
 OpenID provider service and the moving to OpenID Connect. 

 Could you link which published Google Libraries for OpenID Connect 
 you've used, and if possible some of the code relevant to your use-case?

 As noted in the docs 
 https://cloud.google.com/appengine/docs/python/users/functions#create_login_url,
  
 support for OpenID was experimental, probably since the landscape of Auth 
 has been changing quite a bit, as new improvements are made through the 
 experience of successive paradigms, however all I really need to comment on 
 is that it was experimental. Despite this, I'm committed to helping you 
 find a solution that works.

 There are several docs in our Developers resources which discuss OpenID 
 Connect [1] 
 https://developers.google.com/identity/protocols/OpenID2Migration?hl=en, 
 [2] https://developers.google.com/+/web/api/rest/openidconnect/, [3] 
 https://developers.google.com/identity/protocols/OpenIDConnect?hl=en, 
 and you might want to give those a read. If the login: admin feature turns 
 out to have been specific to Google OpenID accounts, you can rest assured 
 that:

 A) A feature request in the public issue tracker 
 http://code.google.com/p/google-appengine/issues/list to get this 
 function updated to work with OpenID Connect is possible and awesome

 B) you can implement your own admin feature using an admin check in your 
 request handlers and implementing an OpenID Connect auth scheme which 
 allows accounts from OpenID Connect services (you would add the various 
 sign-in buttons to the sign-in page of your (web)app).

 Best wishes,

 Nick

 On Tuesday, August 4, 2015 at 1:08:50 PM UTC-4, NP wrote:

 Hello all,

 I have an application (python) on GAE which uses Federated Login. In 
 app.yaml, I have restricted some urls to be accessible only to admins (i.e. 
 login; admin). According to GAE documentation, any url restricted to admin 
 for applications using Federated Login will trigger a call to 
 /_ah/loginrequired and I'm supposed to handle such calls by getting user to 
 login using* users.create_login_url(dest_url, federated_identity).*

 Documentation for users.create_login_url says if no federated_identity is 
 specified (when your site is set to use federated identity), the system 
 will default to Google as the OpenID provider. So the application currently 
 defaults to  'https://www.google.com/accounts/o8/id' which is no longer 
 supported by Google and I believe this is the reason why it gives me a 500 
 server error.

 I have tried using the published Google Libraries for OpenID Connect. If 
 I use the library outside of the create_login_url, I'm able to log in and 
 get the user email but calling users.get_current_user() returns None and so 
 the application doesn't see me as being logged in which means I don't get 
 access to the url that I had restricted to admins. If I apply the OpenID 
 Connect url to create_login_url, I get a 500 server error.

 Does anybody know how to handle requests to urls restricted to logged-in 
 users/admins using the new OpenID Connect?




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/60217e42-97a9-4534-a6eb-65bc5b3a8508%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] How do I use Federated Login with OpenID Connect?

2015-08-04 Thread NP
Hello all,

I have an application (python) on GAE which uses Federated Login. In 
app.yaml, I have restricted some urls to be accessible only to admins (i.e. 
login; admin). According to GAE documentation, any url restricted to admin 
for applications using Federated Login will trigger a call to 
/_ah/loginrequired and I'm supposed to handle such calls by getting user to 
login using* users.create_login_url(dest_url, federated_identity).*

Documentation for users.create_login_url says if no federated_identity is 
specified (when your site is set to use federated identity), the system 
will default to Google as the OpenID provider. So the application currently 
defaults to  'https://www.google.com/accounts/o8/id' which is no longer 
supported by Google and I believe this is the reason why it gives me a 500 
server error.

I have tried using the published Google Libraries for OpenID Connect. If I 
use the library outside of the create_login_url, I'm able to log in and get 
the user email but calling users.get_current_user() returns None and so the 
application doesn't see me as being logged in which means I don't get 
access to the url that I had restricted to admins. If I apply the OpenID 
Connect url to create_login_url, I get a 500 server error.

Does anybody know how to handle requests to urls restricted to logged-in 
users/admins using the new OpenID Connect?


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8383fb62-fd69-4ad0-923f-13fed342309d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Migrating to Python 2.7 - anything to watch out for?

2013-06-02 Thread NP
Thanks to both Julie and Vinny P

On Saturday, May 4, 2013 5:24:04 PM UTC-7, NP wrote:

 My app is currently deployed on GAE using python 2.5.

 I have made changes to the code and it is now running on python 2.7 and 
 lxml. Before deploying the 2.7 code, I wanted to find out if there are any 
 specific things I should watch out for/check for.

 Secondly, since we can deploy different versions of our code, is it 
 possible for me to have both the 2.5 and 2.7 codes (as different versions) 
 or is there a requirement that all versions of your app must use the same 
 python version? I was thinking of deploying the 2.7 as a different version 
 and watching how it performed before deleting the 2.5 version. 

 Finally, the Key IDs for my datastore entities are automatically 
 generated. I noticed that for python 2.7, these IDs are very long (they are 
 16 digits long on my development server) whereas they are shorter on python 
 2.5 (6 digits long). Is there something I can do to reduce the length in 
 2.7 or is this the expected behavior in 2.7?


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




[google-appengine] UnicodeEncodeError but still saves to the Datastore

2013-06-02 Thread NP
Hello all,

My datastore model has an attribute of class string. According to the 
documentation, the String class should be of type str or unicode.

The data I'm trying to save is unicode (I confirmed this by printing out 
the type and the original page was encoded in utf-8).

My data is successfully saved to the datastore but it still raises the 
following exception 'ascii' codec can't encode character u'\u2019' in 
position 6: ordinal not in range(128)

I'm curious as to why an exception is being raised even though the data is 
unicode and why even with the exception, the data is still saved 
successfully.

Apart from specifically trapping this error using something like {exception 
UnicodeEncodeError: pass}, is there a way to prevent this error?

 

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




[google-appengine] Migrating to Python 2.7 - anything to watch out for?

2013-05-04 Thread NP
My app is currently deployed on GAE using python 2.5.

I have made changes to the code and it is now running on python 2.7 and 
lxml. Before deploying the 2.7 code, I wanted to find out if there are any 
specific things I should watch out for/check for.

Secondly, since we can deploy different versions of our code, is it 
possible for me to have both the 2.5 and 2.7 codes (as different versions) 
or is there a requirement that all versions of your app must use the same 
python version? I was thinking of deploying the 2.7 as a different version 
and watching how it performed before deleting the 2.5 version. 

Finally, the Key IDs for my datastore entities are automatically generated. 
I noticed that for python 2.7, these IDs are very long (they are 16 digits 
long on my development server) whereas they are shorter on python 2.5 (6 
digits long). Is there something I can do to reduce the length in 2.7 or is 
this the expected behavior in 2.7?

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




[google-appengine] 'cssselect seems not to be installed. '

2013-04-15 Thread NP
I'm running python 2.7 on a mac. I have lxml (3.1.1) installed. I also 
downloaded and installed cssselector since it no longer comes with lxml

In my python file, I have the following

import lxml.etree
from lxml.cssselect import CSSSelector

When I run the python file (F5), there are no errors and I get my expected 
output.

But if I launch my app from Google App Engine (on the dev server), I get an 
error and the log file shows the following

File /Library/Python/2.7/site-packages/lxml/cssselect.py, line 18, in 
module
raise ImportError('cssselect seems not to be installed. '
ImportError: cssselect seems not to be installed. See 
http://packages.python.org/cssselect/

I found this link 
http://code.google.com/p/googleappengine/issues/detail?id=9136

Anybody have a solution/work around?

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




[google-appengine] Re: 'cssselect seems not to be installed. '

2013-04-15 Thread NP
my app.yaml has this

libraries:
- name: lxml
  version: latest 

On Monday, April 15, 2013 8:32:21 PM UTC-7, timh wrote:

 Remember every 3rd party lib you use must either be in the SDK (lxml for 
 instance) or copied/installed into your project and the 
 sys.path needs to reflect where in your project the library is located, 
  it also needs to be deployed with your application.



 On Tuesday, April 16, 2013 11:28:06 AM UTC+8, NP wrote:

 I'm running python 2.7 on a mac. I have lxml (3.1.1) installed. I also 
 downloaded and installed cssselector since it no longer comes with lxml

 In my python file, I have the following

 import lxml.etree
 from lxml.cssselect import CSSSelector

 When I run the python file (F5), there are no errors and I get my 
 expected output.

 But if I launch my app from Google App Engine (on the dev server), I get 
 an error and the log file shows the following

 File /Library/Python/2.7/site-packages/lxml/cssselect.py, line 18, in 
 module
 raise ImportError('cssselect seems not to be installed. '
 ImportError: cssselect seems not to be installed. See 
 http://packages.python.org/cssselect/

 I found this link 
 http://code.google.com/p/googleappengine/issues/detail?id=9136

 Anybody have a solution/work around?



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




[google-appengine] Re: 'cssselect seems not to be installed. '

2013-04-15 Thread NP
You're right. I copied the cssselector folder into my project directory and 
it resolved the issue. I had thought I didn't need to do that since the 
lxml folder itself had the cssselect.py file within it.

On Monday, April 15, 2013 8:32:21 PM UTC-7, timh wrote:

 Remember every 3rd party lib you use must either be in the SDK (lxml for 
 instance) or copied/installed into your project and the 
 sys.path needs to reflect where in your project the library is located, 
  it also needs to be deployed with your application.



 On Tuesday, April 16, 2013 11:28:06 AM UTC+8, NP wrote:

 I'm running python 2.7 on a mac. I have lxml (3.1.1) installed. I also 
 downloaded and installed cssselector since it no longer comes with lxml

 In my python file, I have the following

 import lxml.etree
 from lxml.cssselect import CSSSelector

 When I run the python file (F5), there are no errors and I get my 
 expected output.

 But if I launch my app from Google App Engine (on the dev server), I get 
 an error and the log file shows the following

 File /Library/Python/2.7/site-packages/lxml/cssselect.py, line 18, in 
 module
 raise ImportError('cssselect seems not to be installed. '
 ImportError: cssselect seems not to be installed. See 
 http://packages.python.org/cssselect/

 I found this link 
 http://code.google.com/p/googleappengine/issues/detail?id=9136

 Anybody have a solution/work around?



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




Re: [google-appengine] Issues implementing URL slug

2013-01-16 Thread NP
Yea, that's what I have

On Wednesday, January 16, 2013 5:56:09 AM UTC-8, Julie wrote:

 Hello NP,

 That code works for me running on the development server on Windows 7 
 running Chrome 23.

 You haven't included your app.yaml, so I used

 *handlers:*
 *  *
 *- url: /.**
 *  script: main.py
 *

 Is that what you have?

 Regards,

 Julie


 On 16 January 2013 08:17, NP neara...@gmail.com javascript: wrote:

 I'm trying to implement url slugs in my app (python-based). I want the 
 slugged URL to be of the format  myhost/post_id/post_title

 When I try to access the page using the above slugged url format, I get 
 an error and (in Chrome, the error says - unexpected token ). If I delete 
 the '/post_title' from the url, the page loads correctly. Specifically, I 
 noticed that once I have a 'forward slash' after the post_id, I have 
 issues. Everything works fine without that extra slash (extra directory)

 My code is

 class mainhandler(webapp.RequestHandler):
 def get(self):
 if (self.request.path == '/test'):
 path = os.path.join (os.path.dirname (__file__), 'test.htm')
 self.response.headers ['Content-Type'] = 'text/html'
 self.response.out.write (template.render (path, {}))
 else:   
 path = os.path.join (os.path.dirname (__file__), 'index.htm') 

 self.response.headers ['Content-Type'] = 'text/html'
  
 self.response.out.write (template.render (path, {}))

 application = webapp.WSGIApplication( [('/.*', mainhandler)], 
  debug=True) 

 Basically, I want to load the index.htm file and on that file, I have 
 javascript which is supposed to extract the post-id from the URL and do 
 some stuff with it.

 Anybody know what I'm doing wrong here? 
  
 -- 
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/google-appengine/-/YesSG15kKXYJ.
 To post to this group, send email to 
 google-a...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 google-appengi...@googlegroups.com javascript:.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/elGBRPvbFUUJ.
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.



Re: [google-appengine] Issues implementing URL slug

2013-01-16 Thread NP
I'm running my development server on Windows XP

On Wednesday, January 16, 2013 10:03:06 AM UTC-8, NP wrote:

 Yea, that's what I have

 On Wednesday, January 16, 2013 5:56:09 AM UTC-8, Julie wrote:

 Hello NP,

 That code works for me running on the development server on Windows 7 
 running Chrome 23.

 You haven't included your app.yaml, so I used

 *handlers:*
 *  *
 *- url: /.**
 *  script: main.py
 *

 Is that what you have?

 Regards,

 Julie


 On 16 January 2013 08:17, NP neara...@gmail.com wrote:

 I'm trying to implement url slugs in my app (python-based). I want the 
 slugged URL to be of the format  myhost/post_id/post_title

 When I try to access the page using the above slugged url format, I get 
 an error and (in Chrome, the error says - unexpected token ). If I delete 
 the '/post_title' from the url, the page loads correctly. Specifically, I 
 noticed that once I have a 'forward slash' after the post_id, I have 
 issues. Everything works fine without that extra slash (extra directory)

 My code is

 class mainhandler(webapp.RequestHandler):
 def get(self):
 if (self.request.path == '/test'):
 path = os.path.join (os.path.dirname (__file__), 'test.htm')
 self.response.headers ['Content-Type'] = 'text/html'
 self.response.out.write (template.render (path, {}))
 else:   
 path = os.path.join (os.path.dirname (__file__), 
 'index.htm')
 self.response.headers ['Content-Type'] = 'text/html'
  
 self.response.out.write (template.render (path, {}))

 application = webapp.WSGIApplication( [('/.*', mainhandler)], 
  debug=True) 

 Basically, I want to load the index.htm file and on that file, I have 
 javascript which is supposed to extract the post-id from the URL and do 
 some stuff with it.

 Anybody know what I'm doing wrong here? 
  
 -- 
 You received this message because you are subscribed to the Google 
 Groups Google App Engine group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/google-appengine/-/YesSG15kKXYJ.
 To post to this group, send email to google-a...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengi...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/OCgsKsrS80kJ.
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: Issues implementing URL slug

2013-01-16 Thread NP
yea, i only used the anchors (in my post) to signify they are placeholders

On Wednesday, January 16, 2013 12:04:07 PM UTC-8, Jesse wrote:

 Since  are not valid URL characters.

 On Wednesday, January 16, 2013 2:02:52 PM UTC-6, Jesse wrote:

 You're not actually loading myhost/post_id/post_title right? You're 
 loading something like:

 myhost/123123/this-is-the-title-slug

 ?

 On Tuesday, January 15, 2013 3:17:50 PM UTC-6, NP wrote:

 I'm trying to implement url slugs in my app (python-based). I want the 
 slugged URL to be of the format  myhost/post_id/post_title

 When I try to access the page using the above slugged url format, I get 
 an error and (in Chrome, the error says - unexpected token ). If I delete 
 the '/post_title' from the url, the page loads correctly. Specifically, I 
 noticed that once I have a 'forward slash' after the post_id, I have 
 issues. Everything works fine without that extra slash (extra directory)

 My code is

 class mainhandler(webapp.RequestHandler):
 def get(self):
 if (self.request.path == '/test'):
 path = os.path.join (os.path.dirname (__file__), 'test.htm')
 self.response.headers ['Content-Type'] = 'text/html'
 self.response.out.write (template.render (path, {}))
 else:   
 path = os.path.join (os.path.dirname (__file__), 
 'index.htm')
 self.response.headers ['Content-Type'] = 'text/html'
  
 self.response.out.write (template.render (path, {}))

 application = webapp.WSGIApplication( [('/.*', mainhandler)], 
  debug=True) 

 Basically, I want to load the index.htm file and on that file, I have 
 javascript which is supposed to extract the post-id from the URL and do 
 some stuff with it.

 Anybody know what I'm doing wrong here? 



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/WHVS3FVFrwsJ.
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.



Re: [google-appengine] Re: Issues implementing URL slug

2013-01-16 Thread NP
I am running on SDK 1.6.3 and python 2.5

Also, I don't actually use '' in my url. I only used it in the post here 
to indicate it is meant to be a placeholder. A real url on my Dev server 
would be something like localhost:8081/1234/a-simple-example

and the error I get from the Firebug console is 


*- SyntaxError: syntax error*

**

*!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//E*

If I view the error in Chrome, it says 

Uncaught SyntaxError: Unexpected token  


On Wednesday, January 16, 2013 6:05:10 PM UTC-8, Julie wrote:

 NP, can you give an actual example of a URL that you are having problems 
 with?
 Which version of the SDK and Python are you running?
 It works for me using App Engine SDK release: 1.7.4 and Python 2.7.3

 I agree with Jesse that  and  should not be used in a URL, however as 
 far as I can tell from RFC3986 http://tools.ietf.org/html/rfc3986,  
 and  are not explicitly reserved characters (however they are also not 
 included in the unreserved list either).

 Whilst I don't recommend using  or  in a URL, it seems that IE, FF and 
 Chrome convert those characters to percent-encoded octets before sending 
 them to the server Within the app, self.request.url shows those 
 characters as %3C and %3E.


 On 17 January 2013 07:53, NP neara...@gmail.com javascript: wrote:

 yea, i only used the anchors (in my post) to signify they are placeholders


 On Wednesday, January 16, 2013 12:04:07 PM UTC-8, Jesse wrote:

 Since  are not valid URL characters.

 On Wednesday, January 16, 2013 2:02:52 PM UTC-6, Jesse wrote:

 You're not actually loading myhost/post_id/**post_title right? 
 You're loading something like:

 myhost/123123/this-is-the-**title-slug

 ?

 On Tuesday, January 15, 2013 3:17:50 PM UTC-6, NP wrote:

 I'm trying to implement url slugs in my app (python-based). I want the 
 slugged URL to be of the format  myhost/post_id/post_title

 When I try to access the page using the above slugged url format, I 
 get an error and (in Chrome, the error says - unexpected token ). If I 
 delete the '/post_title' from the url, the page loads correctly. 
 Specifically, I noticed that once I have a 'forward slash' after the 
 post_id, I have issues. Everything works fine without that extra slash 
 (extra directory)

 My code is

 class mainhandler(webapp.**RequestHandler):
 def get(self):
 if (self.request.path == '/test'):
 path = os.path.join (os.path.dirname (__file__), 
 'test.htm')
 self.response.headers ['Content-Type'] = 'text/html'
 self.response.out.write (template.render (path, {}))
 else:   
 path = os.path.join (os.path.dirname (__file__), 
 'index.htm')
 self.response.headers ['Content-Type'] = 'text/html'  

 self.response.out.write (template.render (path, {}))

 application = webapp.WSGIApplication( [('/.*', mainhandler)], 
  debug=True) 

 Basically, I want to load the index.htm file and on that file, I have 
 javascript which is supposed to extract the post-id from the URL and do 
 some stuff with it.

 Anybody know what I'm doing wrong here? 

  -- 
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/google-appengine/-/WHVS3FVFrwsJ.

 To post to this group, send email to 
 google-a...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 google-appengi...@googlegroups.com javascript:.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/sxFetiKClD0J.
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.



Re: [google-appengine] Re: Issues implementing URL slug

2013-01-16 Thread NP
Finally found the solution (with the help of someone from Stackoverflow) 
but now I'm trying to understand the solution.

In my index.htm file, I load a javascript file using script 
src=include/load.js type=text/javascript/script.
The above worked for urls such as localhost:8081/1234 but fails when the 
url is localhost:8081/1234/a-test-case

I changed it to  script 
*src=/include/load.js*type=text/javascript/script i.e. 
added a forward slash before the include folder and everything works now. 
 So now I'm trying to understand why this works.

My first guess would have been it couldn't find load.js without the extra 
forward slash but that doesn't make sense because the Javascript was being 
fired correctly without the extra slash (I know this because I use 
javascript to control a section of the page.

On Wednesday, January 16, 2013 6:41:43 PM UTC-8, Julie wrote:

 Is it possible that there is indeed a syntax error in your index.html 
 template file?

 If you check the console output in Chrome
 Tools  Javascript Console  Console
 it should indicate the where the error is. If you click on the error line 
 number on the right hand side, the console will show the source code at 
 that line. Note that the line number displayed in the console may not be 
 the same as the line number in your index.html file, as the template 
 variables are filled in.



 On 17 January 2013 13:29, NP neara...@gmail.com javascript: wrote:

 I am running on SDK 1.6.3 and python 2.5

 Also, I don't actually use '' in my url. I only used it in the post here 
 to indicate it is meant to be a placeholder. A real url on my Dev server 
 would be something like localhost:8081/1234/a-simple-example

 and the error I get from the Firebug console is 


 *- SyntaxError: syntax error*

 **

 *!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//E*

 If I view the error in Chrome, it says 

 Uncaught SyntaxError: Unexpected token  


 On Wednesday, January 16, 2013 6:05:10 PM UTC-8, Julie wrote:

 NP, can you give an actual example of a URL that you are having problems 
 with?
 Which version of the SDK and Python are you running?
 It works for me using App Engine SDK release: 1.7.4 and Python 2.7.3

 I agree with Jesse that  and  should not be used in a URL, however as 
 far as I can tell from RFC3986 http://tools.ietf.org/html/rfc3986,  
 and  are not explicitly reserved characters (however they are also not 
 included in the unreserved list either).

 Whilst I don't recommend using  or  in a URL, it seems that IE, FF and 
 Chrome convert those characters to percent-encoded octets before 
 sending them to the server Within the app, self.request.url shows those 
 characters as %3C and %3E.


 On 17 January 2013 07:53, NP neara...@gmail.com wrote:

  yea, i only used the anchors (in my post) to signify they are 
 placeholders


 On Wednesday, January 16, 2013 12:04:07 PM UTC-8, Jesse wrote:

 Since  are not valid URL characters.

 On Wednesday, January 16, 2013 2:02:52 PM UTC-6, Jesse wrote:

 You're not actually loading myhost/post_id/**post**_title right? 
 You're loading something like:

 myhost/123123/this-is-the-**titl**e-slug

 ?

 On Tuesday, January 15, 2013 3:17:50 PM UTC-6, NP wrote:

 I'm trying to implement url slugs in my app (python-based). I want 
 the slugged URL to be of the format  myhost/post_id/post_title

 When I try to access the page using the above slugged url format, I 
 get an error and (in Chrome, the error says - unexpected token ). If I 
 delete the '/post_title' from the url, the page loads correctly. 
 Specifically, I noticed that once I have a 'forward slash' after the 
 post_id, I have issues. Everything works fine without that extra 
 slash 
 (extra directory)

 My code is

 class mainhandler(webapp.**RequestHand**ler):
 def get(self):
 if (self.request.path == '/test'):
 path = os.path.join (os.path.dirname (__file__), 
 'test.htm')
 self.response.headers ['Content-Type'] = 'text/html'
 self.response.out.write (template.render (path, {}))
 else:   
 path = os.path.join (os.path.dirname (__file__), 
 'index.htm')
 self.response.headers ['Content-Type'] = 'text/html'
  
 self.response.out.write (template.render (path, {}))

 application = webapp.WSGIApplication( [('/.*', mainhandler)], 
  debug=True) 

 Basically, I want to load the index.htm file and on that file, I 
 have javascript which is supposed to extract the post-id from the URL 
 and 
 do some stuff with it.

 Anybody know what I'm doing wrong here? 

  -- 
 You received this message because you are subscribed to the Google 
 Groups Google App Engine group.
 To view this discussion on the web visit https://groups.google.com/d/**
 msg/google-appengine/-/**WHVS3FVFrwsJhttps://groups.google.com/d/msg/google-appengine/-/WHVS3FVFrwsJ
 .
  
 To post to this group, send email to google-a...@googlegroups.**com

Re: [google-appengine] Re: Issues implementing URL slug

2013-01-16 Thread NP
Explanation from Stackoverflow: When you use a front slash, you are saying 
'take this URL path from root'. But without it, it is in terms of the 
current location.

This explains why the original code worked when my url was simply 
localhost:8081/1234 but not in the second scenario where I have a second 
directory 

On Wednesday, January 16, 2013 7:44:06 PM UTC-8, NP wrote:

 Finally found the solution (with the help of someone from Stackoverflow) 
 but now I'm trying to understand the solution.

 In my index.htm file, I load a javascript file using script 
 src=include/load.js type=text/javascript/script.
 The above worked for urls such as localhost:8081/1234 but fails when the 
 url is localhost:8081/1234/a-test-case

 I changed it to  script 
 *src=/include/load.js*type=text/javascript/script i.e. 
 added a forward slash before the include folder and everything works now. 
  So now I'm trying to understand why this works.

 My first guess would have been it couldn't find load.js without the extra 
 forward slash but that doesn't make sense because the Javascript was being 
 fired correctly without the extra slash (I know this because I use 
 javascript to control a section of the page.

 On Wednesday, January 16, 2013 6:41:43 PM UTC-8, Julie wrote:

 Is it possible that there is indeed a syntax error in your index.html 
 template file?

 If you check the console output in Chrome
 Tools  Javascript Console  Console
 it should indicate the where the error is. If you click on the error line 
 number on the right hand side, the console will show the source code at 
 that line. Note that the line number displayed in the console may not be 
 the same as the line number in your index.html file, as the template 
 variables are filled in.



 On 17 January 2013 13:29, NP neara...@gmail.com wrote:

 I am running on SDK 1.6.3 and python 2.5

 Also, I don't actually use '' in my url. I only used it in the post 
 here to indicate it is meant to be a placeholder. A real url on my Dev 
 server would be something like localhost:8081/1234/a-simple-example

 and the error I get from the Firebug console is 


 *- SyntaxError: syntax error*

 **

 *!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//E*

 If I view the error in Chrome, it says 

 Uncaught SyntaxError: Unexpected token  


 On Wednesday, January 16, 2013 6:05:10 PM UTC-8, Julie wrote:

 NP, can you give an actual example of a URL that you are having 
 problems with?
 Which version of the SDK and Python are you running?
 It works for me using App Engine SDK release: 1.7.4 and Python 2.7.3

 I agree with Jesse that  and  should not be used in a URL, however as 
 far as I can tell from RFC3986 http://tools.ietf.org/html/rfc3986,  
 and  are not explicitly reserved characters (however they are also 
 not included in the unreserved list either).

 Whilst I don't recommend using  or  in a URL, it seems that IE, FF 
 and Chrome convert those characters to percent-encoded octets before 
 sending them to the server Within the app, self.request.url shows 
 those characters as %3C and %3E.


 On 17 January 2013 07:53, NP neara...@gmail.com wrote:

  yea, i only used the anchors (in my post) to signify they are 
 placeholders


 On Wednesday, January 16, 2013 12:04:07 PM UTC-8, Jesse wrote:

 Since  are not valid URL characters.

 On Wednesday, January 16, 2013 2:02:52 PM UTC-6, Jesse wrote:

 You're not actually loading myhost/post_id/**post**_title 
 right? You're loading something like:

 myhost/123123/this-is-the-**titl**e-slug

 ?

 On Tuesday, January 15, 2013 3:17:50 PM UTC-6, NP wrote:

 I'm trying to implement url slugs in my app (python-based). I want 
 the slugged URL to be of the format  myhost/post_id/post_title

 When I try to access the page using the above slugged url format, I 
 get an error and (in Chrome, the error says - unexpected token ). If 
 I 
 delete the '/post_title' from the url, the page loads correctly. 
 Specifically, I noticed that once I have a 'forward slash' after the 
 post_id, I have issues. Everything works fine without that extra 
 slash 
 (extra directory)

 My code is

 class mainhandler(webapp.**RequestHand**ler):
 def get(self):
 if (self.request.path == '/test'):
 path = os.path.join (os.path.dirname (__file__), 
 'test.htm')
 self.response.headers ['Content-Type'] = 'text/html'
 self.response.out.write (template.render (path, {}))
 else:   
 path = os.path.join (os.path.dirname (__file__), 
 'index.htm')
 self.response.headers ['Content-Type'] = 'text/html'
  
 self.response.out.write (template.render (path, {}))

 application = webapp.WSGIApplication( [('/.*', mainhandler)], 
  debug=True) 

 Basically, I want to load the index.htm file and on that file, I 
 have javascript which is supposed to extract the post-id from the URL 
 and 
 do some stuff with it.

 Anybody know what

[google-appengine] Issues implementing URL slug

2013-01-15 Thread NP
I'm trying to implement url slugs in my app (python-based). I want the 
slugged URL to be of the format  myhost/post_id/post_title

When I try to access the page using the above slugged url format, I get an 
error and (in Chrome, the error says - unexpected token ). If I delete the 
'/post_title' from the url, the page loads correctly. Specifically, I 
noticed that once I have a 'forward slash' after the post_id, I have 
issues. Everything works fine without that extra slash (extra directory)

My code is

class mainhandler(webapp.RequestHandler):
def get(self):
if (self.request.path == '/test'):
path = os.path.join (os.path.dirname (__file__), 'test.htm')
self.response.headers ['Content-Type'] = 'text/html'
self.response.out.write (template.render (path, {}))
else:   
path = os.path.join (os.path.dirname (__file__), 'index.htm')   
 
self.response.headers ['Content-Type'] = 'text/html'
 
self.response.out.write (template.render (path, {}))

application = webapp.WSGIApplication( [('/.*', mainhandler)],  debug=True) 

Basically, I want to load the index.htm file and on that file, I have 
javascript which is supposed to extract the post-id from the URL and do 
some stuff with it.

Anybody know what I'm doing wrong here? 

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/YesSG15kKXYJ.
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 edit an entity attribute of type Text in Production Datastore viewer

2013-01-03 Thread NP
I have an entity with several attributes one of which is a Text attribute 
(db.TextProperty). In the development environment, I'm able to edit the 
value of this attribute in the datastore viewer console but I'm unable to 
do this in Production environment. In the Production environment, all the 
other attributes are editable from the datastore viewere console except for 
the attribute whose type is Text. Anyone know why this is happening?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/GcLHOPpF73YJ.
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.