[web2py] how to use contrib/login_methods/linkedin_account.py

2011-06-25 Thread Luis Goncalves
Hello! I've been trying to use login via linkedin using the contrib/login_methods/linkedin_account.py module. Off the bat, I got the error : AttributeError: 'module' object has no attribute 'LinkedIn' (this is the same problem Kuba mentioned on nov 12 2010) the reason is that linkedin_ac

[web2py] Re: How to download multiple files with one click? [closed]

2011-06-25 Thread weheh
On Jun 26, 1:25 am, Massimo Di Pierro wrote: > I do not believe this is possible at all (except by downloading a > zipped file). The JS in the browser is not allowed to initiate > downloads because it has no access to local filesystem. Downloads must > explicitly initiated by the user by clickin

[web2py] Re: How to download multiple files with one click?

2011-06-25 Thread weheh
Understood. Thanks! On Jun 26, 1:25 am, Massimo Di Pierro wrote: > I do not believe this is possible at all (except by downloading a > zipped file). The JS in the browser is not allowed to initiate > downloads because it has no access to local filesystem. Downloads must > explicitly initiated by

[web2py] Re: How to download multiple files with one click?

2011-06-25 Thread Massimo Di Pierro
I do not believe this is possible at all (except by downloading a zipped file). The JS in the browser is not allowed to initiate downloads because it has no access to local filesystem. Downloads must explicitly initiated by the user by clicking and approving the save. This is a security feature of

Re: [web2py] Re: Formatting SQLFORM.factory

2011-06-25 Thread al ex
Thank you. It worked, On Sun, Jun 26, 2011 at 11:22 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Try > > form=SQLFORM.factory( Field('address', label=T('Address')), > formstyle='table2cols') > > > > > On Jun 25, 11:59 pm, alex wrote: > > Hi all, > > > > In a SQLFORM.factory gene

[web2py] Re: Formatting SQLFORM.factory

2011-06-25 Thread Massimo Di Pierro
Try form=SQLFORM.factory( Field('address', label=T('Address')), formstyle='table2cols') On Jun 25, 11:59 pm, alex wrote: > Hi all, > > In a SQLFORM.factory generated form I want to have the labels on top > of the fields. > > form=SQLFORM.factory( Field('address', label=T('Address')),) > > Any

[web2py] Re: how to download an audio file

2011-06-25 Thread weheh
p.s. Massimo - is this anywhere in the doc? If not, I can put it in there for the community. Which chapter should it be in? I would never have figured this out without your response!!! On Jun 26, 12:55 am, Massimo Di Pierro wrote: > http://.../myapp/static/files/mytable.name/xy/? > attachment > >

[web2py] How to download multiple files with one click?

2011-06-25 Thread weheh
Imagine an album with multiple songs and you want to download all the songs at once by clicking on the album download link. Is there a simple way to get a link to download multiple files with one click? I suppose it could be done by zipping all the songs together into a single file, but I haven't

[web2py] Re: how to download an audio file [closed]

