[google-appengine] Re: What IDE the community recommend to developers of Python+GAE
hg ide discussion I started http://groups.google.com/group/comp.lang.python/browse_thread/thread/a62b1da1a956ce33/730846bafc2c16b4#730846bafc2c16b4 -- 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: Datastore Model Design
On Nov 24, 4:52 pm, Pierre Lavignotte pierre.lavigno...@gmail.com wrote: No one to help me with my model ? :'( Always Craig Larman is good ref, creator model and factory design patterns to RD. My quick advice is avoid finegraining what I briefly noticed and make more specific models since models mentioned look slightly against DRY principle and awaited already defined elsewhere. Like redefining classes Point or Rectangle which surely have API, for rationale farther avoid nameconflicts too and choose names spec to your app and keep telling how it advances. Guestbook example is very good learning ground and all always most welcome checkin my project montao.googlecode.com viewable from Fridge.Koolbusiness.com with thanks to all engineering for all superiority /Niklas -- 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] mail this group enables new optional idea
this idea to include direct link to current discussion in text very obvious to view newest discussion version. since the links are now to the group, not to the actual discussion, welcomes its consequense -- 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: What IDE the community recommend to developers of Python+GAE
On Nov 24, 11:16 pm, frankabel frank.abel...@gmail.com wrote: Hi all, I know that Java+GAE havehttp://code.google.com/eclipse/as google recommendation, but what about Python+GAE developers? Cheers Frank selenic who maintain hg could know since (easy) Mercurial IDE unavailable mentioned Eric, Boa constructor, PIDE, drPython where obviously most important question we long investig8 there supporting the other creative and constructive team project noreply :-) python IDE for hg niklasr nikla...@gmail.com google-appengine-python Hello group, Since no py IDE I found has easy hg access. IDEs PIDA and Eric claim Mercurial support not found i.e. buttons to clone, commit and push to repositories to define dev env dvcs, editor and deployment all in 1. I tested Boa Constructor, dr Python, ... Nov 20 by niklasr - 1 message - 1 author http://groups.google.com/group/google-appengine-python/browse_thread/thread/5db88a48bed8b86/5c5b4fed10a96346?lnk=gstq=hg#5c5b4fed10a96346 http://groups.google.com/group/google-appengine/browse_thread/thread/84d16163176d6ec8/d3b2acbb5dd60063?lnk=gstq=mercurial+niklasro#d3b2acbb5dd60063 http://groups.google.com/group/google-appengine/browse_thread/thread/27cadb394a1105a1/4298d418e9557676?lnk=gstq=mercurial#4298d418e9557676 http://groups.google.com/group/google-appengine/browse_thread/thread/5b6e16b912acdecf -- 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: How to design data model
On Nov 16, 6:11 am, fhucho fhu...@gmail.com wrote: Unfortunately, I'm not using Python... is there a way to make this work in Java? Absolutely. Even more (and harder) ways in Java. Most of the project (CRUD) create update delete a.k.a view add delete edit is available via montao.googlecode.com welcome view live montao.com.br migr8ing to gae web.montao.com.br and Indian version Fridge.Koolbusiness.com On Nov 16, 5:38 am, niklasr nikla...@gmail.com wrote: On Nov 15, 5:48 pm, fhucho fhu...@gmail.com wrote: Hi, I am developing a web app, where users should be able to (in this order): 1) create their item type (item type can be everything - car, book, movie..., item type has some user defined parameters, like price, rating) 2) add items of their type - e.g. they can create book type (with title, author, rating parameters) and then add books 3) view, filter (at least by one parameter), delete, edit their items How should I design the data model? Is this even posible in App Engine? Thanks in advance django has impressive builtin editor for our models with djangoforms.ModelForm seen onhttp://code.google.com/appengine/articles/djangoforms.html Theoretically the create CRUD and/or factory patternhttp://en.wikipedia.org/wiki/Factory_method_pattern I recommend and use for likewise. The categoryproperty.dbhttp://code.google.com/appengine/docs/python/datastore/typesandproper... seems obvious choice which needs documention how it differs from a word. app I maintain has similar function, create item, add item, edit, view, filter by longitude latitude and/or category (www.koolbusiness.com/ai) sourced montao.googlecode.com Sincerely Nick RTZ -- 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=.
[google-appengine] income / billing (adsense gae combined)
Feature request or do tell if you know implemented function that calulcates my ROI i/o between adsense output and e.g. gae billing for time 0. I can compute it manually registering my adsense income relative gae billing for history and sure it's technically feasible and appropriate for typical. Thank you -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-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=.
[google-appengine] Re: Best practice for environment architecture design (development, test, verification, production)
On Nov 20, 4:54 am, Anders Moberg anders.moberg.fri...@gmail.com wrote: Hi, I have searched for some kind of best practice for environment architecture design in GAE but haven't found anything (yet). I think we need 4 environments, development, test, verification and production. But that is just my initial thought. So my questions are: - What environments do you recommend? - What is easiest way to set up these environments? - Has google any official/unofficial policy against multiple versions for the “same” application? Our idea is to use a local computer for development. And 3 GAE hosted environments, where: - test would be for unit and integration test - verification for end-user-tests - production of course for the final version. I'm very interested in your thoughts and experience in this area! Regards, Anders Moberg Hejsan, most here depends whether python or java is chosen. Java has more ways to solve a problem and python the obvious way. The (python) system development model I chose is very similar to this: dev,test,prod,live + scraps adhocratively (matching innovatively supporting very quick decisions) switching (too) fast, also looking for more structural approach than ad hoc. Generally going opposite way than majority who say facts have many numbers, I use names and shapes that are easier and more natural to understand. + There're no conventions for version numberings also supporting less numbers more names. Here are some threads already mentioning environments. Spec I want IDE with Mercurial and deployment to facilit8 development integr8ing dvcs, scripting and deployment in one IDE. http://groups.google.com/group/google-appengine-python/browse_thread/thread/afadb9cad6126f92/91b9a11e25e9e326#91b9a11e25e9e326 http://code.google.com/p/appfilesbrowser/ is very good to inspect actual deployed And sure welcome inspect my main project montao.googlecode.com with many links to material I fins rel8ed if you want. __ Niklas -- 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=.
[google-appengine] Re: Getting Strange Error From Cron Job
On Nov 18, 7:44 pm, Kevin norelaxat...@gmail.com wrote: I am attempting to implement an application that performs some occasional web crawling as a component of its day-to-day functionality. The web crawling code can be executed from a jsp file. When I test it on my computer by accessing the jsp file, it performs its desired function nicely, as expected. So I decided to go try it on the app engine, and if I run it by accessing the .jsp file, I get a HardDeadlineExceededError, which I am told occurs when the request takes longer than 30 seconds, which is understandable. However, when I try to execute it as a cron job, every time it runs, it ends after about 5 seconds, with a different exception: java.lang.ClassCastException: java.lang.ArrayIndexOutOfBoundsException cannot be cast to javax.servlet.ServletException ...and the stack trace doesn't reference any of my code at all, which is making this difficult to debug. Does anyone have a clue what might be causing something like this? I'd reproduce and track exactly where, either in engine or app, find the iteration or recursion accessing the Array and we know more. Array or ArrayList is the best structure and trying to access element outside array means an array index calculation went one beyond predefined Array length. Meantime here's a good old classic themed crawling http://www.weyrich.com/book_reviews/internet_agents.html technical and cultural Sincerely Nick Rosencrantz In fact there're 2 errors here, the (expensive) casting fails and it tries accessing a row element longer than the row. Which could be a Vector internally Array implemented. Vector internally -- 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=.
[google-appengine] Re: How to design data model
On Nov 15, 5:48 pm, fhucho fhu...@gmail.com wrote: Hi, I am developing a web app, where users should be able to (in this order): 1) create their item type (item type can be everything - car, book, movie..., item type has some user defined parameters, like price, rating) 2) add items of their type - e.g. they can create book type (with title, author, rating parameters) and then add books 3) view, filter (at least by one parameter), delete, edit their items How should I design the data model? Is this even posible in App Engine? Thanks in advance django has impressive builtin editor for our models with djangoforms.ModelForm seen on http://code.google.com/appengine/articles/djangoforms.html Theoretically the create CRUD and/or factory pattern http://en.wikipedia.org/wiki/Factory_method_pattern I recommend and use for likewise. The categoryproperty.db http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#Category seems obvious choice which needs documention how it differs from a word. app I maintain has similar function, create item, add item, edit, view, filter by longitude latitude and/or category (www.koolbusiness.com/ai) sourced montao.googlecode.com Sincerely Nick RTZ -- 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=.
[google-appengine] Re: Querys
On Nov 7, 12:00 pm, david dromerotr...@gmail.com wrote: Hello, How can I know how many items it returns a query? Example: eventos = db.GqlQuery (SELECT * FROM Evento) How many items? Other question. How can I do random of numers in python? See you. Thanks. python list size or eventos.count() work or already answered question best way with more info following link, http://stackoverflow.com/questions/421751/whats-the-best-way-to-count-results-in-gql and merging pure python lists using multiple queries is also doable breaking 1000 limit. where earlier random numbers was discussed: http://groups.google.com/group/google-appengine/browse_thread/thread/b3b41fb86f62b229/bea0d6a880cf01fa?lnk=gstq=weibull#bea0d6a880cf01fa Nick Rosencrantz --~--~-~--~~~---~--~~ 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: Unable to Connect to Datastore
On Oct 27, 5:00 am, Chris H bassdr...@gmail.com wrote: Hi, We are currently having issues connecting to our datastore. Is anyone else seeing this issue? File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1579, in fetch raw = raw_query.Get(limit, offset) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1063, in Get prefetch_count=limit)._Get(limit) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1000, in _Run raise _ToDatastoreError(err) Timeout We currently have around 300,000 entries in the database. The code does a plain .all() on the model. The error occurs when we attempt to fetch any number of results from the query. query = User.all() entries = query.fetch(9) # this triggers the error We are also unable to view any data using the data viewer on the dashboard. Any ideas? Chris Hannam 2: code.google.com/p/appfilesbrowser/source/browse/trunk/onlinedebug/onlinedebug.py, pay or just intermittence thrice I do --~--~-~--~~~---~--~~ 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] intensity measure
Hey For not reinventing already elsewhere, a good function will be intensity measure ie average time between new entities. We can add this ourselves and welcome further comments. Basically for any model display average time between 2 new and benchmarks, what meantime is fast growth. Sincerely Nick R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: how to convince client
On Oct 14, 12:52 am, Richard richar...@gmail.com wrote: hello, the App Engine webpage has lots of good information for developers like us, but what about for our clients? My client is skeptical about deploying on GAE, so I'd like to show him some propaganda about uptime, costs, etc. Is there anything available, ideally a short video? cheers, Richard Clasically, make 2 columns: Advantages - Disadvantages Or 3 columns. --~--~-~--~~~---~--~~ 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: Broadcasting real-time notifications using XMPP - possible?
XMPP multicast certainly is doable for instance via the official good gae xmpp project already achieving similar functions, broadcasting answers to questions when answers appear, is http://code.google.com/appengine/articles/using_xmpp.html and seems able to do what you want with small modification (to multicasting) just calling xmpp functions accordingly. I test it smallscale awaiting it's very scalable. --~--~-~--~~~---~--~~ 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: Ask GAE: XMPP and WebSockets in the foreseeable future?
via http://apps.sameplace.cc/chat/chat.xhtml it responds well. sockets are oldfashioned for one opinion, the less numbers the better. --~--~-~--~~~---~--~~ 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: Generate cryptographically secure random number
7 generators are Lehmer, Rotenberg, GGL, Neave Oakenfull (2) and Wichmann-Hill docs.python.org/library/random.html Weibull function or Brownian motion are also wellknown randomnesses: import random print random.weibullvariate(2,2) output: 1.85255758863 --~--~-~--~~~---~--~~ 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: What are your top three issues in appengine?
define 3in1 workui integrated vcs,edits and deployments http://code.google.com/p/googleappengine/issues/detail?id=2136 internationalisation and localisation http://code.google.com/p/googleappengine/issues/detail?id=2134 3rd, use yaml for everything trivial --~--~-~--~~~---~--~~ 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: Pagination with Ranking
count 1000 split according to time or any, example improvable with dynamical increment (make dependant dayinc) def get(self):#sums 1000 import time from datetime import datetime, timedelta inc = datetime.now ()-timedelta(days = 1000) dayinc = 10 #ok while return 1000 every 10 days sum = 0 while(inc datetime.now()): ads = Ad.all().filter(modified , inc + timedelta(days = dayinc)).filter(modified , inc).count() inc = inc + timedelta (days = dayinc) sum=sum+ads self.response.out.write(sum) and sorting in pure python with one's own order always works or use the pattern called comparable, --~--~-~--~~~---~--~~ 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: Load Django Template from database
generally, avoid markup in datastore is good, do intermediary, yaml is good --~--~-~--~~~---~--~~ 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: I know Perl - which is better to adopt java / python
On Sep 12, 7:59 am, abhishek abhishek.netj...@gmail.com wrote: Hi friends, I consider myself to be good in Perl, i know google app engine is not for Perl,i need to know which is the better option now for me to develop applications for google app - Java / Pyhton. I am thinking about java though. Also can you point me any tutorial for that apart from those already on google app site,also is there any framework etc for this development in java, thanks abhishek all good, in sense equivalent, I tried whole bunch, perl, java and ruby appear have more tools to same job ie more workarounds and can implement in another and viceversa, ruby I tried too, very good but if you want something the closest to natural semantics: yaml and achieve the purpose via minimal files: python. for one small scaffolding test with ruby there were many more things risking break than py closest to os powerful will be shellscripts awk,sort you know. NickR --~--~-~--~~~---~--~~ 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: drop down choice with dynamic fields
On Aug 29, 4:41 pm, yoyoteng yoyot...@gmail.com wrote: Hi all, One question to you GAE experts. I'm using the python version by the way. I'd like to create a form in Google App Engine with 2 fields, say A and B, and the choices of field B is restricted by A. For example, A have choices ['a', 'b'], and B have choices ['a-a','a-b','b-c','b-d']. and if A is selected to be 'a', then the choices for B will only have ['a-a','a-b'], while if A is selected to be 'b', then the choices for B will only have 'b-c', 'b-d'. I've tried searching for some possible solutions [1,2,3], and they all require use of python AND javascripts, where javascripts are used to filter out the choices of a field (whatever that means... I only have 2 months experience in this GAE/django-like framework, and no experience in javascripts). As of now, I am planning to use the method provided in [1], but I was hoping if there is any other way to implement this sort of dynamically changing forms without using javascripts? [1]http://bradmontgomery.blogspot.com/2008/11/simple-django-example-with... [2]http://www.nerdydork.com/dynamic-filtered-drop-down-choice-fields-wit... [3]http://stackoverflow.com/questions/796466/how-to-limit-choice-field-o... Sort of, primitively, yes, meta refreshing elements or whole page, dhtml or iframe however all standard ways doing this common component depends on javascript. I too plan something more userfriendly than interdependent menus. A textonly app version is very usable since we can't expect all users to have a windowmanager for very fast textbrowsers lynx or links running without a windowmanager. --~--~-~--~~~---~--~~ 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: Retrieving Source from GAE
On Sep 3, 12:48 pm, ae gappengin...@gmail.com wrote: Hi, I had a couple of hard drives die one after the other in a shot period of time so I lost all my source code. Can someone from Google please PLEASE help me retrieve the source from GAE? Thanks. appfilesbrowser.googlecode.com can handle it when integrated. also according to old info groups.google.com/group/google-appengine/browse_thread/thread/ fefbff79e6f4b16d/6a1e297b442e7b64 Naturally we fancy and await more integrated vcs to our deployments, if it won't come we'll build it. --~--~-~--~~~---~--~~ 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: Text based RPG
On Sep 3, 9:57 pm, Matthew Kramer ran...@gmail.com wrote: I'm really new with python and google appengine and I'm still trying to figure out how to work things with it. I'm going to try and make a text based rpg and I was wondering if anyone could give me some pointers and easy ways to get me started. Thanks for any help given :) Common types are adventure, world, place, actor, thing, player, view, command, and prioqueue. We may view an adventure in a view in a world looking for some special thing. Important are both classes ie thing with name and subclasses to food, tools, or creatues and also wellchosen data structures to serve the purpose: a prio queue with future, a binary tree to store the gamepath or a more advanced trie structure and store actions taken on a stack to quickly access way back and last move in a maze. A classic maze à la Zork, thing like Dallas Quest or any classic renewed will be fun. --~--~-~--~~~---~--~~ 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: Pretty URLs
On Aug 25, 10:29 pm, pistacchio pistacc...@gmail.com wrote: Hi, maybe I'm missing something from the documentation (I'm just starting), but generally, how does url handling work in GAE? Apart from the basics like --- application = webapp.WSGIApplication([('/', MainPage), ('/test', Test)]) --- that map myapplication and myapplication/test, how do I map something like myapplication/forum/show/1234 ? Thanks in advance regex [0-9]* matches 1234 webapp.WSGIApplication('/([0-9]*)/([^/]*)',Id),('/([0-9]*)',Id) then match id from query to instance a=db.get(db.Key(str(db.Key.from_path('A',int(id) Sincerely NickRTZ. --~--~-~--~~~---~--~~ 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: App Engine serving all pages as html -
Try if you like gzipped sitemap.xml.gz approved via google webmaster tools, Http header: Content-Type: gzip import zlib import gzip import string import os import gzip import StringIO class SiteMap(webapp.RequestHandler): def get(self): start = datetime.now() - timedelta (days = 91) url = os.environ['HTTP_HOST'] if os.environ.get('HTTP_HOST') else os.environ['SERVER_NAME'] items= Item.gql(where published = True and modified :1, start) output = '?xml version=1.0 encoding=UTF-8?urlset xmlns=http://www.sitemaps.org/schemas/sitemap/0.9; ' for item in items: output =output + 'urllochttp://%s/%s/%s/loclastmod%s/ lastmodchangefreqdaily/changefreqpriority0.8/priority/url' %( url,item.key().id(),defaultfilters.slugify (item.title),item.modified.date() ) output = output + '/urlset' self.response.headers[Content-Type] = 'gzip' buf = compressBuf(output) self.response.headers['Content-Length'] = str(len(output)) self.response.out.write(buf) def compressBuf(buf): zbuf = StringIO.StringIO() zfile = gzip.GzipFile(None, 'wb', 9, zbuf) zfile.write(buf) zfile.close() return zbuf.getvalue() --~--~-~--~~~---~--~~ 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] dataviewer complication
Hello Recently there were results I can't understand from the dataviewer console: SELECT * FROM Article order by added desc #The above works to view entities SELECT * FROM Article where published=True #The above works to view lists entities The following however generates a server error SELECT * FROM Article where published=True order by added desc #Server Error It happens with 2 independent applications. The queries used to work. Please inform what could be the case. Thank you ___ NickRTZ --~--~-~--~~~---~--~~ 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] indexes exceeding quota
Indexes seem to be stuck building forever and a text appeared warning Your application is exceeding a quota: Datastore Indices Count help Could somebody please explain what to do? Thank you Niklas --~--~-~--~~~---~--~~ 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: Creating a filter using google api
On May 11, 6:13 am, Nikhar nikhar...@gmail.com wrote: Hi I wanna create a filter and add it to my application using an google api can some help me with it i have reached up to some extent bt can't make it display .. easiest way is fork an existing project, then either filter according to inequality or equality by your choice, implementation preferred is either python or java though the most trivial app should be possible, if it'd be up2me, with nothing but yaml, for minimalism. i learnt many things from srv.appspot.com whose sources are public gae-services- examples.googlecode.com best wishes NiklasR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: django urlize
+)) ?)(?:/(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))+)(?:\+(?:(?: [a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))+))*(?:\?(?:(?:[a-zA-Z\d$\-_ .+!*'(),]|(?:%[a-fA-F\d]{2}))+))?)?(?:;esn=(?:(?:[a-zA-Z\d$\-_.+!*'(), ]|(?:%[a-fA-F\d]{2}))+))?(?:;rs=(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA -F\d]{2}))+)(?:\+(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))+))*) ?))|(?:cid:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[;?:@= ])*))|(?:mid:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[;?:@ =])*)(?:/(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[;?:@=] )*))?)|(?:vemmi://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z \d])?)\.)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:. +(?:\d+)){3}))(?::(?:\d+))?)(?:/(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a -fA-F\d]{2}))|[/?:@=])*)(?:(?:;(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a -fA-F\d]{2}))|[/?:@])*)=(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d ]{2}))|[/?:@])*))*))?)|(?:imap://(?:(?:(?:(?:(?:(?:(?:[a-zA-Z\d$\-_.+ !*'(),]|(?:%[a-fA-F\d]{2}))|[=~])+)(?:(?:;[Aa][Uu][Tt][Hh]=(?:\*|(?:( ?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[=~])+?)|(?:(?:;[ Aa][Uu][Tt][Hh]=(?:\*|(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2 }))|[=~])+)))(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[ =~])+))?))@)?(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d]) ?)\.)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:\.(?: \d+)){3}))(?::(?:\d+))?))/(?:(?:(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?: %[a-fA-F\d]{2}))|[=~:@/])+)?;[Tt][Yy][Pp][Ee]=(?:[Ll](?:[Ii][Ss][Tt]| [Ss][Uu][Bb])))|(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2})) |[=~:@/])+)(?:\?(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[ =~:@/])+))?(?:(?:;[Uu][Ii][Dd][Vv][Aa][Ll][Ii][Dd][Ii][Tt][Yy]=(?:[1- 9]\d*)))?)|(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[=~ :@/])+)(?:(?:;[Uu][Ii][Dd][Vv][Aa][Ll][Ii][Dd][Ii][Tt][Yy]=(?:[1-9]\d* )))?(?:/;[Uu][Ii][Dd]=(?:[1-9]\d*))(?:(?:/;[Ss][Ee][Cc][Tt][Ii][Oo][Nn ]=(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{2}))|[=~:@/])+)))?)) )?)|(?:nfs:(?:(?://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA- Z\d])?)\.)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?: \.(?:\d+)){3}))(?::(?:\d+))?)(?:(?:/(?:(?:(?:(?:(?:[a-zA-Z\d\$\-_.!~*' (),])|(?:%[a-fA-F\d]{2})|[:@=+])*)(?:/(?:(?:(?:[a-zA-Z\d\$\-_.!~*'(), ])|(?:%[a-fA-F\d]{2})|[:@=+])*))*)?)))?)|(?:/(?:(?:(?:(?:(?:[a-zA-Z\d \$\-_.!~*'(),])|(?:%[a-fA-F\d]{2})|[:@=+])*)(?:/(?:(?:(?:[a-zA-Z\d\$- +_.!~*'(),])|(?:%[a-fA-F\d]{2})|[:@=+])*))*)?))|(?:(?:(?:(?:(?:[a-zA- Z\d\$\-_.!~*'(),])|(?:%[a-fA-F\d]{2})|[:@=+])*)(?:/(?:(?:(?:[a-zA-Z\d \$\-_.!~*'(),])|(?:%[a-fA-F\ On 23 Apr, 09:51, djidjadji djidja...@gmail.com wrote: You must add a space between the _urls_ urlize('djangoproject.com (www.djangoproject.com)', nofollow=True) urlize is very short sighted. the following url will not be matched urlize('www.bbc.co.uk') Any other domain then .com .net .org URLs must be preceded with http:// or https:// urlize('http://www.bbc.co.uk') works 2009/4/22 niklasr nik...@montao.com.br: dear group, django urlize works a bit dubiously för unobvious inputs for example 'Check out djangoproject.com(www.djangoproject.com)' would have expected output 'Check out djangoproject.com(a href=http://www.djangoproject.com; rel=nofollo.djangoproject.com/a)' but is Check out a href=http://djangoproject.com(www.djangoproject.com rel=nofollowdjangoproject.com(www.djangoproject.com/a) There are many ways to improve / fix it (either the i/o or itself) and all comments are very welcome. best regards Niklas --~--~-~--~~~---~--~~ 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] django urlize
dear group, django urlize works a bit dubiously för unobvious inputs for example 'Check out djangoproject.com(www.djangoproject.com)' would have expected output 'Check out djangoproject.com(a href=http://www.djangoproject.com; rel=nofollo.djangoproject.com/a)' but is Check out a href=http://djangoproject.com(www.djangoproject.com rel=nofollowdjangoproject.com(www.djangoproject.com/a) There are many ways to improve / fix it (either the i/o or itself) and all comments are very welcome. best regards Niklas --~--~-~--~~~---~--~~ 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: Download code
merging GAEAppFileBrowser's app.yaml handlers into one's own app.yaml enables it. try paste the 2 rows - url: /listfiles.* script: listfiles.py and optionally - url: /onlinedebug.* script: onlinedebug/onlinedebug.py - url: /static static_dir: static Niklas On Feb 23, 11:29 pm, Luis Gonzalez luis...@gmail.com wrote: Sorry, but there's something that's not quite clear: I understand that I must place all files within src into the root directory. But I don't understand what to do with the yaml files. Because now I have two app.yaml files (my site's one and GAEAppFileBrowser's one)... On 20 feb, 06:29, niklasr nikla...@gmail.com wrote: Placing files from the GAEAppFileBrowser.rar src folder in the app's root directory,( listfiles.py in the same root folder as app.yaml ) and the yaml from the appfilesbrowser's app.yaml to the destination app.yaml (and keeping filenames unique) installs it. Sincerely Niklas On Feb 19, 2:41 am, luismgz luis...@gmail.com wrote: Very interesting! But please explain, how should I install this? Should I place the src folder in the rrot directory? Should I copy the files? How should I avoid conflicts with my own scripts (.py, yaml, static, etc)? Luis On 9 feb, 20:44, niklasr nikla...@gmail.com wrote: I includehttp://appfilesbrowser.googlecode.com/files/GAEAppFileBrowser.rar and download deployed source to local. Datastore backup solution seems to be approcket. regards Niklas --~--~-~--~~~---~--~~ 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: Get host name
Host name and server name are available from os.environ. if os.environ.get('HTTP_HOST'): url = os.environ['HTTP_HOST'] else: url = os.environ['SERVER_NAME'] Regards, Niklas On Feb 22, 3:26 pm, Yossi yossi@gmail.com wrote: How do I get the host name of my application from a python module? Thanks, Yossi --~--~-~--~~~---~--~~ 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: Download code
Placing files from the GAEAppFileBrowser.rar src folder in the app's root directory,( listfiles.py in the same root folder as app.yaml ) and the yaml from the appfilesbrowser's app.yaml to the destination app.yaml (and keeping filenames unique) installs it. Sincerely Niklas On Feb 19, 2:41 am, luismgz luis...@gmail.com wrote: Very interesting! But please explain, how should I install this? Should I place the src folder in the rrot directory? Should I copy the files? How should I avoid conflicts with my own scripts (.py, yaml, static, etc)? Luis On 9 feb, 20:44, niklasr nikla...@gmail.com wrote: I includehttp://appfilesbrowser.googlecode.com/files/GAEAppFileBrowser.rar and download deployed source to local. Datastore backup solution seems to be approcket. regards Niklas --~--~-~--~~~---~--~~ 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: Secure Feeds (RSS, ATOM)
i use gae-rest http://www.ohloh.net/p/gae-rest after finding that r.e.s.t. is more preferable than s.o.a.p. conditioned users.get_current_user() == feed.user for security. feeds should be part of the standard webapp framework but are not and according to what i read the django's syndication feature is unsupported with the gae's default request handler.http:// docs.djangoproject.com/en/dev/ref/contrib/syndication/?from=olddocs You may view my sample gae feed test start http://feeds2.feedburner.com/gaerest On Jan 23, 8:45 pm, MajorProgamming sefira...@gmail.com wrote: Does anyone know of how to deal withsecurefeeds: For example, suppose I have a feed that should only give infromation to a user when s/he's logged in. What's the best (and mostsecure) way to implement this?:? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: prepopulate form fields according to http get parameters
I agree and plan to keep labels and values for options (alternating list or dictionary) and optionValueFromQuery getparameter tag we get from library or make. (EL tags can do it so django tags can.) option value='currentOptionValue' {% ifequal currentOptionValue optionValueFromQuery %}selected{% endifequal %}{{currentOptionLabel}} /option Thank you Niklas --~--~-~--~~~---~--~~ 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: Download code
I include http://appfilesbrowser.googlecode.com/files/GAEAppFileBrowser.rar and download deployed source to local. Datastore backup solution seems to be approcket. regards Niklas --~--~-~--~~~---~--~~ 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: prepopulate form fields according to http get parameters
On Feb 8, 10:11 am, Alexander Kojevnikov alexan...@kojevnikov.com wrote: On Feb 8, 6:56 pm, niklasr nikla...@gmail.com wrote: I'm looking for template tags or similar that according to http get request parameters set the corresponding html form fields. To achieve the selection of an html option and populate a textfield according to the http request parameters where http get with two parameters should prepopulate a textfield and the option selected in my html form /main? q=foow=2 should set the textfield to 'foo' and the select option 2 to state selected. I saw no template tag that directly tests or handles a http get parameter but there probably is, for a more direct and favorable way than passing the request parameters and testing option by option select ... {% ifequal w 2 %} option selected value=applesApples/option {% else %} option value=applesApples/option {% endifequal %} ... Thank you Niklas This is normally done using Django forms:http://docs.djangoproject.com/en/dev/topics/forms/ Many thanks. I understand google.appengine.ext.db.djangoforms.ModelForm or django.forms.Form or just loop the options and set the selected, if only there was an optionFromQuery value: {% for currentOption in allOptions %} option value={currentOption} {% ifequal currentOption optionFromQuery %} selected{% endifequal %}{currentOption}/option{% endfor %} Best regards Niklas --~--~-~--~~~---~--~~ 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: Using Portuguese Language for inputs
On Feb 7, 4:06 am, moises.soa...@gmail.com moises.soa...@gmail.com wrote: Hi, this is a very begginer question. I use this code to render de template: path = os.path.join(os.path.dirname(__file__), 'contacto.html') self.response.headers[Content-Type] = text/html; charset=iso-8859-1 self.response.out.write(template.render(path, {})) I have one form where i am trying to input words like: Águeda, Açores, ... The code to get the words is: cidade = self.request.get('cidade') I think some problem related with charset is apenning because in de database the words are : gueda, A , ... charset utf-8 will work. Portuguese gae i/o may require utf-8. As portuguese i/o from html form with method=post and backend thing.title = self.request.POST.get('title') displays http://www2.montao.com.br/14008/cmbio-mdulo-de-injeo-elet-e-motor-de-partida Regards Niklas --~--~-~--~~~---~--~~ 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] gae-rest rss atom
How do we set attributes to undisplayed / hidden / private with gae- rest? My rss feed seems shows too many attributes. The question is how to set isPrivate boolean attribute for hidden content such as email addresses. GAE-REST http://github.com/fczuardi/gae-rest/tree/master Thank you Niklas --~--~-~--~~~---~--~~ 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: date range in query
gql as below works. SELECT * FROM Image where added DATETIME(2009,1,1,0,0,0) and added DATETIME(2009,2,1,0,0,0) we must use the integer form (the manual lists b0rked forms) http://code.google.com/p/googleappengine/issues/detail?id=878 cheers niklas On Feb 3, 12:02 pm, arnie parvez...@rediffmail.com wrote: For a datastore table with two db.DateTimeProperty columns start_date and end_date, i need to use a date range in query but below given query is not working current_date=datetime.datetime.strptime(self.request.get ('current_date'), '%Y-%m-%dT%H:%M:%S') db.GqlQuery('SELECT * FROM myTable where start_date=:cdate and end_date=:cdate',cdate=current_date) in the parameters I am passing current_date=2009-01-10T00:00:00 Should we not compare dates this way? But this is not working --~--~-~--~~~---~--~~ 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: Location tracking with AppEngine
tips for guessing theirlocationif they don't have Gears installed? (Keep in mind, I'm looking at the neighborhood/metro level). geoip is one established way. display client location works with geoip (with a gmap (such as classifiedsmarket.appspot.com)) brCountry Code: script language=JavaScriptdocument.write(geoip_country_code());/ script brCountry Name: script language=JavaScriptdocument.write(geoip_country_name());/ script brCity: script language=JavaScriptdocument.write(geoip_city());/script brRegion: script language=JavaScriptdocument.write(geoip_region());/ script brLatitude: script language=JavaScriptdocument.write(geoip_latitude());/ script brLongitude: script language=JavaScriptdocument.write(geoip_longitude());/ script and reverse geocodes: var reversegeocoder = new GReverseGeocoder(map); GEvent.addListener(reversegeocoder, load, function(placemark) { document.getElementById(message).innerHTML = placemark.address } ); regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Static File Questions
On Jan 25, 6:22 am, James Ashley james.ash...@gmail.com wrote: On Jan 9, 3:34 pm, niklasr nikla...@gmail.com wrote: example: upload a 2 MB file through a html form, split it serverside into 2 or 3 parts, then store the parts as blobs of max 1 MB each. It's inconvenient yet a method to serve large files with no difference towards the client. Is this a new development? Last I checked, a request 1MB would just fail. It's probably been possible since gae start, only too complicated. Requests 1MB from html upload form are read: file = self.request.POST.get('file').file.read() len = file.__len__() or in MB len = file.__len__()/(1024.0*1024.0) With above code I can determine filesizes 1 MB. Then storing and serving the larger files requires partitioning at max 1 MB. best regards Niklas --~--~-~--~~~---~--~~ 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: Static File Questions
Reversibly breaking and remaking larger than 1MB files persistently storing max 1 MB chunks, gae http get and post support the larger. The gae http transport as it is handles larger files. The 1MB limit only limits the entities, not the transport. On Jan 8, 11:59 pm, MajorProgamming sefira...@gmail.com wrote: Just a few questions on static files: 1. Does serving a static file cost CPU usage? 2. Does having a large number of static files (let's say like 700) have _any_ effect on performance of page serving [similarly, does having a lot of mappings affect performance]? 3. When a python script reads a file off the app's filesystem (like a template html file), is that any faster than a get_by_key on the datastore? [i.e. filesystem vs. bigtable performance]? 4. Will the paid version of Google App Engine allow over 1000 files and/or larger than 1MB files (or entities)? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Static File Questions
example: upload a 2 MB file through a html form, split it serverside into 2 or 3 parts, then store the parts as blobs of max 1 MB each. It's inconvenient yet a method to serve large files with no difference towards the client. On Jan 9, 8:36 pm, MajorProgamming sefira...@gmail.com wrote: I'm not sure I understand you. Which question # were you trying to answer? On Jan 9, 3:26 am, niklasr nikla...@gmail.com wrote: Reversibly breaking and remaking larger than 1MB files persistently storing max 1 MB chunks, gae http get and post support the larger. The gae http transport as it is handles larger files. The 1MB limit only limits the entities, not the transport. On Jan 8, 11:59 pm, MajorProgamming sefira...@gmail.com wrote: Just a few questions on static files: 1. Does serving a static file cost CPU usage? 2. Does having a large number of static files (let's say like 700) have _any_ effect on performance of page serving [similarly, does having a lot of mappings affect performance]? 3. When a python script reads a file off the app's filesystem (like a template html file), is that any faster than a get_by_key on the datastore? [i.e. filesystem vs. bigtable performance]? 4. Will the paid version of Google App Engine allow over 1000 files and/or larger than 1MB files (or entities)? Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: return a variable value from html form to python
Hey Brian, Maybe it's as easy as g_place = self.request.POST.get('place') instead of g_place = self.request.get('place') Cheers Niklas Stockholm On Jan 4, 11:18 am, thebrianschott schott.br...@gmail.com wrote: Having received no replies, let me say a little more. If I add the following line into the beginning of function process (form), the POST does successfully POST the value of place, but the values of all the other hidden form inputs are *not* POSTED. And I cannot add lines like the following one for the other hidden form inputs because they are not known and must be taken from the user's map settings. form.place.value = String({{place|addslashes}}); Perhaps I should have included the following html code in the original posting, too. (The map is dragged about --recentered-- and zoomed by the user, so these initial settings are revised before the form is POSTed). ***more relevant html code below** var map = new GMap2(document.getElementById(map), {draggableCursor:default}); map.addControl(new GLargeMapControl()); map.setCenter(new GLatLng(24.21,-41.48), 2); ***more relevant html code above** Here is another critical piece of information. If I replace the following line in process(form) with the second line below, I still get an error message that center_lat is an empty string. So it appears that the POST method is not working the way I have it constructed. form.center_lat.value = String(map.getCenter().lat()); form.center_lat.value = String(34); Please help with this POST problem. Brian in Atlanta On Jan 2, 9:03 am, thebrianschott schott.br...@gmail.com wrote: I cannot retrieve the value of the variable g_place in the following python script back from add_place.html. g_place is effectively sent to add_place.html in the def get(self) section of class AddPlace, but g_place is not returned to the python script in the def post(self) section of class AddPlace. g_place is sent to add_place.html and placed in the var iwform with the phrase {{place|escape}}. (I hope I have provided enough information. I am reluctant to upload this buggy version to GAE, so I cannot just provide a link. Please advise if there is another protocol/procedure I should be using to provide the code as a link.) Thanks, Brian in Atlanta ***relevant python code below** class MainPage(webapp.RequestHandler): def get(self): place_id = self.request.get(place, None) place= Group(key_name=place_id) place.place = place_id place.user = user place.put() key = db.Key.from_path(Group, place_id) path = os.path.join(os.path.dirname(__file__), 'add_place.html') template_values = dict(place_id=place.key(), place=place.place) self.response.out.write(template.render(path, template_values)) class AddPlace(webapp.RequestHandler): #creates blank template_values def get(self): g_place = self.request.get('place') user = users.get_current_user() param = 'add_place.html' path = os.path.join(os.path.dirname(__file__), param) template_values = dict(place=g_place) self.response.out.write(template.render(path, template_values)) #creates initial group attribute values def post(self): g_place = self.request.get('place') group= Group(key_name=g_place) group.place = g_place group.center_lat = float(self.request.get('center_lat')) group.center_lng = float(self.request.get('center_lng')) group.zoom = int(self.request.get('zoom')) group.put() self.redirect(/?place=%s % g_place) application = webapp.WSGIApplication( [('/', MainPage), ('/details.txt', Details), ('/add_place', AddPlace)], debug=True) ***relevant python code above** ***relevant html code below** var lastmarker; var myEventListener; var iwform = 'Enter your group\'s information:br' + 'form method=POST onsubmit=return process(this) action=add_place' + 'Group Name or Initials: ' + 'br /' + 'strong{{place|escape}}/strong' + 'br /' + ' input type=hidden name=place value={{place| addslashes}}/' + ' input type=hidden name=center_lat/' + ' input type=hidden name=center_lng/' + ' input type=hidden name=zoom/' + ' input type=submit value=Submit /' + '\/form'; function process(form) { // == populate map data form.center_lat.value = String(map.getCenter().lat());
[google-appengine] serverside reverse geocoding
I save one geopt per entity and want to display its location breadcrumb from its view i.e. localityname administrativeareaname nation The only way seems to be gmaps javascript api as no gae serverside function is available for reverse geocoding. Can we expect serverside reverse geocoding from future gae api? Is setting page content with javascript less SEO-friendly (I think so) as crawlers may not register javascript content? Any other tips on locations breadcrumb navigation? Thank you Niklas --~--~-~--~~~---~--~~ 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: one application multiple alias domain
Sure you can. For each domain just apply the same app. Niklas On Jan 1, 2:29 pm, gops patelgo...@gmail.com wrote: is there any way in google apps to add gooogle app engine app and run it for multiple domain alias. i.e. www.maindomain.com/mypage.htmlandwww.aliasdomain.com/mypage.html will show same page. can anybody confirm weather it is possible or not ? --~--~-~--~~~---~--~~ 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: a reusable method for deleting bad ReferenceProperty properties
Thing is the timeout. I manage inconsistencies from this start. Also check appengine admin which catches bad references. http://code.google.com/p/appengine-admin/ http://dpaste.com/hold/99361/ class ImagePage(webapp.RequestHandler): def get(self): if users.is_current_user_admin(): if self.request.get('h'): from datetime import datetime, timedelta then = datetime.now () - timedelta (hours = int (self.request.get('h'))) query = db.GqlQuery(SELECT * FROM Image where added :1 ORDER BY added desc, then) else: query = db.GqlQuery(SELECT * FROM Image ORDER BY added desc limit +self.request.get('limit')+ offset +self.request.get ('offset')) count = query.count() self.response.out.write(str(count)+'table border =1') for image in query: self.response.out.write('trtda href=/admin/Image/ edit/%s/img src=/gallery/%s' % (image.key(), image.key ())) self.response.out.write('.'+image.thumb_ext+'/a') try: self.response.out.write('/tdtda href=/%d/url' % image.reference.key().id ()) self.response.out.write('%s/a' % image.reference.url+'br/ '+image.reference.title) self.response.out.write('/tdtd %s ' % image.reference.added) self.response.out.write('/tdtdad published? %s ' % image.reference.published) self.response.out.write('/tdtdimage published? %s ' % image.published) self.response.out.write('/tdtda href=/edit?id= %dEdit ad/a - ' % image.reference.key().id ()) self.response.out.write('/td/tr') except: self.response.out.write('no reference') self.response.out.write('/tablebr/') nextoffset = int(self.request.get('offset')) + int (self.request.get('limit')) self.response.out.write('a href=/images.html? limit='+self.request.get('limit')+'offset='+ str(nextoffset) + 'next/a') On Dec 14, 10:47 pm, James thelevybre...@gmail.com wrote: Most of the time, the errors you get from your model properties will happen when you're saving data. For instance, if you try saving a string as an IntegerProperty, that will result in an error. The one exception (no pun intended) is ReferenceProperty. If you have lots of references and you're not completely careful about leaving in bad references, it's common to be greeted with an error like TemplateSyntaxError: Caught an exception while rendering: ReferenceProperty failed to be resolved. And this is if there's only one bad reference in the view. D'oh. I could write a try/except block to try to access all the reference properties and delete them if an exception is raised, but this functionality could surely be useful to many other developers if there was a more generic method than the one I'd be capable of writing. I imagine it would take a list of model types and try to access each reference property of each entity in each model, setting the property to None if an exception is raised. I'll see if I can do this myself, but it would definitely help to have some suggestions/snippets to get me started. --~--~-~--~~~---~--~~ 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: non-users need easy url
I want the url path to be more word-like. friendly url isn't standardized though I do [id]/[slugify(title)] e.g. /113488/bigbonus-ganhe-dinheiro-indicando-pessoas-e-compr(.htm(l)) markup a href=/{{article.key.id}}/{{article.title|slugify}} {{article.title|fix_ampersands }}/a #rewrite / handler / dispatch ('/([0-9]*)/([^/]*)', ArticleById), class ArticleById(webapp.RequestHandler): def get(self, id, title): key = str(db.Key.from_path('Article', int(id))) article = db.get(db.Key(key)) It disregards the non-unique title while keeping it in the url for intelligibility. Niklas --~--~-~--~~~---~--~~ 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: 3 feature requests
The form preview framework works with gae and the django request handler. Validation rules like serverside reg ex defining allowed phonenumber etc. and related layout details e.g. a red box around any form parameter not passing validation are related details to which I look for a lean solution. The advantage of customizing instead of the framework is more control over details and the disadvantage is that there's no autogeneration of markup as with the framework. RSS and sitemap generator are interesting to adapt to work with the default request handler as well. Thank you for the support. Niklas On 4 Dec, 01:42, Dan Sanderson [EMAIL PROTECTED] wrote: I haven't used them myself, but at first glance I don't see why they wouldn't work, assuming you're using Django for your request handling. Give 'em a try. Django features that don't work out of the box on App Engine tend to be those that use Django's ORM layer, which doesn't work with the App Engine datastore. One notable example is the admin app. -- Dan On Wed, Dec 3, 2008 at 4:00 PM, niklasr [EMAIL PROTECTED] wrote: There are 3 features from django that are interesting RSS syndication http://docs.djangoproject.com/en/dev/ref/contrib/syndication/?from=ol... Form preview framework http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-previ... Sitemap generator http://docs.djangoproject.com/en/dev/ref/contrib/sitemaps/?from=olddocs Django has these features, can we apply them to our gae projects? Niklas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] 3 feature requests
There are 3 features from django that are interesting RSS syndication http://docs.djangoproject.com/en/dev/ref/contrib/syndication/?from=olddocs Form preview framework http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-preview/#ref-contrib-formtools-form-preview Sitemap generator http://docs.djangoproject.com/en/dev/ref/contrib/sitemaps/?from=olddocs Django has these features, can we apply them to our gae projects? Niklas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] filter logs with reg exp
Hello How do we filter out requests from two or more ip numbers (googlebots, developers, etc) in the request log? I tried it like [^(123\.456|345\. 456)] but that's not it. Thanks in advance. Niklas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] geopt filter
There's the problem of show everything close to a geopt. I came around it by iterating a 2nd time after the query and saving only nearby entities to a new list as at most one property per query can have inequality filter and geohash isn't usable. So we can filter and find everything in a radius or even exactly within by geopts defined city limits. It would however be preferred to do this without the 2nd iteration. L=[] things = Thing.all().filter(modified , twomonthsback).order(- modified) if self.request.get('lat'): for thing in things: if thing.geopt: if thing.geopt.lat float(self.request.get ('lat')): L.append(thing) Despite the extra iteration this way seems better for the user than geohash as there are no borders, Now close but different geopt inputs will output more similar lists than with the geohash where the geohash border could be e.g. in the middle of a locality. Please let me know your comments. best regards, Niklas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] recognizing admins
Hello, Can there be a template tag recognizing admins e.g. {% ifadmin %}{{info}}{% endifadmin %} Similar to the APIs ( if users.is_current_user_admin() ) but from template. Thank you Niklas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Hello, World! - Fatal error when loading application configuration
Yes, replacing tabs with spaces in the .yaml solved the same problem here. On Nov 28, 1:55 pm, cashby [EMAIL PROTECTED] wrote: I'm trying to get started with Google App Engine on a Windows Vista PC. I have Python 2.52 installed the directory c:\python25 I have Google App Engine 1.1.7 installed in the directory c:\Program Files (x86)\Google\google_appengine I used python-2.5.2.msi to install Python and selected all users when promoted during installation I created helloworld.py and app.yaml as printed on the current Getting Started docs using UltraEdit 14.2 I have helloworld.py and app.yaml files in the directory c:\users\chip \helloworld Here is my helloworld.py code print 'Content-Type: text/plain' print '' print 'Hello, world!' Here is my app.yaml code application: helloworld version: 1 runtime: python api_version: 1 handlers: - url: /.* script: helloworld.py I try to start the server and run the app by typing dev_appserver.py helloworld from the C:\Users\Chip directory and get the following error C:\Users\Chipdev_appserver.py helloworld/ ERROR 2008-11-28 12:33:15,809 dev_appserver_main.py] Fatal error when loading application configuration: while scanning for the next token found character '\t' that cannot start any token in helloworld/app.yaml, line 8, column 1 When I go to my Firefox 3.0.4 browser and enterhttp://localhost:8080/ in the address bar, the following message appears in the browser window EAccessViolation Any ideas what I'm doing wrong? Thanks, Chip --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Saving files
There's db.BlobProperty as file data type blob = self.request.POST['file'].file.read() You can store files as blobs i.e. db.BlobProperty and you could store files 1 mb by complicatingly breaking the file into 1 mb datapieces. I had a look here: http://code.google.com/p/gae-services-examples/source/browse/trunk/srv/fridge/views.py On Nov 23, 2:58 am, Involute [EMAIL PROTECTED] wrote: I'm going over the introductory materials for the App Engine and have completed the tutorial. The application I'm thinking of developing involves inputting data into the datastore, then extracting it in various ways and formatting it into web pages stored at computed URLs. My reading of the App Engine docs suggests I can't do that since I can only store things in the datastore, not individual files. Just wanted to confirm that. If that's true, any suggestions for workarounds? I might be willing to bundle everything into one big file and e-mail someplace outside of the App Engine where the files get extracted and hosted, but that, too, requires storing a file, however briefly. Involute --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] counting referencecollection
django equilavent of the mako % if matched_images.count() 1: is what i want django to do however the obvious isn't {% if matched_images.count 1 %} What can it be? The reference is defined as reference=db.ReferenceProperty(announcement, collection_name = 'matched_images') Thank you NR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: gql matching DateTimeProperty
Thank you for replying, though it's still not matching from here. I've this is the datastore added -MM-DD HH:MM:SS value: 2008-06-08 22:17:45.200477 type: gd:when Still the following won't match SELECT * FROM thing WHERE added = '2008-06-08 22:17:45' It should be trivial, but how? regards Niklas On Nov 20, 7:56 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, In order to query on DateTime objects, the following methods are supported (fromhttp://code.google.com/appengine/docs/datastore/gqlreference.html): A datetime, date, or time literal, with either numeric values or a string representation, in the following forms: * DATETIME(year, month, day, hour, minute, second) * DATETIME('-MM-DD HH:MM:SS') [no milliseconds] * DATE(year, month, day) * DATE('-MM-DD') * TIME(hour, minute, second) * TIME('HH:MM:SS') -Marzia On Wed, Nov 19, 2008 at 7:03 PM, niklasr [EMAIL PROTECTED] wrote: SELECT * FROM thing WHERE added = '2008-06-08 22:17:45.200477 ' won't match Neither SELECT * FROM thing WHERE added '2008-07-08 22:17:45.200477 ' and added '2008-06-08 22:17:45.200477 ' And SELECT * FROM Ad WHERE added '2006-11-18 22:17:45.200477 ' surprisingly matches many entities. How match a day or a month interval, or an exact timepoint? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] gql matching DateTimeProperty
SELECT * FROM thing WHERE added = '2008-06-08 22:17:45.200477 ' won't match Neither SELECT * FROM thing WHERE added '2008-07-08 22:17:45.200477 ' and added '2008-06-08 22:17:45.200477 ' And SELECT * FROM Ad WHERE added '2006-11-18 22:17:45.200477 ' surprisingly matches many entities. How match a day or a month interval, or an exact timepoint? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Sample code of i18n on GAE+Django
Altering settings.LANGUAGE_CODE at runtime switches languages dynamically (while the django manual says not to i.e. You shouldn’t alter settings in your applications at runtime) e.g. english for .com and pt_BR for .com.br: from django.conf import settings if os.environ.get('HTTP_HOST'): url = os.environ['HTTP_HOST'] else: url = os.environ['SERVER_NAME'] if url.endswith('domain1.com'): settings.LANGUAGE_CODE = 'en' elif url.endswith('domain2.com.br'): settings.LANGUAGE_CODE = 'pt_BR' Manual pages say don't do this. The app does however dynamically choose between english and portuguese depending on the URL this way. I don't know why the manual advises against. Maybe performance reasons. best regards Niklas On 31 Okt, 01:57, Ary Manzana [EMAIL PROTECTED] wrote: Hi, Thanks all for the big effort you are putting in getting i18n into GAE. Did anyone find a way to choose a language dynamically? All the best, Ary On 23 oct, 22:03, Alexander Orlov [EMAIL PROTECTED] wrote: On Oct 20, 10:00 am, A.TNG [EMAIL PROTECTED] wrote: Do you have any idea? I meet some similar problems in my project too. I have investigated this issue and put a lot of time (too much!) tinkering to get it working but without success (found a really dirty hack to get it working with dev_appserver.py *locally*). However I have killed this task in my project to be able to go on with other tasks. I will post a corresponding solution here if I find a way for setting LANGUAGE_CODE *dynamically*. Maybe this issue is also unsolvable without a hack in GAE API version v.1... Looking forward for GAE API v. 2 :) Best Regards Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---