[google-appengine] Not able to run dev_appserver with Python 3 only environment
Hello I am getting back to GAE after many years. Things have definitely changed. As a new project, I got started with Python 37 runtime. My virtualenv is created using: python3 -m venv ENV and thus does not have python2. When I try to run my app in local mode using dev_appserver.py (i am just trying to play around with the sample app from the documentation), I get: dev_appserver.py app.yaml ERROR: (dev_appserver) python2: command not found I installed google-cloud-sdk using brew with: brew cask install google-cloud-sdk. As of now, my only requirement for my app is GAE and datastore and I am hoping to be able to use the datastore emulator with the above. Ritesh -- 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/e9ffe3ea-04ae-4ff6-9368-3cb6fff62f98n%40googlegroups.com.
Re: [google-appengine] One problem in GAE but NOT in local host.
The admin logs should have a traceback giving you more information. On Sat, Apr 9, 2011 at 7:38 AM, Jimmy jimmylin...@gmail.com wrote: I run my program on GAE, but one error show up which is IndexError: list index out of range. But I try to run it on local host. It's totally okay. I want to know why cause this problem and fix it. Thank you for reading and answering. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ritesh http://www.beamto.us -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: seeking guidance in application development
Hmm, maybe ask your TA or your professor? On Thu, Feb 24, 2011 at 12:19 AM, SARANSH GUPTA r13r...@gmail.com wrote: ok i got ur point.. can u help me out on what shud i do now.. shud i make my own cloud server..?? to include networking in my project... ?? plzz help me i hav one week left..!! On Thu, Feb 24, 2011 at 10:01 AM, Robert Kluin robert.kl...@gmail.com wrote: http://code.google.com/appengine/docs/whatisgoogleappengine.html Not really. That's part of the point of it. On Wed, Feb 23, 2011 at 21:38, SARANSH GUPTA r13r...@gmail.com wrote: ok..thanx.. it worked.. i hav another doubt.. actually this application that i m creating is for my college project on networking.. i jst wanted to know weather creating a application using google appengine will include sum networking part or nt?? On Wed, Feb 23, 2011 at 9:44 PM, Geoffrey Spear geoffsp...@gmail.com wrote: On Feb 23, 4:17 am, Saransh Gupta r13r...@gmail.com wrote: hello, i have been trying to create an application using google appengine.. i went to the link.. https://appengine.google.com/start; n after signing in my account i clicked the create application button it took me to another page where i was asked to fill in my Application Title.. no no matter what i write in the application title thing..it gives me an error..this appplication Id is already in use... help me!! i m stuck at the 1st very step..!! its urgent.. Think of a more unique application identifier. Applications share a namespace with Gmail accounts, so you may need to get creative and/or attach strings of random numbers to the ends of words. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ritesh http://www.beamto.us -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Incremental backups
Hmm, I have been thinking more on this. Whenever I run a process, I see some logs being created? What is the information contained here. Does the bulkloader do anything to optimize it next round of downloading the data? I see from the docs above and something similar in my logs: [INFO] Have 64 entities, 0 previously transferred Feels like the tool is using some previous records. Though, I could not find any docs on this subject. On Fri, Feb 11, 2011 at 1:25 PM, Ritesh Nadhani rite...@gmail.com wrote: Hello Barry Well, I have nothing fancy. I just use the http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Downloading_and_Uploading_All_Data and OS level cron to get every day. So I can obviously start from something like, where ID something or entity.when something and keep a marker somewhere. I could not find a way to ask GAE loader script to fetch data - only if it matches certain conditions. That is the trouble I am having finding out. On Fri, Feb 11, 2011 at 4:58 AM, Barry Hunter barrybhun...@gmail.com wrote: It should certainly be possible, but if you can is something we can't answer. To do incremental backups, need to keep some sort of marker on data downloaded already, and so know not to back it up again in the incremental backup. **How** exactly you do that highly depends on your data, and what method you using to actully do the backup. On 11 February 2011 07:29, Ritesh Nadhani rite...@gmail.com wrote: So currently, I run a cron every day and take a complete backup of the data. Is there anyway - we can do incremental backup? -- Ritesh -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ritesh -- Ritesh http://www.beamto.us -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Dynamic creation of zip/tar from series of Blobs
So in our site, we allow musicians to create Albums and they upload tracks which we are saving as Blob. Now if the artist allows, we wanted users to download the whole album as one .zip file. Is it possible to create a zip dynamically? In that case, I could save the resulting zip as another Blog and just reuse that from next time on. Using Python if that matters. -- Ritesh http://www.beamto.us -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Incremental backups
Hello I do exactly like Barry said. I just my Linux boxes cron service to dump data locallly. GAE datastore has never failed so I have never actually imported it (there is a TODO item in my list). On Fri, Feb 11, 2011 at 5:58 AM, Mike phy...@gmail.com wrote: Sorry if it's off-topic but could you briefly explain how you perform backups using cron jobs? I've been wondering how I could backup the data in the datastore and restore it if needs be. Thanks! On Feb 11, 7:29 am, Ritesh Nadhani rite...@gmail.com wrote: So currently, I run a cron every day and take a complete backup of the data. Is there anyway - we can do incremental backup? -- Ritesh -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ritesh http://www.beamto.us -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Incremental backups
Hello Barry Well, I have nothing fancy. I just use the http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Downloading_and_Uploading_All_Data and OS level cron to get every day. So I can obviously start from something like, where ID something or entity.when something and keep a marker somewhere. I could not find a way to ask GAE loader script to fetch data - only if it matches certain conditions. That is the trouble I am having finding out. On Fri, Feb 11, 2011 at 4:58 AM, Barry Hunter barrybhun...@gmail.com wrote: It should certainly be possible, but if you can is something we can't answer. To do incremental backups, need to keep some sort of marker on data downloaded already, and so know not to back it up again in the incremental backup. **How** exactly you do that highly depends on your data, and what method you using to actully do the backup. On 11 February 2011 07:29, Ritesh Nadhani rite...@gmail.com wrote: So currently, I run a cron every day and take a complete backup of the data. Is there anyway - we can do incremental backup? -- Ritesh -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ritesh -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Incremental backups
So currently, I run a cron every day and take a complete backup of the data. Is there anyway - we can do incremental backup? -- Ritesh -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Video streaming - possible, or not?
Hello Mark I agree with Ikai or if you could figure out other revenue stream. Though even with $0.12/GB, its possibly one of the cheapest rates out there. Long story short, its technically possible, now one has to see if it makes business sense. Best of luck. On Tue, Oct 19, 2010 at 11:39 AM, Ikai Lan (Google) ikai.l+gro...@google.com wrote: Mark, More likely than not, you're going to have to charge if you intend on streaming a 1gb video file to many users. I'm not expert on media streaming business models; I just enjoy my Hulu and pay for my Netflix. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Tue, Oct 19, 2010 at 8:12 AM, Mark Wyszomierski mar...@gmail.com wrote: Hi Ritesh, Thanks for your response, I really appreciate it. It looks like I have to see how large my intended video files are, and how much usage I'll get from users. For example, outgoing bandwidth costs $0.12 per GB. If I have a single video file that's 1gb, and 100 people watch it that day, then I'll end up paying $12. Amazon has similar pricing. I don't know much about how or if browsers will cache any video content, but that would help if users want to keep replaying the same video. Or replay the same video on different days (which is likely in my case). The other option is hosting on youtube for free, but then I believe they take over the rights to the video. Thanks, Mark On Mon, Oct 18, 2010 at 11:54 PM, Ritesh Nadhani rite...@gmail.com wrote: Hello Mark AFAIK, the 30sec limit is only for request time. Uploading/storing to Blobstore does not have this limit. Neither does serving a Blobstore data has this issue. http://code.google.com/appengine/docs/python/blobstore/overview.html#Serving_a_Blob I currently run a music site to which users regularly upload more than 10MB file taking more than 30 seconds. Users are successfuly able to stream the music using any freely available Flash music player. On Mon, Oct 18, 2010 at 7:10 PM, Mark mar...@gmail.com wrote: Hi, I'm looking to upload a video file into the blobstore, then stream it to a flash player. I'm not sure if this is possible or not because I see conflicting messages here about support for it. I know there's a 30 second http connection limit. I'm not sure if that counts towards streaming a file. I would host the videos on youtube, but the video content for this app is supposed to be 'protected', meaning I don't want to let people view the video unless authenticated. Using the youtube api would be an easy win otherwise. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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. -- Ritesh http://www.beamto.us -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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. -- Ritesh http://www.beamto.us -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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] Video streaming - possible, or not?
Hello Mark AFAIK, the 30sec limit is only for request time. Uploading/storing to Blobstore does not have this limit. Neither does serving a Blobstore data has this issue. http://code.google.com/appengine/docs/python/blobstore/overview.html#Serving_a_Blob I currently run a music site to which users regularly upload more than 10MB file taking more than 30 seconds. Users are successfuly able to stream the music using any freely available Flash music player. On Mon, Oct 18, 2010 at 7:10 PM, Mark mar...@gmail.com wrote: Hi, I'm looking to upload a video file into the blobstore, then stream it to a flash player. I'm not sure if this is possible or not because I see conflicting messages here about support for it. I know there's a 30 second http connection limit. I'm not sure if that counts towards streaming a file. I would host the videos on youtube, but the video content for this app is supposed to be 'protected', meaning I don't want to let people view the video unless authenticated. Using the youtube api would be an easy win otherwise. Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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. -- Ritesh http://www.beamto.us -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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] Developing Also viewing or Recently viewed feature
Hello So I am trying to develop a very common feature like: Also viewing/Recently Viewed user1, user2, user3 ... I had couple of questions: * Is developing a middleware that reads all the request and stores data. Something like appstats. Is there some documentation on writing a middleware? * Since the data has to be real time, would the fastest way would be to a simple put to the datastore and then build statistics sorted on time. This would be mostly one time insert and be read for like an hour. -- Ritesh -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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: App Engine for existing PHP5 applications
Hello ramanathan Google App Engine does not support PHP (yet). Hopefully soon. If you have your legacy code in one of the supported Java or Python frameworks, than you can use it. But keep in mind, there is no MySQL (and probably will never be). You have to use Google's datastore. On Mon, Aug 24, 2009 at 11:49 AM, ramanathanrpachaiyap...@gmail.com wrote: Hi, I'm looking for how changes required in the code level, If we try to deploy our PHP/MySQL application in app engine ? Is App engine good for legacy projects or only to new apps development? Thanks Ram -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: deserialize xml
Hi I dont think you need the serializer of django. From what I see, it is more for translating Django objects. What you need is a XML parser. http://groups.google.com/group/google-appengine/browse_thread/thread/85b7d03ff0d4ff2b/9fdfec112a4c051a?pli=1 On Wed, Aug 19, 2009 at 2:30 PM, veearrsixstup...@googlemail.com wrote: Guys, First off I'm a little green to both python and the app engine, so apologies up front if this seems like a dumb question... I'm using urlfetch to retrieve some xml from flickr: ... url = 'http://api.flickr.com/services/rest/' method = 'flickr.photosets.getPhotos' api_key = 'x' params = 'method=' + method + 'api_key=' + api_key + 'photoset_id=' + set_id data = urlfetch.fetch(url, headers={}, payload=params,method=urlfetch.POST) ... I'm then deserializing the xml into a python object: ... from django.core import serializers obj = serializers.deserialize(format, data.content) ... Which give me a deserialzer object: django.core.serializers.xml_serializer.Deserializer object at 0x5a39150 My question is how do i get access to the contents of the deserializer object? Do I have to do some additional processing to access it? Again sorry if this comes across as being a dumb question, oh and yes I know its probably more of a general python question, but I haven't found a busy python group. for reference here is an example xml response from flickr: rsp stat=ok photoset id=4 primary=2483 page=1 perpage=500 pages=1 total=2 photo id=2484 secret=123456 server=1 title=my photo isprimary=0 / photo id=2483 secret=123456 server=1 title=flickr rocks isprimary=1 / /photoset /rsp -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: wtforms with appengine
From my code. Feel free if you want to make a reciepe out of it. class UserForm(Form): title = TextField(u'Title', [validators.required(), validators.length(max=150)]) description = TextAreaField(u'Content', [validators.required()]) genre = SelectField(u'Genre', [validators.required()]) subgenre = TextField(u'Subgenres', [validators.length(max=250)]) url = TextField(u'URL', [validators.required()]) form = forms.UserForm(req.form) errors = [] #Add the choices to the genre list. form.genre.choices = [(genre.key().name().lower(), genre.name) for genre in Genre.all().fetch(1000)] form.genre.data = 'Psy'.lower() -- In your view method. Though uses werkzeug (Glashammer) instead of Django or web.py # Validate form if req.method == 'POST' and form.validate(): title_slug = slugify(req.form.get('title')) try: user = users.get_current_user() title = req.form.get('title') url = req.form.get('url') userpref = models.UserPref(key_name=title_slug), title=req.form.get('title'), description = req.form.get('description'), user = users.get_current_user(), genre=Genre.get_by_key_name(req.form.get('genre')), url=req.form.get('url')) subgenres = req.form.get('subgenre') userpref.subgenres = [genre.lower().strip() for genre in subgenres.split(' ')]s.py userpref.put() except BadValueError, e: #We need to show the error . #Your error checking, else: return redirect(userpref.permalink) On Tue, Jun 30, 2009 at 5:51 PM, Italo Maiaitalo.m...@gmail.com wrote: Does anyone have a good recepie for wtforms+appengine integration? Like, form generation or request parameters fetch and stuff? -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Login using Google Accounts-- modifying login screent.
There is: redirect_url parameter to: create_login_url(). You can provide your own URL and redirect depending upon the registered user. You will need to have a way to find out if the user is an admin or student etc. On Wed, Jul 1, 2009 at 1:50 PM, Varun Saravagivarunsarav...@gmail.com wrote: Hi Google App Engine provides us with the ability to login to the application with our google accounts. I want to modify the login screen. I want that the user enters his/her google id password and then login using any of the three buttons provided so that he/she is redirected to the respective page. I mean something like this: Google Id: Password: (buttons) Administrator Instructor Student Is it possible to do so? If yes, please help. I would be very grateful to you. Thanks -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Model with key_name not have key().id
Hi When I save a model with (key_name=...) value, the key does not seem to have an id. Eg. Mode1(key_name='xxx').put() obj.key().id() - None Model2() obj2.key().id() - 1 Is this intented? Can I have both key_name and id in a mode? -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Model with key_name not have key().id
Actually, what I meant was: I cannot have an entity with both key_name and id. They seem to be mutually exclusive for an entity. 2009/6/23 Ian Lewis ianmle...@gmail.com: Ritesh, Also, BTW, The reason that obj1 and obj2 can have different types of keys is because the key is not saved on a model level. It is saved at the entity level. Each entity can have id or key_names. Apparently obj2 was saved without a key name and was given a numeric key. obj1 was saved with a key_name. So to answer your question, yes, within a model/Kind you can have some entities that have a numeric id and some that have key names. Ian 2009/6/24 Ian Lewis ianmle...@gmail.com Ritesh, Keys can either have a numeric id or a key_name. In order to access the key name for entities that you saved with a key_name you need to use the key_name() method. instead of obj.key().id(), try obj.key().name() Incedentally you can also use obj.key().id_or_name() to get either the id or the name depending on which you are using. On Wed, Jun 24, 2009 at 3:08 PM, Ritesh Nadhani rite...@gmail.com wrote: Hi When I save a model with (key_name=...) value, the key does not seem to have an id. Eg. Mode1(key_name='xxx').put() obj.key().id() - None Model2() obj2.key().id() - 1 Is this intented? Can I have both key_name and id in a mode? -- Ritesh http://www.riteshn.com -- === 株式会社ビープラウド イアン・ルイス 〒150-0012 東京都渋谷区広尾1-11-2アイオス広尾ビル604 email: ianmle...@beproud.jp TEL:03-5795-2707 FAX:03-5795-2708 http://www.beproud.jp/ === -- === 株式会社ビープラウド イアン・ルイス 〒150-0012 東京都渋谷区広尾1-11-2アイオス広尾ビル604 email: ianmle...@beproud.jp TEL:03-5795-2707 FAX:03-5795-2708 http://www.beproud.jp/ === -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Model with key_name not have key().id
Thanks. That is what I was confirming. 2009/6/24 Ian Lewis ianmle...@gmail.com: Yes, that is correct. 2009/6/24 Ritesh Nadhani rite...@gmail.com Actually, what I meant was: I cannot have an entity with both key_name and id. They seem to be mutually exclusive for an entity. 2009/6/23 Ian Lewis ianmle...@gmail.com: Ritesh, Also, BTW, The reason that obj1 and obj2 can have different types of keys is because the key is not saved on a model level. It is saved at the entity level. Each entity can have id or key_names. Apparently obj2 was saved without a key name and was given a numeric key. obj1 was saved with a key_name. So to answer your question, yes, within a model/Kind you can have some entities that have a numeric id and some that have key names. Ian 2009/6/24 Ian Lewis ianmle...@gmail.com Ritesh, Keys can either have a numeric id or a key_name. In order to access the key name for entities that you saved with a key_name you need to use the key_name() method. instead of obj.key().id(), try obj.key().name() Incedentally you can also use obj.key().id_or_name() to get either the id or the name depending on which you are using. On Wed, Jun 24, 2009 at 3:08 PM, Ritesh Nadhani rite...@gmail.com wrote: Hi When I save a model with (key_name=...) value, the key does not seem to have an id. Eg. Mode1(key_name='xxx').put() obj.key().id() - None Model2() obj2.key().id() - 1 Is this intented? Can I have both key_name and id in a mode? -- Ritesh http://www.riteshn.com -- === 株式会社ビープラウド イアン・ルイス 〒150-0012 東京都渋谷区広尾1-11-2アイオス広尾ビル604 email: ianmle...@beproud.jp TEL:03-5795-2707 FAX:03-5795-2708 http://www.beproud.jp/ === -- === 株式会社ビープラウド イアン・ルイス 〒150-0012 東京都渋谷区広尾1-11-2アイオス広尾ビル604 email: ianmle...@beproud.jp TEL:03-5795-2707 FAX:03-5795-2708 http://www.beproud.jp/ === -- Ritesh http://www.riteshn.com -- === 株式会社ビープラウド イアン・ルイス 〒150-0012 東京都渋谷区広尾1-11-2アイオス広尾ビル604 email: ianmle...@beproud.jp TEL:03-5795-2707 FAX:03-5795-2708 http://www.beproud.jp/ === -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Urllib.urlfetch with HTTPS giving IOError error
Anybody? On Fri, Jun 19, 2009 at 12:53 PM, Ritesh Nadhanirite...@gmail.com wrote: Hi Hi, I am trying to access an https url specifically: https://api-3t.sandbox.paypal.com/nvp and I get the traceback: http://paste.pocoo.org/show/124055/ If I access the same thing from shell using urllib, everything works and I get the correct response. http://paste.pocoo.org/show/124067/ Both the code send the same exact parameter to urllib.urlopen(). Is GAE urlib() different from the standard Python? What could be the issue?: -- Ritesh http://www.riteshn.com -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Large file support
Thanks Jeff. For now we are going to use Amazon S3 service and once you support big files like them, probably move to Google or share data between it. On Fri, Jun 19, 2009 at 11:06 AM, Jeff S (Google)j...@google.com wrote: Hi Ritesh, If you are willing to split up the files on upload and reassemble on download, then it is possible to work around the current size limit. It would also be perfectly fine to use another service for hosting large files, such as Amazon S3. As a general rule we don't give specific dates for upcoming features. We had originally planned to release support for large files sometime this month, but the date will likely slip, so it will be a bit later. Thank you, Jeff On Wed, Jun 17, 2009 at 10:56 AM, Ritesh Nadhani rite...@gmail.com wrote: Hello We are in the process of developing a music website and we will need user to upload their high-quality version of songs. Looking at http://code.google.com/appengine/docs/roadmap.html and http://stackoverflow.com/questions/842426/google-app-engine-large-file-upload, it looks like the support is still being given. When can I expect it to be released? Is Amazon S3 the best thing right now? -- Ritesh http://www.riteshn.com -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Urllib.urlfetch with HTTPS giving IOError error
Hi Hi, I am trying to access an https url specifically: https://api-3t.sandbox.paypal.com/nvp and I get the traceback: http://paste.pocoo.org/show/124055/ If I access the same thing from shell using urllib, everything works and I get the correct response. http://paste.pocoo.org/show/124067/ Both the code send the same exact parameter to urllib.urlopen(). Is GAE urlib() different from the standard Python? What could be the issue?: -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: [ANN] Kay - Another web framework on app engine - beta version
Hi Have you looked into Glashammer? http://glashammer.org/ It uses the same idea that is werkzeug, wtforms and jinja2. On Wed, Jun 17, 2009 at 2:00 AM, Takashi Matsuomatsuo.taka...@gmail.com wrote: Hi list, I'd like to let you know about my web framework. It is named 'Kay'. Kay is a web framework made specifically for Google App Engine/Python. The basic design of Kay is based on the Django framework, like middleware, settings and pluggable application, etc. Kay uses Werkzeug as lower level framework, Jinja2 as template engine, and babel for handling language translations. This software is distributed under BSD license. See LICENSE for more details. See README for quickstart. It is still beta version and under heavilly development. So I don't recommend you to use this framework for production, but if you're interested, please visit: http://code.google.com/p/kay-framework/ I'll be glad if you let me know what you think. Regards, -- Takashi Matsuo -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Large file support
Hello We are in the process of developing a music website and we will need user to upload their high-quality version of songs. Looking at http://code.google.com/appengine/docs/roadmap.html and http://stackoverflow.com/questions/842426/google-app-engine-large-file-upload, it looks like the support is still being given. When can I expect it to be released? Is Amazon S3 the best thing right now? -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Kay - Another web framework on app engine - beta version
On Wed, Jun 17, 2009 at 10:49 AM, NealWaltersnealwalt...@nealwalters.com wrote: Can you please tell us the features and benefits of your framework? I don't Jinja2 or Werkzeug - so what's in it for developers? Nothing as such. They are just another option instead of Django and Django templating system. Much more modular and in my guess, simpler to use. Give a look at Glashammer. Neal Walters -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: [ANN] Kay - Another web framework on app engine - beta version
On Wed, Jun 17, 2009 at 11:02 AM, Takashi Matsuomatsuo.taka...@gmail.com wrote: Hi Ritesh, Thanks for your comment. Yes I have looked into Glashammer, it seems that it is a neat and nice project. I know Kay is a very similar to Glashammer for now. Having said that, Glashammer is app-engine-in-dependent, so there must be code that is unnecessary for App Engine. I think, in a long term perspective, there is certainly a need for such a framework that is made specifically for App Engine. So I decided to start Kay. It is completely dependent on App Engine in its concept. I will never think of adapting Kay to any RDBMS. I see where you are going. I will keep an eye on this. Maybe things that I contribute to Glashammer specifically for GAE can be ported to KAY too. More options never hurt! Anyway, thanks for your comment again :-) Regards, -- Takashi Matsuo On Thu, Jun 18, 2009 at 2:35 AM, Ritesh Nadhanirite...@gmail.com wrote: Hi Have you looked into Glashammer? http://glashammer.org/ It uses the same idea that is werkzeug, wtforms and jinja2. On Wed, Jun 17, 2009 at 2:00 AM, Takashi Matsuomatsuo.taka...@gmail.com wrote: Hi list, I'd like to let you know about my web framework. It is named 'Kay'. Kay is a web framework made specifically for Google App Engine/Python. The basic design of Kay is based on the Django framework, like middleware, settings and pluggable application, etc. Kay uses Werkzeug as lower level framework, Jinja2 as template engine, and babel for handling language translations. This software is distributed under BSD license. See LICENSE for more details. See README for quickstart. It is still beta version and under heavilly development. So I don't recommend you to use this framework for production, but if you're interested, please visit: http://code.google.com/p/kay-framework/ I'll be glad if you let me know what you think. Regards, -- Takashi Matsuo -- Ritesh http://www.riteshn.com -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] garutilities Session objects in Django app
Hi So I was reading the session utility at http://code.google.com/p/gaeutilities/wiki/Session. I am using Django instead of web.py. The sample shows code: self.session = Session() In django, we dont get an object, rather a method is called, how can I store the session object similar to self.session. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: garutilities Session objects in Django app
Thanks. I have the stock .96 running. I will try it out with it and let you know how it goes. Hopefully it will work for 0.96 out of box and then soon I will read upon the complete appengine-port. On Wed, Mar 11, 2009 at 10:12 AM, Joe Bowman bowman.jos...@gmail.com wrote: Hi, gaeutilities includes a session middleware Just add it in your settings.py For example, for one app I have MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'common.appengine_utilities.django- middleware.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ) Note, this only verified with appengine-patch, and not the django0.96 bundled with appengine. Not saying it doesn't work, just saying I've never tried it. Also, the middleware takes advantage of the new session cookie writer. This is a large performance improvement by storing all session data in cookies for anonymous requests. In order to switch to the datastore backed solution for your logged in users, you'll need to reset the session when they log in. The easiest way to do this after you've authenticated the user, use request.session.save() to convert the session to the datastore backed solution. ie: user = auth.authenticate() request.session.save() auth.login(request, user) On Mar 11, 12:40 pm, Ritesh Nadhani rite...@gmail.com wrote: Hi So I was reading the session utility athttp://code.google.com/p/gaeutilities/wiki/Session. I am using Django instead of web.py. The sample shows code: self.session = Session() In django, we dont get an object, rather a method is called, how can I store the session object similar to self.session. -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Model not saving correct user information
Hello Jeff, On Tue, Mar 10, 2009 at 10:46 AM, Jeff S j...@google.com wrote: Hi Ritesh, I didn't see any obvious issue with your code snippet, so more context would be helpful. Also it seems that _get_user_nick_name may not return what is expected. def _get_user_nick_name(self): return self.user I think you want to return self.user.nickname() Yes. That was just a test code. I actually have user.nickname() in my code. Though I might not even need the usernick property as user.nickname is same. I checked in my datastore and the correct data is also getting sored so I dont know. Running some other tests to see where the issue might be. Thank you, Jeff On Mar 9, 7:38 pm, Ritesh Nadhani rite...@gmail.com wrote: Hi http://paste.pocoo.org/show/107208/ So here is my code sample. Is there any reason why user property would be None if the user is logged out or if a user is logged in then the current logged in user info. It does not keep different user info. Surprisingly, I have another model in which I am storing the user property too and that is able to save the user info correctly -- Riteshhttp://www.riteshn.com -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Programmitcally doing authentication with Google Account
Hi Can I dynamically authenticate a user with Google Accounts? Then I can use users.get_current_user(). -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Programmitcally doing authentication with Google Account
Hello On Tue, Mar 10, 2009 at 1:04 PM, Wooble geoffsp...@gmail.com wrote: On Mar 10, 3:13 pm, Ritesh Nadhani rite...@gmail.com wrote: Hi Can I dynamically authenticate a user with Google Accounts? Then I can use users.get_current_user(). If by programmatically you mean you know the user's username and password and fill it in for them, no. Allowing you to do that would be a massive security risk. Hmm. Thanks! -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Programmitcally doing authentication with Google Account
Hello On Tue, Mar 10, 2009 at 1:55 PM, lenza le...@lenza.org wrote: The answer to your general question is yes, you can programmatically login to Google Accounts. See my post here for the steps involved: http://groups.google.com/group/google-appengine/browse_thread/thread/bbb2b83d577fedd8/69df83cd23850d58?lnk=gstq=android#69df83cd23850d58 But what exactly are you trying to do? Well I wanted to associate extra information in my datastore to the logged in user but I think I will just go with this mechanism. Its much cleaner and simpler. http://www.lifedelimited.com/2009/custom-authentication-on-google-app-engine/ Lenza blog.lenza.org On Mar 10, 12:13 pm, Ritesh Nadhani rite...@gmail.com wrote: Hi Can I dynamically authenticate a user with Google Accounts? Then I can use users.get_current_user(). -- Riteshhttp://www.riteshn.com -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: jQuery while doing Ajax call
Aaah, after working over the weekend finally figured it out. Its because jScript does not serialize/desrialize XML objects. So i had to use one of the plugins out there to do the same. Now I can do the XMLRPC calls and it works. On Mon, Mar 9, 2009 at 1:32 AM, Michael O'Brien mich...@mcobrien.org wrote: Hi Ritesh, the problem is that specifying dataType: xml doesn't tell jQuery it should send the data in XML, just that it should expect XML to be returned from the url. You need to construct the XML yourself and set the contentType option to text/xml to actually send your data as XML. http://docs.jquery.com/Ajax/jQuery.ajax#options cheers Michael On Mar 9, 2:07 am, Ritesh Nadhani rite...@gmail.com wrote: Hmm. I am not sure how JSON would be simpler then XML. Also, some other system use the same XMLRPC without any problem. The problem seems to be that jquery is not serializing the data to actual XML data and thus server is failing with ExpatParse error. Thoughts? On Sun, Mar 8, 2009 at 5:46 AM, Let Delete My Apps davide.rogn...@gmail.com wrote: Hi Ritesh Nadhani, I think your code is complex. Can you try another more simple way, for example using the JSON/JSON-P technique? View the source code of my last app: http://pyoohtml.appspot.com/let-delete-my-apps/home . . On Mar 8, 12:49 pm, Ritesh Nadhani rite...@gmail.com wrote: Hi Any idea what might be wrong with this AJAX AJAX call:http://paste.pocoo.org/show/106941/-its always returning me XMLParse error but when done thru my Python client, it works. When I just do: response.write(request.raw_post_data) - i get var1=value1var2=value2 etc. Rather then the actual XML so the server is giving me all kinds of Expat parsing error. My code to implement an XML-RPC:http://paste.pocoo.org/show/106945/ Django code from:http://code.djangoproject.com/wiki/XML-RPC -- Riteshhttp://www.riteshn.com -- Riteshhttp://www.riteshn.com -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] jQuery while doing Ajax call
Hi Any idea what might be wrong with this AJAX AJAX call: http://paste.pocoo.org/show/106941/ - its always returning me XMLParse error but when done thru my Python client, it works. When I just do: response.write(request.raw_post_data) - i get var1=value1var2=value2 etc. Rather then the actual XML so the server is giving me all kinds of Expat parsing error. My code to implement an XML-RPC: http://paste.pocoo.org/show/106945/ Django code from: http://code.djangoproject.com/wiki/XML-RPC -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: jQuery while doing Ajax call
Hmm. I am not sure how JSON would be simpler then XML. Also, some other system use the same XMLRPC without any problem. The problem seems to be that jquery is not serializing the data to actual XML data and thus server is failing with ExpatParse error. Thoughts? On Sun, Mar 8, 2009 at 5:46 AM, Let Delete My Apps davide.rogn...@gmail.com wrote: Hi Ritesh Nadhani, I think your code is complex. Can you try another more simple way, for example using the JSON/JSON-P technique? View the source code of my last app: http://pyoohtml.appspot.com/let-delete-my-apps/home . . On Mar 8, 12:49 pm, Ritesh Nadhani rite...@gmail.com wrote: Hi Any idea what might be wrong with this AJAX AJAX call:http://paste.pocoo.org/show/106941/- its always returning me XMLParse error but when done thru my Python client, it works. When I just do: response.write(request.raw_post_data) - i get var1=value1var2=value2 etc. Rather then the actual XML so the server is giving me all kinds of Expat parsing error. My code to implement an XML-RPC:http://paste.pocoo.org/show/106945/ Django code from:http://code.djangoproject.com/wiki/XML-RPC -- Riteshhttp://www.riteshn.com -- Ritesh http://www.riteshn.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---