[web2py] Re: mapreduce.appspot.com

2011-07-19 Thread Plumo
You can add new types to the DAL that use GAE entities. Here is what I used to create an unindexed string type: from google.appengine.ext import db as gae db._adapter.types['noindex'] = (lambda: gae.StringProperty(multiline=True, indexed=False))

Re: [web2py] Re: storeing a db set in a storage for a map plugin

2011-07-19 Thread Manuele Pesenti
On 20/07/2011 00:34, Anthony wrote: Objects defined in your models and controllers do not survive from request to request (unless, of course, you store them somewhere, like the session). In your code, the Set object is created when you visit /default/index, but the select happens when you visit /

[web2py] Re: self.settings.remember_me_form = False

2011-07-19 Thread annet
Thanks for your reply. I apologize for not searching in the book myself, at the moment I have to juggle with bandwidth to get things done :-( Kind regards, Annet.

[web2py] self.settings.remember_me_form = False

2011-07-19 Thread pbreit
http://web2py.com/book/default/chapter/08?search=remember+me

[web2py] self.settings.remember_me_form = False

2011-07-19 Thread annet
self.settings.remember_me_form = False Is there a way to set this in an applications models file? Kind regards, Annet.

Re: [web2py] Web2py Powertables plugin : in-line editing problem.

2011-07-19 Thread Bruno Rocha
try: def editablefunction(): id = request.vars.row_id column = request.vars.column db(db.order_lines.id==id).update(column=value) * db.commit()* On Tue, Jul 19, 2011 at 7:17 AM, Will wrote: > Hello, i'm currently tryin to make the Powertable plugin's in-line > editing part work and

[web2py] adding plugin_wiki to existing application - prettydate

2011-07-19 Thread Vincent
Hi, I have an existing web2py app called "dispersion" to which I am trying to add the plugin_wiki. I added the plugin through the design interface, created an editor group and added my user to it. I can now navigate to [site]/dispersion/ plugin_wiki and create a page, however when I try to submit

Re: [web2py] How can we support standard url in web2py ?

2011-07-19 Thread Jonathan Lundell
On Jul 19, 2011, at 1:05 AM, sabbir wrote: > > A Clickatell call back url can be like this: > > http://www.mysite.com/callback.php?api_id=xxx&apiMsgId=xxx&cliMsgId=xxx&status=xxx×tamp=xxx&to=xxx&from=xxx&charge=xxx > > where I provide the base url: > http://www.mysite.com/callback.php > > and c

[web2py] Re: Running web2py on Jython

2011-07-19 Thread Chris Clark
Apologies for reanimating this old thread but I too just tried Jython with the current web2py version too :-) I made a few hacks and I can get much further, the admin interface starts BUT the ticketing system doesn't work under Jython. This means exceptions are not handled so I ended up putting so

[web2py] How can we support standard url in web2py ?

2011-07-19 Thread sabbir
Hi all, A Clickatell call back url can be like this: http://www.mysite.com/callback.php?api_id=xxx&apiMsgId=xxx&cliMsgId=xxx&status=xxx×tamp=xxx&to=xxx&from=xxx&charge=xxx where I provide the base url: http://www.mysite.com/callback.php and clickatell will add this part: ? api_id=xxx&apiMsgId=x

[web2py] Web2py Powertables plugin : in-line editing problem.

2011-07-19 Thread Will
Hello, i'm currently tryin to make the Powertable plugin's in-line editing part work and after many tries i'm currently using Bruno Rocha's suggestion in another topic: Default.py= def editablefunction(): id = request.vars.row_id column = request.vars.column db(db.order_lines.id==id).

[web2py] CAS Auth with other technologies

2011-07-19 Thread Bruno Bemfica
Hi, I'm new on Web2Py and Python, and I have a question: There's any way to make apps developed with other technologies (in my case, PHP and ASP.NET) authenticate with the web2py CAS server? I need to integrate some apps to my company and we have systems made in a lot of different technologies. Wha

[web2py] In-line powertable editing help (or in-line editor plugin suggestion?)

2011-07-19 Thread Will
Hello, i'm trying to make powertable's in-line editing work but it doesn't seem to be working.(it's the powertable plug-in for Web2py) I've been looking for answers and i'm currently using the code Bruno Rocha suggested in another topic: in Default.py: def editablefunction(): id = request.vars

[web2py] Re: web2py on github

