[web2py] Re: request - mmodal examples

2011-07-18 Thread niknok
bump. No takers? :s On Jul 16, 8:23 am, niknok wrote: > I just "discovered" this modal plugin: web2py.com/plugins/default/ > mmodal > > Sorry for being a little slow, but would someone please post an > example of how I can use crud inside modals?

[web2py] Re: Custom fields for each record????

2011-07-18 Thread Adi
I would do it in this way: Let's say there are two tables building and room_detail. Let building be > > db.define_table('building', > >     Field('name','string'), > >     Field('comment', 'string')) Let room_details be: db.define_table('room_detail', Field('detail_key', string), Field('detail_

[web2py] Re: form.errors problem.

2011-07-18 Thread annet
Replacing the flash with: elif form2.errors: print form2.errors ... and submitting the form prints this: ... which is odd, because it contains the same data as when I submit the form after removing the autocomplete widget. Any ideas? Kind regards, Annet.

[web2py] Re: jQuery .focus()

2011-07-18 Thread annet
Hi Chris, Thanks for your reply. Problem solved and something learned. Kind regards, Annet.

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

2011-07-18 Thread Cliff
I would be extremely grateful if somebody were to point me in the right direction here. When I use jQuery :eval to update div contents, the browser shows me the updated contents as expected. However, when I look at the source code, I see the old contents. I think this is causing a problem, becau

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

2011-07-18 Thread Ismael Serratos
I tried putting it into a controller, also as a separated file into private folder On Mon, Jul 18, 2011 at 8:36 PM, pbreit wrote: > Where is this code located and how are you calling it? If it's in a > controller, you may need to call bookings() with an argument. > > Did you review this: > >

[web2py] Re: SQLFORM with divs or ordered lists instead of tables (for easier control with CSS)

2011-07-18 Thread Anthony
See the 'formstyle' argument: http://web2py.com/book/default/chapter/07?search=formstyle On Monday, July 18, 2011 11:04:10 PM UTC-4, Luis Goncalves wrote: > > Tables are hard to control in CSS, is there a way to have SQLFORM use divs > or lists instead? > > I have seen many(!) posts about redef

[web2py] SQLFORM with divs or ordered lists instead of tables (for easier control with CSS)

2011-07-18 Thread Luis Goncalves
Tables are hard to control in CSS, is there a way to have SQLFORM use divs or lists instead? I have seen many(!) posts about redefining SQLFORM and making it more flexible, but I'm not sure if any conclusion has been reached. Thanks, Luis.

Re: [web2py] Oh Noes! template parsing conflict!

2011-07-18 Thread Anthony
I'm not sure you can pass 'delimiters' to response.render() -- you might have to follow this method: https://groups.google.com/d/topic/web2py/4IFFE-7vq1I/discussion. Anthony On Monday, July 18, 2011 9:29:01 PM UTC-4, elffikk wrote: > you can change template delimiters > > in controller > def

[web2py] Re: CRON or Background script?

2011-07-18 Thread pbreit
Where is this code located and how are you calling it? If it's in a controller, you may need to call bookings() with an argument. Did you review this: http://web2py.com/book/default/chapter/04?#Background-Processes-and-Task-Queues

Re: [web2py] Oh Noes! template parsing conflict!

2011-07-18 Thread Vasile Ermicioi
you can change template delimiters in controller def myf(): return response.render('myf.html', delimiters=('{%','%}')) now you can use python code in myf.html {%if True:%}It works! {%pass%}

[web2py] Oh Noes! template parsing conflict!

2011-07-18 Thread blackthorne
While editing a javascript code to adapt the behavior of an addthis button I got something unexpected... Checkout this JS code and thing about web2py template code: var addthis_share = { templates: { twitter: 'check out {{title}} @ {{url}}' } } First try: templ

[web2py] Re: Can't get linkto working in SQLFORM

2011-07-18 Thread tcab
Ok - added issue as http://code.google.com/p/web2py/issues/detail?id=340 On Jul 15, 9:45 am, Anthony wrote: > Please submit an issue on Google > Code:http://code.google.com/p/web2py/issues/list > > > > > > > > On Friday, July 15, 2011 1:33:22 AM UTC-4, tcab wrote: > > I get this too - a spurious

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

2011-07-18 Thread Anthony
On Monday, July 18, 2011 3:18:44 PM UTC-4, sebastian wrote: > > H All, > > there is a component COMP_OUT which has a couple of A links with > cid=request.cid. So that the result of A will be loaded inside the component > itself. > > then there is another component COMP_IN which also has also som

Re: [web2py] Attn: jQuery ajax noobies: don't fall into this trap

2011-07-18 Thread Anthony
On Monday, July 18, 2011 4:28:51 PM UTC-4, David J wrote: > Cliff thanks for the heads up > > Except I am not sure what :eval means in that context. > The third argument to the ajax() function is 'target', which is the div where the returned response should be loaded. However, if target=':eval',