2011-06-25 Thread weheh
On Jun 26, 1:02 am, weheh wrote: > Super! Thank you Massimo. @Bruno, thanks for the response, but please > note that A(_src= ... will not work. It must be A(_href= ... Probably > just an oversight on your part. > > On Jun 26, 12:55 am, Massimo Di Pierro > wrote: > > > > > > > > >http://.../myap

[web2py] Re: how to download an audio file

2011-06-25 Thread weheh
Super! Thank you Massimo. @Bruno, thanks for the response, but please note that A(_src= ... will not work. It must be A(_href= ... Probably just an oversight on your part. On Jun 26, 12:55 am, Massimo Di Pierro wrote: > http://.../myapp/static/files/mytable.name/xy/? > attachment > > notice the ?

[web2py] Formatting SQLFORM.factory

2011-06-25 Thread alex
Hi all, In a SQLFORM.factory generated form I want to have the labels on top of the fields. form=SQLFORM.factory( Field('address', label=T('Address')),) Any idea? Thank you

[web2py] Re: how to download an audio file

2011-06-25 Thread Massimo Di Pierro
http://.../myapp/static/files/mytable.name/xy/? attachment notice the ?attachment after filename On Jun 25, 11:38 pm, weheh wrote: > I want to click on a link and have a jpeg or an mp3 file downloaded > from the server to my local machine as though I had done a right-mouse- > click and selected

Re: [web2py] how to download an audio file

2011-06-25 Thread Bruno Rocha
{{=A(_src=URL('static','files', args='longfilename.mp3'))}} Does not works? -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] On Sun, Jun 26, 2011 at 1:38 AM, weheh wrote: > I want to click on a link and have a jpeg or an mp3 file downloaded > from the server to my local machine as t

[web2py] how to download an audio file

2011-06-25 Thread weheh
I want to click on a link and have a jpeg or an mp3 file downloaded from the server to my local machine as though I had done a right-mouse- click and selected the "Save Link As ..." menu entry. In other words, when I click on the link I want to get a popup asking where to save the file. Any thought

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Anthony
Note, you might also check out PowerTable ( https://bitbucket.org/rochacbruno/powertable), which is a web2py plugin for DataTables. There's also a jqGrid widget that's part of plugin_wiki (you can use it even on non-wiki pages) -- see http://web2py.com/book/default/chapter/13#Current-Widgets. O

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Anthony
Looks like DataTables requires your JSON to include a few special parameters (http://datatables.net/usage/server-side), so you'll probably need to manipulate the JSON on the server side before returning it to the client. Anthony On Saturday, June 25, 2011 11:21:59 PM UTC-4, Anthony wrote: > W

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Anthony
What happens if you go to /MyWheels/MIS/get_data? Do you get the proper JSON returned? If so, then the problem is probably in your client-side JS code. Also, on the client side, check in Firebug (or similar) to see if the Ajax call is getting made properly, and if it is returning the JSON. You m

[web2py] Re: Web2py and mobile browsing

2011-06-25 Thread Alex
mdipierro writes: > > This may be useful > > http://web2py.com/examples/static/mobile_device_detect.py > > On Jun 23, 8:38 am, Doug Warren wrote: > > Does anyone have some hints for showing mobile browsers a different > > set of views than desktop browsers?  IE: Detection, redirection, > > et

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Vineet
a='MyWheels', c='MIS', f='get_data'. So, {{=URL('MIS','get_data')}} should work. But I do not get the data in dataTable. ---Vineet On Jun 25, 11:13 pm, Anthony wrote: > Is MIS your app name, or the controller name? If it's the app name, your URL > call also needs the controller name, or it will t

Re: [web2py] Re: It makes duplicate records on datastore

2011-06-25 Thread Anthony
When you call form.accepts, the accepts method will create the formkey for you and add it to the session and as an attribute of the form. After calling form.accepts, the key will be stored in form.formkey -- so you could pass that value to the view and insert it as the _formkey field value. I th

Re: [web2py] Re: It makes duplicate records on datastore

2011-06-25 Thread portable dora
Just random... I'm sorry I actually dont understand what _formkey value is.. dorasan 2011/6/26 Anthony > > On Saturday, June 25, 2011 8:34:13 PM UTC-4, dorasan wrote: >> >> Anthony >> >> Thank you for your reply. >> The way to use 'customforms' solved my problem!!! >> But adding a hidden _form

Re: [web2py] Re: It makes duplicate records on datastore

2011-06-25 Thread Anthony
On Saturday, June 25, 2011 8:34:13 PM UTC-4, dorasan wrote: > > Anthony > > Thank you for your reply. > The way to use 'customforms' solved my problem!!! > But adding a hidden _formkey field didn't solve it as it still calls > double submission somehow. > I added a hidden _formkey field like t

[web2py] Re: experimental in trunk... common_fields and precints

2011-06-25 Thread Chris S
Ah there was one other scenario I meant to as. Can you have an entry in the table which, when filtered, always passes? Here I'm thinking about a cross-site admin that could register a single time and be retrieved from any of the accessing URL's. On Jun 25, 7:08 pm, Chris S wrote: > This is great

[web2py] Re: experimental in trunk... common_fields and precints

2011-06-25 Thread Chris S
This is great, I've been away from web2py for about a year now and this feature is exactly what I was trying to do quite some time ago by manually storing and filtering by a SiteId. A couple of questions. 1 - Is there a way to over ride the filter if you do not want it, for say Administration? 2 -

[web2py] Re: redirect(URL())

2011-06-25 Thread Massimo Di Pierro
In the general case it is not possible to detect loops. Alan Turing proved it.;-0 There are cases when you want to redirect(URL()) once and that should be allowed. On Jun 25, 4:43 pm, Kenneth wrote: > I tried to make a redirect to my frontpage and didn´t remember how to > do that so I tried with

[web2py] redirect(URL())

2011-06-25 Thread Kenneth
I tried to make a redirect to my frontpage and didn´t remember how to do that so I tried with redirect(URL()). That leads to a endless loop. In my case Firefox stopped after trying to redirect. Maybe web2py should detect this stupid programming error or is there a case when URL() is needed? Now I

[web2py] Re: Error on upgrading to 1.96.4

2011-06-25 Thread Kenneth
Interesting, I did the upgrade with Upgrade button in admin and web2py crasched when updating, not sure at what point. I did a manual upgrade and now everything works again. Thank You Massimo. On Jun 25, 9:28 pm, Massimo Di Pierro wrote: > Something is wrong with your upgrade. The gluon/utils.

[web2py] Re: Error on upgrading to 1.96.4

2011-06-25 Thread Massimo Di Pierro
Something is wrong with your upgrade. The gluon/utils.py did not get updated. On Jun 25, 1:14 pm, Kenneth Lundström wrote: > Environment: > Centos 5.5, Apache 2.something, mod_wsgi, MySQL > > Version 1.95.something worked nice > > [Sat Jun 25 21:51:17 2011] [error] [client 93.106.44.10] mod_wsgi

[web2py] Error on upgrading to 1.96.4

2011-06-25 Thread Kenneth Lundström
Environment: Centos 5.5, Apache 2.something, mod_wsgi, MySQL Version 1.95.something worked nice [Sat Jun 25 21:51:17 2011] [error] [client 93.106.44.10] mod_wsgi (pid=23210): Target WSGI script '/data/domains/web2py/wsgihandler.py' cannot be loaded as Python module. [Sat Jun 25 21:51:17 2011]

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Anthony
Is MIS your app name, or the controller name? If it's the app name, your URL call also needs the controller name, or it will think MIS is the controller and the Ajax call will fail. On Saturday, June 25, 2011 1:02:50 PM UTC-4, Vineet wrote: > I tried doing like this:-- > > In controller-- > >

Re: [web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Anthony
On Saturday, June 25, 2011 1:07:39 PM UTC-4, elffikk wrote: > > > try > > def get_data(): >custdata = db.executesql(qry, as_dict=True) >return response.json(custdata.as_list()) He's already using as_dict=True in the executesql call, so doing custdata.as_list() shouldn't be necessary.

Re: [web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Vasile Ermicioi
try def get_data(): custdata = db.executesql(qry, as_dict=True) return response.json(custdata.as_list()) also go to this link http://yoururl/app/controller/get_data you should see a json response

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-25 Thread Vineet
I tried doing like this:-- In controller-- def get_data(): custdata = db.executesql(qry, as_dict=True) return response.json(custdata) And in View, other code is as earlier (hence omitted) "sAjaxSource": "{{=URL('MIS','get_data')}}", Still, the dataTable is blank. Pl. help. ---Vin

[web2py] let eclipse find global functions defined in model folder

2011-06-25 Thread Sebastian E. Ovide
Hi All, I've add a bunch of imports into my plugin controller and model which fixed all my eclipse errors. Now I've added a function into my plugin model but it is not seen by Eclipse in my plugin controller. any ideas ? -- Sebastian E. Ovide

Re: [web2py] how to round the number of seconds

2011-06-25 Thread portable dora
THANK YOU!!! 2011/6/25 Bruno Rocha > mydate = request.now() > mydate.strftime('%Y-%m-%d %H:%M:%S') > > > > -- > Bruno Rocha > [ About me: http://zerp.ly/rochacbruno ] > > > > On Sat, Jun 25, 2011 at 3:36 AM, dorasan wrote: > >> Hello everyone. >> >> Could you tell me how to round the number of

Re: [web2py] web2py and postgresql schema

2011-06-25 Thread Massimiliano
I've the same problem. Take a look here. http://groups.google.com/group/web2py/browse_thread/thread/8b5e166b7b27edc7?pli=1 On Fri, Jun 24, 2011 at 3:11 PM, Camil Ghircoias wrote: > Hi, > > I am now reading some documnentation about web2py. > Does web2py support postgresql schemas ? > I have my

[web2py] Re: Populate a simple form (without a database)

2011-06-25 Thread Anthony
First, I think you want FORM(INPUT(_name='n')), otherwise you'll have an empty form. If you want to pre-populate a form using form.vars.fieldname=somevalue, you have to do that after the form is created, but *before* you call form.accepts (the form.accepts method adds the form.vars value to th

[web2py] Re: Populate a simple form (without a database)

2011-06-25 Thread Massimo Di Pierro
form=SQLFORM.factory(Field('n',default='MY DYNAMIC VALUE')) if form.acepts(request,session): redirect(URL('two)) retur dict(form=form) On Jun 25, 1:15 am, Martin Weissenboeck wrote: > Hi, > > let's say I have a simple form like the following: > > def one(): > > form = FORM(_name='n') > > if form.

Re: [web2py] Re: I created a little app to be able to share some files over the net without authentication

2011-06-25 Thread szimszon
Okay. I put a GPL3 in it. Is that okay? :) I not really care. :) This is just for fun. So fork it! Submit pull requests! Make it more fun! And tell me if you like it :-D

Re: [web2py] Re: LessCSS -- really interesting CSS "compiler"

2011-06-25 Thread Stef Mientki
On 25-06-2011 13:51, Joe Barnhart wrote: > That's http://lesscss.org/ Sheesh. > > On Jun 25, 7:50 pm, Joe Barnhart wrote: >> http://lescss.org/ thanks Joe, I've looking for such a tool for years. cheers, Stef

[web2py] Re: LessCSS -- really interesting CSS "compiler"

2011-06-25 Thread Joe Barnhart
That's http://lesscss.org/ Sheesh. On Jun 25, 7:50 pm, Joe Barnhart wrote: > http://lescss.org/

[web2py] LessCSS -- really interesting CSS "compiler"

2011-06-25 Thread Joe Barnhart
http://lescss.org/ The crux of this js library is to preprocess your CSS files so you can use a few carefully-chosen extensions to make your CSS files smaller and more powerful (kind of like web2py). For example, VARIABLES. How many times have you wished you could just assign a name to a color a

[web2py] Re: relational database example app

2011-06-25 Thread john mahugu
Stifan Kristi writes: > > had already checked web2py appliances? http://web2py.com/appliances > > On Wed, May 25, 2011 at 1:19 PM, Markandeya wrote: > > Dear Friends of Web2Py, > I am just getting started and need an example application using a > relational database. A possible example: > 1)

[web2py] Re: dict.__getitem__(self, key) KeyError: 'nombre'

2011-06-25 Thread Juan Antonio
Ok, I have the reason why i got this KeyError. The problem was not on table 'fab_lote', the problem was in table 'db.fabricacion'. The argument 'format' in definition of table db.fabricacion was wrong and the field 'nombre' does not exis in this table: db.define_table('fabricacion', Field('es

Re: [web2py] how to round the number of seconds

2011-06-25 Thread Bruno Rocha
mydate = request.now() mydate.strftime('%Y-%m-%d %H:%M:%S') -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] On Sat, Jun 25, 2011 at 3:36 AM, dorasan wrote: > Hello everyone. > > Could you tell me how to round the number of seconds which > 'request.now' represents like this > > '2011