2011-07-19 Thread luckysmack
Well i was going to for the original. But it being so out of date, i thought i would just take the mercurial branch and use a tool to convert the code and its branches with history to git. that way it is exactly what is in the mercurial repos. But doing that i cant fork it. i would need to create m

[web2py] web2py on github

2011-07-19 Thread luckysmack
Letting those users out there know that I will forking the web2py on github (which is outdated) and will be updating it as I will need it and its easier (for me at least) to keep all my repos in one location. Ive already forked it and will be updating it shortly. https://github.com/luckysmack/web2

[web2py] Re: 'truncate' broken in SQLTABLE with 'headers'.

2011-07-19 Thread Anthony
On Tuesday, July 19, 2011 7:48:35 PM UTC-4, Carlos wrote: > > So 'truncate' is not being respected when using the previous 'headers' > format (simple dict of strings). > Oh, I see, you're right -- that should be fixed. Anthony

[web2py] Re: 'truncate' broken in SQLTABLE with 'headers'.

2011-07-19 Thread Carlos
So 'truncate' is not being respected when using the previous 'headers' format (simple dict of strings). Thanks Anthony.

[web2py] Re: storeing a db set in a storage for a map plugin

2011-07-19 Thread Anthony
Objects defined in your models and controllers do not survive from request to request (unless, of course, you store them somewhere, like the session). In your code, the Set object is created when you visit /default/index, but the select happens when you visit /plugin_openplayers/index, which hap

[web2py] Re: 'truncate' broken in SQLTABLE with 'headers'.