[web2py] Re: mapreduce.appspot.com

2011-07-18 Thread Rip Ryness
I don't think there is a way to use the DAL with mapreduce. When I used mapreduce I did it completely outside of the DAL which was a bit of a learning curve but wasn't too bad. The plus side is you get a bit leaner process. -Rip

[web2py] Re: proper way to mobile and desktop 'skins'

2011-07-18 Thread Luis Goncalves
I've been away to conferences and somehow missed these replies! Thank you all for the replies! I send the same content, so in principle CSS definitions should be able to restyle satisfactorily. I actually found two books that seem quite helpful: by Jonathan Stark, published by O'Reilly, "Build

Re: [web2py] Attn: jQuery ajax noobies: don't fall into this trap

2011-07-18 Thread David J.
Cliff thanks for the heads up Except I am not sure what :eval means in that context. Thanks. On 7/18/11 4:10 PM, Cliff wrote: Notice the ':eval' as the last parameter to the ajax call. ajax('{{=URL('revive_parrot')}}', ['dead_parrot_id'], ':eval') If 'revive_parrot' ends with the following

Re: [web2py] Re: DAL: query sorted by calculated column ?

2011-07-18 Thread Sebastian E. Ovide
perfect, thanks cfh ! On Sun, Jul 17, 2011 at 10:45 PM, howesc wrote: > i see 2 options: > > db.define_table('tabletest', Field('yes', 'integer'), Field('no', > 'integer'), Field('tot', 'integer', compute=lambda r:r.yes-r.no)) > > will compute the value upon write and store it in the db, sort l

[web2py] Attn: jQuery ajax noobies: don't fall into this trap