2011-07-19 Thread Anthony
It looks like if you use the new dictionary option for headers, you can still truncate, but you have to specify a 'truncate' key within each header's dict (so, you can have different truncate values for each header). Here's the docstring example: :param headers = {'table.id':{'label':'Id',

Re: [web2py] 'truncate' broken in SQLTABLE with 'headers'.

2011-07-19 Thread Carlos
Hi Martin, Yes, it's broken for string and text. Carlos

Re: [web2py] 'truncate' broken in SQLTABLE with 'headers'.

2011-07-19 Thread Martín Mulone
Truncate only works in: field.type in ['string','text'] is your field this type? 2011/7/19 Carlos > Hi, > > I believe 'truncate' has broken in SQLTABLE when 'headers' (as dict of str) > is specified. > > Maybe this was caused by the "#new implement dict"?. > > Thanks, > >Carlos > > --

[web2py] storeing a db set in a storage for a map plugin

2011-07-19 Thread Manuele Pesenti
Hi *: I'm trying to implement an essential version of a plugin_openlayers starting from the job made by Massimo with plugin_gmap but I don't understand how the db set is passed from a controller to the plugin_* controller, well even if it seams clear setting the data set in a storage defined

Re: [web2py] Re: powertable ( multiple tables on the same page )

2011-07-19 Thread Roberto Perdomo
Hello, it's me again. Well, I discovered that the problem of loading the table with "load" is in the event "live" plugin_powertable.py. I've replaced the event "live" for "bind", and, works, but just load the details for the first 10 rows displayed when loading the table. Is there any way to fix

[web2py] 'truncate' broken in SQLTABLE with 'headers'.

2011-07-19 Thread Carlos
Hi, I believe 'truncate' has broken in SQLTABLE when 'headers' (as dict of str) is specified. Maybe this was caused by the "#new implement dict"?. Thanks, Carlos

Re: [web2py] Re: bug in crud with load and ajax=false

2011-07-19 Thread Sebastian E. Ovide
:D I've noticed it ! On Tue, Jul 19, 2011 at 9:40 PM, Anthony wrote: > Right, not really updated nightly. I think that build was originally > intended to encourage testing before new releases, but few people actually > do any testing. > > Anthony > > On Tuesday, July 19, 2011 4:35:31 PM UTC-4, a

[web2py] Re: bug in crud with load and ajax=false

2011-07-19 Thread Anthony
Right, not really updated nightly. I think that build was originally intended to encourage testing before new releases, but few people actually do any testing. Anthony On Tuesday, July 19, 2011 4:35:31 PM UTC-4, apple wrote: > I just noticed all the files on the "nightly build" except directo

[web2py] Re: bug in crud with load and ajax=false

2011-07-19 Thread Anthony
Nightly build is not the same as trunk -- I'm not sure when it was last updated. You can pull trunk from the Google Code repository via Mercurial (you need to have Mercurial installed): http://code.google.com/p/web2py/source/checkout. Or you can just change the two relevant lines in your own c

Re: [web2py] Re: CRON or Background script?

2011-07-19 Thread pbreit
Here is what the Book recommends: python web2py.py -S app -M -N -R applications/app/private/myscript.py

[web2py] Re: bug in crud with load and ajax=false

2011-07-19 Thread apple
I just noticed all the files on the "nightly build" except directories are dated 26th June. Is this not updated nightly? On Jul 19, 9:28 pm, apple wrote: > I downloaded the nightly build source and copied it on top of my > web2py directory. Still get the request.vars as dict. Is that > expected?

[web2py] Re: bug in crud with load and ajax=false

2011-07-19 Thread apple
I downloaded the nightly build source and copied it on top of my web2py directory. Still get the request.vars as dict. Is that expected? On Jul 19, 5:40 pm, Anthony wrote: > Oops, forgot we already fixed that in trunk, so it will be work properly in > the next release. > > Anthony > > > > > > > >

Re: [web2py] Re: Limitation in template system

2011-07-19 Thread Bruno Rocha
I prefer to work in the old way, used when web2py had no block in views. It is very easy and pure Python code. {{def myblock():}} {{return}} So, in any place of views... {{=myblock()}} Obviouslly in this way you cannot have {{super}} and other cool things, but it is easy to adjust in pure Pyt

Re: [web2py] Re: powertable ( multiple tables on the same page )

2011-07-19 Thread Bruno Rocha
this should be: table.dtfeatures['aoColumns'] = '' dtfeatures implement any option from datatables.net On Tue, Jul 19, 2011 at 1:32 PM, Christopher Baron wrote: > Does anyone know where, what to set the 'aoColumns' property to ? > > The documentation for this plugin is not helpful... > > On J

Re: [web2py] Re: A(cid=request.cid) inside a component inside another component ? bug or working as expected ?

2011-07-19 Thread Anthony
On Tuesday, July 19, 2011 2:14:18 PM UTC-4, sebastian wrote: > > Thanks Anthony > > It looks like the problem was related to using > request.env.http_web2py_component_element instead of request.cid (I was > using request.env.http_web2py_component_element instead of request.cid as a > workaround

[web2py] Re: LOADing a crud throws an error after upgrading to 1.97.1

2011-07-19 Thread Anthony
It's a bug -- already fixed in trunk. See https://groups.google.com/d/topic/web2py/HshCtke0xzI/discussion. Should work with ajax=True. Anthony On Tuesday, July 19, 2011 3:03:53 PM UTC-4, sebastian wrote: > Hi All, > > I have a LOAD that was working fine with 1.96.last. I've just updated it to

[web2py] LOADing a crud throws an error after upgrading to 1.97.1

2011-07-19 Thread Sebastian E. Ovide
Hi All, I have a LOAD that was working fine with 1.96.last. I've just updated it to 1.97.1 and now it throws an error: to reproduce it: in the view {{=LOAD('default','crud_in_comp.load',ajax_trap=True)}} in the controller def crud_in_comp(): return dict(crud=crud.create(db.auth_user,messag

Re: [web2py] Re: A(cid=request.cid) inside a component inside another component ? bug or working as expected ?

2011-07-19 Thread Sebastian E. Ovide
Thanks Anthony It looks like the problem was related to using request.env.http_web2py_component_element instead of request.cid (I was using request.env.http_web2py_component_element instead of request.cid as a workaround of a bug in the previous version)... now I know that request.env.http_web2py

Re: [web2py] passing dictionary in URL not working. I Get a string

2011-07-19 Thread Jonathan Lundell
On Jul 19, 2011, at 10:37 AM, António Ramos wrote: > So what is the best way to pass a dictionary from one page to the other? > can i do session.dictvar=mydictvar? Yes, as long as everything you put in there can be pickled. > > thank you > António > > 2011/7/19 Jonathan Lundell > On Jul 19, 20

Re: [web2py] passing dictionary in URL not working. I Get a string

2011-07-19 Thread António Ramos
So what is the best way to pass a dictionary from one page to the other? can i do session.dictvar=mydictvar? thank you António 2011/7/19 Jonathan Lundell > On Jul 19, 2011, at 10:15 AM, António Ramos wrote: > > hello i have this in a view > > > > > {{=A(amostra,_href=URL(r=request,c='amostra',f

Re: [web2py] passing dictionary in URL not working. I Get a string

2011-07-19 Thread Jonathan Lundell
On Jul 19, 2011, at 10:15 AM, António Ramos wrote: > hello i have this in a view > > {{=A(amostra,_href=URL(r=request,c='amostra',f='get',vars={'amostra':amostra,'amostra_detalhe':Amostra[amostra]}))}} > > > Amostra is a dictionary > amostra is every element in Amostra > every amostra of Amost

[web2py] passing dictionary in URL not working. I Get a string

2011-07-19 Thread António Ramos
hello i have this in a view {{=A(amostra,_href=URL(r=request,*c='amostra',f='get',* vars={'amostra':amostra,*'amostra_detalhe':Amostra[amostra]*}))}} Amostra is a dictionary amostra is every element in Amostra every amostra of Amostra is a dictionary in this view i iterate over Amostra[amostra]

[web2py] Re: powertable ( multiple tables on the same page )

2011-07-19 Thread Anthony
On Tuesday, July 19, 2011 12:32:31 PM UTC-4, Christopher Baron wrote: > > Does anyone know where, what to set the 'aoColumns' property to ? > > The documentation for this plugin is not helpful... PowerTable is a web2py plugin integrating the jQuery DataTables plugin into web2py, so you should

[web2py] Re: bug in crud with load and ajax=false

2011-07-19 Thread Anthony
Oops, forgot we already fixed that in trunk, so it will be work properly in the next release. Anthony On Tuesday, July 19, 2011 9:50:37 AM UTC-4, Anthony wrote: > Good catch. I'll submit a patch. > > On Tuesday, July 19, 2011 8:56:08 AM UTC-4, apple wrote: > >> I note that when ajax=False then

[web2py] gluon/contrib/simplejson/encoder.py changes

2011-07-19 Thread Carl
sometime between Web2py v1.89.1 and v1.93.2 encoder.py was changed so it didn't explicitly support 'datetime'. my code now trips an exception about simplejson not supporting datetime is datetime handled in a different fashion?

[web2py] Re: powertable ( multiple tables on the same page )

2011-07-19 Thread Christopher Baron
Does anyone know where, what to set the 'aoColumns' property to ? The documentation for this plugin is not helpful... On Jul 18, 1:25 pm, Roberto Perdomo wrote: > I now discover that only show the details only for the first 10 records. > > I send you to your mail my app, because is very hevy for

[web2py] Re: Limitation in template system

2011-07-19 Thread Julio Schwarzbeck
On Jul 13, 3:42 am, Miguel Lopes wrote: > I think this behavior I've just found is worth sharing. > > Templates don't honor the if statement that conditionally "try" to include > or exclude template blocks. > I've just detected this (in 1.96.4 I think) and upgrade to 1.97.1 and the > issue/behavio

Re: [web2py] Re: CRON or Background script?

2011-07-19 Thread Ismael Serratos
OK, my script is working fine, but the problem is this, I'm launching this script: import time print "Initializing booking daemon @_@" while True: allBookings = db(db.current_bookings).select() for booking in allBookings: if booking.project != 'foo': print str(booki

[web2py] Re: how to get user name before login is completed

2011-07-19 Thread weheh
Thanks for the responses. When auth.settings.login_onaccept gets executed, auth.user_id has value of None, so it is not possible to get the user's name. Anthony is right that I am attempting to set the session.flash to flash the login message just once at login. This is a nice to have, not a must h

Re: [web2py] Re: Limitation in template system

2011-07-19 Thread Miguel Lopes
I missed that comments feature. Great you added one! Miguel On Tue, Jul 19, 2011 at 12:48 PM, Nico de Groot wrote: > Good point, was just going to post this myself, you beat me to it. A hint > should be added to the web2py book in chapter 5 > http://web2py.com/book/default/chapter/05?search=bloc

[web2py] Re: bug in crud with load and ajax=false

2011-07-19 Thread Anthony
Good catch. I'll submit a patch. On Tuesday, July 19, 2011 8:56:08 AM UTC-4, apple wrote: > I note that when ajax=False then request.vars is a dict rather than a > storage object. > > On Jul 19, 11:44 am, apple wrote: > > The following works fine with the SQLFORM line and ajax=false or > > a

[web2py] Re: bug in crud with load and ajax=false

2011-07-19 Thread apple
I note that when ajax=False then request.vars is a dict rather than a storage object. On Jul 19, 11:44 am, apple wrote: > The following works fine with the SQLFORM line and ajax=false or > ajax=true. However replacing SQLFORM line with the CRUD line it works > with ajax=true but fails with ajax=f

[web2py] Re: Limitation in template system

2011-07-19 Thread Nico de Groot
Good point, was just going to post this myself, you beat me to it. A hint should be added to the web2py book in chapter 5 http://web2py.com/book/default/chapter/05?search=block#Blocks-in-Views something like: The *{{block}} {{end}}* construction *cannot be used* inside a python condition spe

[web2py] Re: Still need help with jQuery - replacing div contents

2011-07-19 Thread Cliff
jQuery.live() fixed the problem. Thank you. On Jul 19, 6:32 am, Michele Comitini wrote: > Cliff, > > I think you need to rebind events to the DOM of the new content: you > need to add some code that will be executed each time the new content > is > received by the browser.  If you do not want to

[web2py] Re: Still need help with jQuery - replacing div contents

2011-07-19 Thread Cliff
Thank you. I will try that. On Jul 19, 6:32 am, Michele Comitini wrote: > Cliff, > > I think you need to rebind events to the DOM of the new content: you > need to add some code that will be executed each time the new content > is > received by the browser.  If you do not want to rebind every ti

[web2py] bug in crud with load and ajax=false

2011-07-19 Thread apple
The following works fine with the SQLFORM line and ajax=false or ajax=true. However replacing SQLFORM line with the CRUD line it works with ajax=true but fails with ajax=false, generating one of those annoying "restricted errors". I am guessing related to previous issue with request.vars and load?

[web2py] bug in crud - fails when load with ajax false

2011-07-19 Thread apple
The following works fine with ajax=true but fails with ajax=false generating one of those annoying "restricted errors". I have a SQLFORM version that works fine with ajax=false. So must be something in crud. Perhaps connected to previous issue with request.vars and load? CONTROLLER def test():

Re: [web2py] Still need help with jQuery - replacing div contents

2011-07-19 Thread Michele Comitini
Cliff, I think you need to rebind events to the DOM of the new content: you need to add some code that will be executed each time the new content is received by the browser. If you do not want to rebind every time you can try with jQuery.live() http://api.jquery.com/live/. Hope it helps. mic

Re: [web2py] New python web framework: Brubeck

2011-07-19 Thread Vasile Ermicioi
it is built on top of greenlets and libevent (soon on libev) libraries http://packages.python.org/greenlet/ and has a very good performance http://nichol.as/benchmark-of-python-web-servers code examples https://bitbucket.org/denis/gevent/src/tip/examples/#source-path can work with uwsgi http://g

Re: [web2py] Re: mail date

2011-07-19 Thread Manuele Pesenti
On 18/07/2011 18:00, Anthony wrote: Looks like mail.send() calls time.gmtime(). What happens if you do the following: def time_test(): import time return time.strftime("%a, %d %b %Y %H:%M:%S +", time.gmtime()) and go to the default/time_test URL -- do you get the correct time? Anthony well

Re: [web2py] Re: request - mmodal examples

2011-07-19 Thread Kenneth Lundström
This works: {{for ticket in tickets:}} {{a=PluginMModal(title='Hello World',content=crud.update(db.t_ticket, ticket.id),close='close',width=40,height=80)}} {{=a}} {{=a.link(H1('SEE MODAL WINDOW'))}} {{pass}} Kenneth On 19.7.2011 11:21, Kenneth Lundström wrote: I have never used crud with

Re: [web2py] Re: request - mmodal examples

2011-07-19 Thread Kenneth Lundström
I have never used crud with mmodal, but I have used SQLFORM with it. I guess you have read: http://groups.google.com/group/web2py/browse_thread/thread/809bf7eb5072651f/90ecd2c59b3dacc6?lnk=gst&q=mmodal#90ecd2c59b3dacc6 Instead of: {{a=PluginMModal(title='Hello World',content='give this a try!',c

Re: [web2py] New python web framework: Brubeck

2011-07-19 Thread Phyo Arkar
gevent , very intteresting. can you explain how it works ? On Mon, Jul 18, 2011 at 2:52 AM, Vasile Ermicioi wrote: > Mongrel2: lean & fast, asynchronous web serving >> Eventlet: non-blocking I/O & coroutines >> ZeroMQ: fast messaging & supports most languages >> DictShield: data modeling & valid