2011-07-18 Thread Cliff
Notice the ':eval' as the last parameter to the ajax call. ajax('{{=URL('revive_parrot')}}', ['dead_parrot_id'], ':eval') If 'revive_parrot' ends with the following it will not work because the call to set the html chokes on the newlines. return '''jQuery('#parrot_state').html("bla bla bla bla")

Re: [web2py] Custom fields for each record????

2011-07-18 Thread Jonathan Lundell
On Jul 18, 2011, at 9:29 AM, Ismael Serratos wrote: > Hi!! How could I make custom fields for each record in a model, I mean: Seems like the answer depends on knowing more than we do about the apps requirements. If you don't need direct SQL (eg search) access to the custom fields, you could ser

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

2011-07-18 Thread Sebastian E. Ovide
H All, there is a component COMP_OUT which has a couple of A links with cid=request.cid. So that the result of A will be loaded inside the component itself. then there is another component COMP_IN which also has also some A links with cid=request.cid so far so good... now, I would like to u

[web2py] CRON or Background script?

2011-07-18 Thread Ismael Serratos
hi! I need to run this import time def bookings(): import datetime allBookings = db(db.current_bookings).select() db.commit() for booking in allBookings: if booking.enddate >= datetime.datetime.now(): buildingName = booking.project room= booking.

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

2011-07-18 Thread Roberto Perdomo
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 the group mail. 2011/7/18 Bruno Rocha > include ownTable._id = "something" and ownTable._class = "something" to set > different class and id to the tables. > > > > O

[web2py] Availablity Calendar Requirement

2011-07-18 Thread IK
Hi all, This is my first post. I've been playing with web2py for few months now. After trying out number of other frameworks, I decided to build my app with web2py because of known reasons, it rocks :) Although, I have number of years of experience with html, css and to some extent php, this

Re: [web2py] Re: Load view or controllers without load

2011-07-18 Thread Roberto Perdomo
Bruno, finally i fix that, changing "live" to "bind" in plugin_powertable.py. If you consideer update the plugin code to fix this error. Thanks you so much. 2011/7/18 apple > If you have multiple tables then you must give each table a unique id. > > Bruno tells me this can be done in web2py co

Re: [web2py] Re: view for email message

2011-07-18 Thread Nicolas Palumbo
for emails I used this, that allows you to place emails templates as views... quite useful http://wiki.web2py.com/Sending_Email_with_Plain_Text_HTML_Versions_plus_Attachments On Mon, Jul 18, 2011 at 3:23 PM, Anthony wrote: > If you want to call the function from another function in the same > co

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

2011-07-18 Thread Chris Baron
Thanks! - I appreciate the help. However, now I'm receiving a javascript error : "Cannot read property 'aoColumns' of null" On Jul 18, 11:34 am, Bruno Rocha wrote: > include ownTable._id = "something" and ownTable._class = "something" to set > different class and id to the tables. > > On Mon, Ju

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

2011-07-18 Thread Bruno Rocha
include ownTable._id = "something" and ownTable._class = "something" to set different class and id to the tables. On Mon, Jul 18, 2011 at 12:57 PM, Chris Baron wrote: > How do you do it ? > > > Here is my controller : > > > ownDataSource = db( db.gtree.contributor == ' > '.join( [ auth.user.fir

[web2py] Custom fields for each record????

2011-07-18 Thread Ismael Serratos
Hi!! How could I make custom fields for each record in a model, I mean: I have: db.define_table('building', Field('name','string'), Field('comment', 'string')) db.define_table('room', Field('name','string'), Field('owner','string'), Field('building',db.building)) But every

[web2py] Re: mail date

2011-07-18 Thread Anthony
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 On Monday, July 18, 2011 10

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

2011-07-18 Thread Chris Baron
How do you do it ? Here is my controller : ownDataSource = db( db.gtree.contributor == ' '.join( [ auth.user.first_name, auth.user.last_name ] ) ).select() class ownVirtualFields(object): @virtualsettings(label='Tree') def tree_url(self): gtree = self.gtree.id

[web2py] Re: view for email message

2011-07-18 Thread Anthony
If you want to call the function from another function in the same controller, you could do something like this: def message(): # Code to create variables needed for output. return dict(var1=...,var2=...,etc.) def mail_sender(): # Call the message() function and render its output u

[web2py] mail date

2011-07-18 Thread Manuele Pesenti
hi *, a strange thing happens calling this controller function by the browser with its direct url... the mail arrives with no time information so my client sees it with the date 1/1/1970 1:00... any idea why? is there a way at least to force the message date? many thanks PS I leave all the

Re: [web2py] Re: Help on Authentication with Janrain

2011-07-18 Thread Offray Vladimir Luna Cárdenas
Hi, There is also an experimental single login method from mozilla: https://browserid.org/users Cheers, Offray El 21/02/11 16:57, Anthony escribió: Janrain is probably the simplest way to do third party authentication, but you can also integrate directly with OpenID and OAuth providers. See

[web2py] Re: jQuery .focus()

2011-07-18 Thread Chris May
To select an element by ID in jQuery, you can use the CSS-like syntax #id. jQuery("#key1).focus(); Your jQuery("input.key1").focus(); statement told jQuery to look for an input with the class property of "key1". On Jul 18, 3:54 am, annet wrote: > In web2py_ajax.html I have the following line o

[web2py] Re: Load view or controllers without load

2011-07-18 Thread apple
If you have multiple tables then you must give each table a unique id. Bruno tells me this can be done in web2py controller: table = plugins.PowerTable table._id = "mytable1" On Jul 18, 3:31 am, Roberto Perdomo wrote: > Hi, i have problems loading powertables with LOAD and I wonder if >

[web2py] view for email message

2011-07-18 Thread Manuele Pesenti
hi *, I woulld like to reuse a controller function with a different view to get an html message to send via email... how is it possible? Is there a way from python code to get the html text that is returned when a browser call an url that correspond to my controller "dressed" by my view with

[web2py] Re: form.errors problem.

2011-07-18 Thread annet
By the way, regions are defined like this: Field('regio',length=2,default='',notnull=True,unique=True) and the field regio contains regions between 00 and 99. Maybe this is what's causing the problem???

[web2py] form.errors problem.

2011-07-18 Thread annet
I've been struggling with this problem for days now and still don't see why the form contains an error. This is the relevant part of the function: def index(): ... form1=SQLFORM.factory( Field('key1',label='wat',length=72,requires=IS_NOT_EMPTY(),\ widget=lambda self, value:I

[web2py] Re: superfish.css overridden : menu sent to back of jqgrid

2011-07-18 Thread Vineet
Got it ! In addition to the "z-index:" property, it is required to specify "position:absolute" for menu div (which is required to be on top). After this, the "flash" div goes behind. So I needed to alter these 2 properties for "flash" also. Now it works. But someone pl. tell me if this is a right

[web2py] jQuery .focus()

2011-07-18 Thread annet
In web2py_ajax.html I have the following line of code to set focus on the first visible field in forms: jQuery("input:text:not(.date):first:visible").focus(); In a view with three forms, named form1, form2, form3, the focus is set on the first field of form2 whereas I want the focus to be set on

[web2py] cron latency

2011-07-18 Thread Manuele Pesenti
Ciao *, is there some time gap between when I install a new app in my web2py installation and when the commands in crontab start to are executed? if so, is there a way to make the web2py crontab available for execution immediately? thanks M.

Re: [web2py] Re: Inner join on subselect

2011-07-18 Thread Vasile Ermicioi
what database do you use? I tested with sqlite on a table of mine and it works SELECT id, category, max(added_on) , title FROM articles GROUP BY category HAVING added_on=max(added_on) that query shows latest article from each category