Re: [web2py] Interesting about JSON license...

2013-01-29 Thread Bruno Rocha
“The Software shall be used for Good, not Evil.” I like it! we should adopt it in web2py. The problem is to difference what is "good" from what is "Evil" so I think this license has no meaning. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" gro

Re: [web2py] Re: What is the right way to specialize an application?

2013-01-29 Thread Anthony
And how do you define "magic" in this case? On Wednesday, January 30, 2013 12:38:25 AM UTC-5, Paul Whipp wrote: > > A very fair question. > > I'd like to define a class that inherits from the controller class set up > in the magic stuff. In that class I'd define the replacement edit method. > I'

[web2py] Re: reference table doesnot work when using auth.signature and format

2013-01-29 Thread Anthony
What do you mean by "not work"? What is the expected behavior, and what do you observe instead? Anthony On Wednesday, January 30, 2013 12:55:25 AM UTC-5, 黄祥 wrote: > > hi, > > reference table doesnot work when using auth.signature and format, is > there any solutions for this? > reference table

[web2py] reference table doesnot work when using auth.signature and format

2013-01-29 Thread 黄祥
hi, reference table doesnot work when using auth.signature and format, is there any solutions for this? reference table only work without auth.signature and format. for example : *not work:* db.define_table('product', Field('name', label=T('Name')), Field('unit_price', 'double', label=T(

[web2py] Interesting about JSON license...

2013-01-29 Thread Massimo Di Pierro
http://www.gnu.org/licenses/license-list.html#JSON -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, v

Re: [web2py] Re: What is the right way to specialize an application?

2013-01-29 Thread Paul Whipp
A very fair question. I'd like to define a class that inherits from the controller class set up in the magic stuff. In that class I'd define the replacement edit method. I'd then have some code indicating that the files for the specialised app are to be searched for in the source app folders and i

[web2py] Re: pack all functionality

2013-01-29 Thread Anthony
Keep in mind, admin is just a web2py app, so follow the app code. Start here. Then here (most of the admin functions are in /gluon/admin

[web2py] Re: pack all functionality

2013-01-29 Thread Massimo Di Pierro
applications/admin/controllers/default.py says def pack(): app = get_app() filename = app_pack(app, request, raise_ex=True) and app_pack is defined in gluon/admin.py On Tuesday, 29 January 2013 22:50:02 UTC-6, Hector Magnanao wrote: > > Can someone point me t

Re: [web2py] Re: What is the right way to specialize an application?

2013-01-29 Thread Anthony
What sort of solution do you envision? On Tuesday, January 29, 2013 11:02:36 PM UTC-5, Paul Whipp wrote: > > Thanks for that. > > If I use a plug in I can replace the default.py controller file in admin > in its entirety, if my reading of that section is correct, a plugin > solution still involv

[web2py] Re: Is auth.requires_signature() worth using?

2013-01-29 Thread Anthony
The main purpose of that data() function is to enable you to embed crud forms in pages as Ajax components. @auth.requires_signature() enables you to delegate authorization to the page that contains the components. In that page, you would generate Ajax URLs with user signatures. Then the particu

[web2py] Is auth.requires_signature() worth using?

2013-01-29 Thread Paul Whipp
I'm trying to get a quick crud interface up for a large number of tables. The default controller data method is decorated with auth.requires_signature() which I don't understand. I could not get past 'not authorized' with it. I changed it to auth.requires_login() and added a 'create', 'read', 'upd

[web2py] Re: Is it possible to use IS_IN_SET() in combination with other validators to validate a list?

2013-01-29 Thread Lamps902
Yep, that took care of it. Thanks a lot! -Lamps On Tuesday, January 29, 2013 10:56:41 PM UTC-5, Anthony wrote: > > The IS_IN_DB validator takes an _and argument to get around this problem, > but there is no _and argument for IS_IN_SET(). Instead, you can explicitly > set the widget for the fiel

[web2py] pack all functionality

2013-01-29 Thread Hector Magnanao
Can someone point me to where the source code is for the pack all button ? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.

[web2py] Re: Register action using info from POST

2013-01-29 Thread Mark Li
Thanks for the tips Anthony! I'm going to look more into the first method you suggested. Do you know if enabling Captcha would affect the custom register action if I used auth.register()? Right now, the db.auth_user.validate_and_insert(**fields) works fine. I would be unable to implement Captc

Re: [web2py] Re: What is the right way to specialize an application?

2013-01-29 Thread Paul Whipp
Thanks for that. If I use a plug in I can replace the default.py controller file in admin in its entirety, if my reading of that section is correct, a plugin solution still involves a lot of repetition (although at least we're down to one file) and a hole in future update behaviour. On 30 January

[web2py] Re: web2py book now free in PDF

2013-01-29 Thread Massimo Di Pierro
I will try keep the PDF in sync with the published book and revise it once/year. The new one is about to be posted in days. On Tuesday, 29 January 2013 19:12:33 UTC-6, Monte Milanuk wrote: > > Is the PDF version going to get updated occasionally? HTML version > currently @ 4.9, PDF is still @ 4

[web2py] Re: Is it possible to use IS_IN_SET() in combination with other validators to validate a list?

2013-01-29 Thread Anthony
The IS_IN_DB validator takes an _and argument to get around this problem, but there is no _and argument for IS_IN_SET(). Instead, you can explicitly set the widget for the field: Field('f_file_format, requires=[IS_IN_SET(list_of_acceptable_options), CUSTOM_VALIDATOR(...)], widget=SQLFORM

[web2py] Re: What is the right way to specialize an application?

2013-01-29 Thread Anthony
Maybe look into plugins: http://web2py.com/books/default/chapter/29/12#Plugins On Tuesday, January 29, 2013 6:39:44 PM UTC-5, Paul Whipp wrote: > > I'm new to web2py but not to Python or web application frameworks. > > I love the dry pythonic nature of web2py. I'm less enamoured by its use of >

Re: [web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Lamps902
No problem. I think I see where the misunderstanding came from - it's possible that javascript can't be used to change an element's type in IE, since that would be done after the element has been rendered. In the python controller, the element's type is changed before the element is rendered, s

Re: [web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Jim Steil
Yup, worked just as you stated. Thanks for carrying me along... -Jim On Tue, Jan 29, 2013 at 8:02 PM, Jim Steil wrote: > Yes, I was thinking this was javascript code. Sorry I missed that, it's > been a long day... > > > On Tue, Jan 29, 2013 at 7:59 PM, Lamps902 wrote: > >> It looks like you

Re: [web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Jim Steil
Yes, I was thinking this was javascript code. Sorry I missed that, it's been a long day... On Tue, Jan 29, 2013 at 7:59 PM, Lamps902 wrote: > It looks like you might be sort of conflating javascript and python code > there. Before you do anything with javascript, modify the checkbox element > i

[web2py] Re: RuntimeError: Unable to handle upload

2013-01-29 Thread Alan Etkin
Replacing the store call with this should avoid the error: file_id=db.wiki_media.insert(filename=db.wiki_media.filename.store(stream,filename =, path=file_path) -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this gro

Re: [web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Lamps902
It looks like you might be sort of conflating javascript and python code there. Before you do anything with javascript, modify the checkbox element in the [controller_name].py file, as I described above. For example, if you used SQLFORM() to generate your form from a database table, in your con

Re: [web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Jim S
Please forgive me for not knowing this, but here is what I tried: $('.web2py_form').elements('input',_id='rebates_tiered')[0]['_type'] = 'button'; But, I get: TypeError: $(...).elements is not a function Any clues on what I'm specifying incorrectly? -Jim On Tuesday, January 29, 2013 2:14:51

[web2py] Re: web2py book now free in PDF

2013-01-29 Thread Monte Milanuk
Is the PDF version going to get updated occasionally? HTML version currently @ 4.9, PDF is still @ 4.1... -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[web2py] What is the right way to specialize an application?

2013-01-29 Thread Paul Whipp
I'm new to web2py but not to Python or web application frameworks. I love the dry pythonic nature of web2py. I'm less enamoured by its use of magic but the convenient REP makes this mostly forgivable. I'm giving web2py a go on a couple of real projects. As I use emacs, it looks like it would be

[web2py] Re: Open generated file from action function

2013-01-29 Thread Massimo Di Pierro
The proper way is to pass the input data to the another action which returns the excel file and display a link to that action. You can pass the data by storing it into a session and retrieving it. On Tuesday, 29 January 2013 16:06:15 UTC-6, Luca Zacchetti wrote: > > Just trying to open the gener

[web2py] Re: RuntimeError: Unable to handle upload

2013-01-29 Thread Alan Etkin
I did not explain well what I meant: File "C:\web2py-1045bab06391\web2py-1045bab06391\gluon\dal.py", line 8258, in _attempt_upload raise RuntimeError("Unable to handle upload") It seems that dal is returning a generic message so my idea was to take out any exception handling in the dal.py m

[web2py] Auth login causing closed database

2013-01-29 Thread pinwc4
Recently I upgraded to 2.32 from an older 1.99 version and have been running into an odd auth problem. I have 2 copies of an application hosted on a VM under one instance of web2py using Apache/WSGI. I can log into one of the apps however if I then try to login to the other copy I instead get

[web2py] Re: Open generated file from action function

2013-01-29 Thread Luca Zacchetti
Just trying to return an excel file on SQLFORM submission Il giorno martedì 29 gennaio 2013 22:13:18 UTC+1, Massimo Di Pierro ha scritto: > > I do not understand what you are trying to do. If the form is accepted you > should probably reload, not return different data. > > On Tuesday, 29 January

Re: [web2py] Re: CentOS 6.3 + nginx = 502 Bad gateway

2013-01-29 Thread Richard Vézina
haha! I can say for others, but I would say we all do that once in a while to learn/understand/debug... I found that approach much less cumbersum then create destroy vm clone all the time for each part of a script. Anyway, you do the way you want. Richard On Tue, Jan 29, 2013 at 4:43 PM, Arno

Re: [web2py] Re: CentOS 6.3 + nginx = 502 Bad gateway

2013-01-29 Thread Arnon Marcus
I already tried that - breaking it up to 6 parts was the next step... Copying and pasting the entire thing line by line would be insane... I f@#n hate linux... On Tue, Jan 29, 2013 at 12:45 PM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > You can also just send the each command direct

[web2py] Re: RuntimeError: Unable to handle upload

2013-01-29 Thread Bill Thayer
Hi Allen, Yes the book has the example as written because I am uploading directly to the database. Otherwise I get an error that store requires a value for uploadfolder. Sorry but I've been looking for how t temporarily not let the dal catch the error. I tried running my app with the -S optio

[web2py] Re: Rendering 'raw' HTML for AngularJS with Web2py

2013-01-29 Thread Dirk Krause
and it works. links that helped: http://jsfiddle.net/Bvc62/3/ http://stackoverflow.com/questions/12923521/angular-js-custom-delimiter This would be your view Angular demo //

[web2py] Re: Rendering 'raw' HTML for AngularJS with Web2py

2013-01-29 Thread Massimo Di Pierro
You can also change the delimiters in web2py with: response.delimiters = ('') On Tuesday, 29 January 2013 14:10:04 UTC-6, Dirk Krause wrote: > > I have to apologize for my stupid question. > > Of course web2py *does* deliver raw html. But AngularJS uses the same > brackets convention as web2py

[web2py] Re: How can I disable the delete confirmation in SQLFORM.grid ?

2013-01-29 Thread Massimo Di Pierro
The confirmation is handled via js. You need to edit web2py.js. On Tuesday, 29 January 2013 12:21:12 UTC-6, François Delpierre wrote: > > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving

Re: [web2py] Re: log out user

2013-01-29 Thread Alan Etkin
> > Not to mention is_new() and is_expired()... > They are self-explanatory, but one has to search the api docs or this group or dir(session) to find them. clear seems to be inherited from dict, but there's no guarantee of what it does as it could overridden by the Session class, etc, etc, et

Re: [web2py] Re: Open generated file from action function

2013-01-29 Thread Bruno Rocha
I think the problem may be the session preventing the duplicate submission of the same form data. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un

Re: [web2py] embed image from variable

2013-01-29 Thread Massimo Di Pierro
You do not return the image that way. You need two actions, one only returns plot() (the binary data) and another would be a regular action which display a link to the other action. def myimage(): return plot() def Testing(): return dict() # in view ... On Tuesday, 29 January 2013 10:53:03 UT

[web2py] Re: Open generated file from action function

2013-01-29 Thread Massimo Di Pierro
I do not understand what you are trying to do. If the form is accepted you should probably reload, not return different data. On Tuesday, 29 January 2013 10:00:56 UTC-6, Luca Zacchetti wrote: > > Hi everybody, I've a problem and need your help. > I have a view which contains many things including

Re: [web2py] Re: CentOS 6.3 + nginx = 502 Bad gateway

2013-01-29 Thread Richard Vézina
You can also just send the each command directly in terminal, once you are sure the command execute correctly you translate it in bash script. Most of the time, the command can be transfert in a script directly, sometimes when there is parameters to pass to a command you need to google a bit to lea

Re: [web2py] Re: log out user

2013-01-29 Thread Jonathan Lundell
On 29 Jan 2013, at 12:28 PM, Alan Etkin wrote: > It may be if you want to always clean everything in the session (auth info > etc.) > > I belive session.clear() is not documented in the book. Would it be possible > to add a general description of what it does and how to use it? Not to mention

[web2py] Re: log out user

2013-01-29 Thread Alan Etkin
> > It may be if you want to always clean everything in the session (auth info > etc.) > I belive session.clear() is not documented in the book. Would it be possible to add a general description of what it does and how to use it? Thanks -- --- You received this message because you are subs

Re: [web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Jim Steil
Nope, but will now! Thanks -Jim On Tue, Jan 29, 2013 at 1:15 PM, Lamps902 wrote: > Just tried the code I posted above with IE 9, and it did change the > checkbox to a button. Did you give it a shot? > > > > On Tuesday, January 29, 2013 2:00:45 PM UTC-5, Jim S wrote: >> >> The research I've don

[web2py] Re: Rendering 'raw' HTML for AngularJS with Web2py

2013-01-29 Thread Dirk Krause
I have to apologize for my stupid question. Of course web2py *does* deliver raw html. But AngularJS uses the same brackets convention as web2py - that's what caused the conflict (I should write a book: 'The Art of Reading Error Messages' ... *facepalm*) There seems to be a workaround, since you

Re: [web2py] Re: CentOS 6.3 + nginx = 502 Bad gateway

2013-01-29 Thread Alan Etkin
> > Damn... A whole day and I still have nothing to show for it... There's a recipe that seems to solve the yum conflict http://stackoverflow.com/questions/10624511/upgrade-python-without-breaking-yum http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ -- --- You

[web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Lamps902
Just tried the code I posted above with IE 9, and it did change the checkbox to a button. Did you give it a shot? On Tuesday, January 29, 2013 2:00:45 PM UTC-5, Jim S wrote: > > The research I've done is telling me that IE won't allow you to change the > type of an element. Therefore, I need t

[web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Jim S
The research I've done is telling me that IE won't allow you to change the type of an element. Therefore, I need to generate it as a type="button" from the start. The bootstrap example also shows this as a element and not an . Not sure if that is relevant though. -Jim On Tuesday, January 2

[web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Lamps902
Hi, Jim. What about doing the following: form.elements('input',_id='checkbox_field_n')[0]['_type'] = 'button' > I imagine the value can then be toggled with, for example, javascript's 'onclick' functionality, and stored in the db as usual. On Tuesday, January 29, 2013 11:46:55 AM UTC-5, Jim S w

[web2py] Re: Is it possible to use IS_IN_SET() in combination with other validators to validate a list?

2013-01-29 Thread Lamps902
Thanks, Anthony. I was under the impression that list:string is the convention if you want the field to render as a selector with SQLFORM(). You're right that it's possible to change the field from list:string to string and use IS_IN_SET() to maintain the field as a select element. However, I s

[web2py] How can I disable the delete confirmation in SQLFORM.grid ?

2013-01-29 Thread François Delpierre
-- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.

Re: [web2py] About unary operator consistency in queries

2013-01-29 Thread Jonathan Lundell
On 29 Jan 2013, at 9:46 AM, Jonathan Lundell wrote: > On 29 Jan 2013, at 9:42 AM, Alan Etkin wrote: >> A similar caveat applies to the use of | or & in queries. >> >> Ok, thanks for the tips Marin and Jonathan. >> >> I assume then that the book's example should use parenthesis for negation, >>

Re: [web2py] About unary operator consistency in queries

2013-01-29 Thread Jonathan Lundell
On 29 Jan 2013, at 9:42 AM, Alan Etkin wrote: > A similar caveat applies to the use of | or & in queries. > > Ok, thanks for the tips Marin and Jonathan. > > I assume then that the book's example should use parenthesis for negation, > since web2py cannot change the Python operator precedence.

Re: [web2py] About unary operator consistency in queries

2013-01-29 Thread Alan Etkin
> A similar caveat applies to the use of | or & in queries. > Ok, thanks for the tips Marin and Jonathan. I assume then that the book's example should use parenthesis for negation, since web2py cannot change the Python operator precedence. -- --- You received this message because you are s

Re: [web2py] Re: CentOS 6.3 + nginx = 502 Bad gateway

2013-01-29 Thread Arnon Marcus
Damn... A whole day and I still have nothing to show for it... The problem is complicated, so I've broken-up the script into 6 separate installation scripts: 1. Yum packages 2. Python 3. uwsgi 4. web2py 5. nginx 6. configurations My strategy, since I have it on a VM on Hyper-V, is to run each sc

Re: [web2py] About unary operator consistency in queries

2013-01-29 Thread Jonathan Lundell
On 29 Jan 2013, at 8:50 AM, Alan Etkin wrote: > With trunk, I have tested the behavior of the ~ operator, and doesn't seem > consistent to me: > > Here Bruno gives a working example of belongs negation > https://groups.google.com/d/msg/web2py/fCB9a4K9FqU/GBLwfzNnkjMJ > > But the book uses this

[web2py] Re: Reporting server side calculation progress via ajax

2013-01-29 Thread Andriy
Ok, maybe I misunderstood this. Here is topic on pythonanywhere forum - https://www.pythonanywhere.com/forums/topic/432/ I will continue trying tomorrow. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and s

Re: [web2py] need bootstrap-tooltip.js v2.2.1

2013-01-29 Thread Richard Vézina
Thanks Niphold, Think I will need to learn github as well :-) Richard On Tue, Jan 29, 2013 at 12:04 PM, Niphlod wrote: > https://github.com/twitter/bootstrap/blob/v2.2.1/js/bootstrap-tooltip.js ? > > > On Tuesday, January 29, 2013 5:55:59 PM UTC+1, Richard wrote: >> >> Hello, >> >> I found to

Re: [web2py] Re: About unary operator consistency in queries

2013-01-29 Thread Alan Etkin
It works: >>> q = ~(db.auth_user.id == 1) I don't like that way either, but is the example in the book correct or it should be fixed? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving ema

[web2py] Re: Reporting server side calculation progress via ajax

2013-01-29 Thread Niphlod
> > The thing is, what Niphlod suggested works on localhost, but does not work > on free pythonanywhere account. Server does not return 200OK for any > request while _recalculate function is running. I searched their forums and > indeed threads are disabled on pythonanywhere. So I guess it doe

Re: [web2py] Re: About unary operator consistency in queries

2013-01-29 Thread Marin Pranjić
~ is an unary operator and has precedence over binary operators, that's why the error pops out. ~db.person.name=='Alex' should be db.person.name!='Alex', and ~db.person. name should be used in orderby=... I don't like the ~(db.auth_user.id==0). I'm not even sure if it works. Marin On Tue, Jan

Re: [web2py] need bootstrap-tooltip.js v2.2.1

2013-01-29 Thread Niphlod
https://github.com/twitter/bootstrap/blob/v2.2.1/js/bootstrap-tooltip.js ? On Tuesday, January 29, 2013 5:55:59 PM UTC+1, Richard wrote: > > Hello, > > I found tooltip (no new line) issue with new bootstrap 2.2.2... > > I would have look at the differences between bootstrap-tooltip.js v2.2.1 > an

Re: [web2py] Re: web2py world conference 2013

2013-01-29 Thread Vinicius Assef
I share Bruno ideas, too. On Mon, Jan 28, 2013 at 2:41 PM, Bruno Rocha wrote: > I think it is ok to have different dates on each places. > > Each country/place can do in preferred data since it is in the same week. > > Lets say: > > - May 16 (Thu) > - May 17 (Fri) > Chicago - May 18 (Sat) > Bra

[web2py] need bootstrap-tooltip.js v2.2.1

2013-01-29 Thread Richard
Hello, I found tooltip (no new line) issue with new bootstrap 2.2.2... I would have look at the differences between bootstrap-tooltip.js v2.2.1 and bootstrap-tooltip.js v2.2.2, but I can't get a zip on the web of bootstrap 2.2.1. I try download the github repo and revert to 2.2.1, but I start

Re: [web2py] embed image from variable

2013-01-29 Thread BlueShadow
I did some experimenting the problem is putting the image into the return dict() or into any variable. I got no clue how to fix it or why that is the problem. On Tuesday, January 29, 2013 5:07:16 PM UTC+1, BlueShadow wrote: > > I tried that but it doesn't show an image it puts the img tag in the

[web2py] Re: About unary operator consistency in queries

2013-01-29 Thread Alan Etkin
Sorry, here's the actual error: >>> db(q).select() ... OperationalError: near "DESC": syntax error -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+

[web2py] About unary operator consistency in queries

2013-01-29 Thread Alan Etkin
With trunk, I have tested the behavior of the ~ operator, and doesn't seem consistent to me: Here Bruno gives a working example of belongs negation https://groups.google.com/d/msg/web2py/fCB9a4K9FqU/GBLwfzNnkjMJ But the book uses this example: rows = db((~db.person.name=='Alex') | (db.person.id

[web2py] Can I change a boolean field widget to a button?

2013-01-29 Thread Jim S
I have a form that is going to hold a number of boolean fields. I want to change them to buttons instead of checkboxes so I can use the bootstrap button widgets. How can I chance the boolean widget from a checkbox to a button and have the value properly put back into the database? -- --- Y

Re: [web2py] Reporting server side calculation progress via ajax

2013-01-29 Thread Vinicius Assef
Your problem number 1 is because you are commiting before p.update_record(). Put your db.commit() after p.update_record() and see what happens. Your problem number 2 probably is because your GetProgres() function should send a GET request. But your controller#2/GetProgress() is reading more rows

[web2py] Open generated file from action function

2013-01-29 Thread Luca Zacchetti
Hi everybody, I've a problem and need your help. I have a view which contains many things including an SQLFORM.factory used to set the query for a report generation. The first time I submit the form the report is correctly opened, the second time the page is just reloaded...how can I fix the prob

[web2py] Rendering 'raw' HTML for AngularJS with Web2py

2013-01-29 Thread Dirk Krause
Hi, I am trying to use web2py to manage a database and display the resulting JSON in AngularJS. To render an angular compatible view I need to pass raw html in a view (for example the html needs to start with '' and so forth). Of course I could place the files in the static folder, but then I

Re: [web2py] embed image from variable

2013-01-29 Thread BlueShadow
I tried that but it doesn't show an image it puts the img tag in the html code and fills the src="" with the pinary stuff but no image is displayed On Tuesday, January 29, 2013 4:53:33 PM UTC+1, rochacbruno wrote: > > I guess you can try > > >> {{=IMG(_src=plotimg)}} > > > or > > > > > --

[web2py] Re: python 2.5 problem: ValueError: Invalid boundary in multipart form: ''

2013-01-29 Thread Niphlod
windows build should be against python 2.7.3 On Tuesday, January 29, 2013 3:52:27 PM UTC+1, select wrote: > > When uploading zip files in a form I get this error > Traceback (most recent call last): > File "gluon/main.py", line 503, in wsgibase > File "gluon/main.py", line 321, in parse_get_post_v

Re: [web2py] Update on multiple tables with one form

2013-01-29 Thread Anthony
On Tuesday, January 29, 2013 10:36:39 AM UTC-5, Richard wrote: > And what about .as_dict()? > > record = select_something.as_dict() > Actually, you wouldn't need to use .as_dict() if you already have a Row object -- you can submit that directly as the record. The problem is that if the Row obje

Re: [web2py] embed image from variable

2013-01-29 Thread Bruno Rocha
I guess you can try > {{=IMG(_src=plotimg)}} or -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options

[web2py] embed image from variable

2013-01-29 Thread BlueShadow
Hi, I like to add Graphs with matplotlib directly into my sites. I used a web2py slice to get an image into a variable: from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure import cStringIO def plot(title='title',xlab='x',ylab='y',mode='

Re: [web2py] routes.py in case of second application.

2013-01-29 Thread Jonathan Lundell
On 29 Jan 2013, at 1:44 AM, Annet wrote: > In my application every registered user has a shortname stored in auth_user, > which he can use to reference his home page. For this purpose I have the > following code in 00_db.py: > > > if request.controller == 'default' and request.function == 'ind

[web2py] Re: .update_or_insert not optimized!!

2013-01-29 Thread Christian Espinoza
Hi all, I'm wondering about if .update_or_insert was enhanced or not yet? Thanks in advance. Christian. El jueves, 3 de mayo de 2012 09:46:46 UTC-4, Anthony escribió: > > You're manual version updates only two fields, whereas update_or_insert >>> updates six fields -- maybe that's the difference

[web2py] Re: Reporting server side calculation progress via ajax

2013-01-29 Thread Andriy
I wrote a reply, but pressed "replay to author" by mistake. Now I do not know if it was PM or not and message is gone, this interface is confusing... The thing is, what Niphlod suggested works on localhost, but does not work on free pythonanywhere account. Server does not return 200OK for any r

[web2py] Re: Autoincrement field

2013-01-29 Thread szimszon
http://code.google.com/p/web2py/issues/detail?id=1307 and http://code.google.com/p/web2py/issues/detail?id=1308 Tnx. 2013. január 29., kedd 15:15:59 UTC+1 időpontban Massimo Di Pierro a következőt írta: > > Please open a ticket about this. > > On Tuesday, 29 January 2013 03:05:17 UTC-6, szims

Re: [web2py] Update on multiple tables with one form

2013-01-29 Thread Richard Vézina
And what about .as_dict()? record = select_something.as_dict() ? Richard On Tue, Jan 29, 2013 at 9:28 AM, Angelo Compagnucci < angelo.compagnu...@gmail.com> wrote: > Thanks Antony, > > I think the previous solution is the most simple and clean way to make > multiple updates on Web2py and work

[web2py] python 2.5 problem: ValueError: Invalid boundary in multipart form: ''

2013-01-29 Thread select
When uploading zip files in a form I get this error Traceback (most recent call last): File "gluon/main.py", line 503, in wsgibase File "gluon/main.py", line 321, in parse_get_post_vars File "cgi.pyc", line 534, in __init__ File "cgi.pyc", line 659, in read_multi File "cgi.pyc", line 534, in __init

[web2py] Re: Is it possible to use IS_IN_SET() in combination with other validators to validate a list?

2013-01-29 Thread Anthony
If you don't want to allow the user to select multiple options, then why is the field type list:string rather than just string? If you make it just a string type, then you will be able to apply a list of validators, as below. Anthony On Tuesday, January 29, 2013 5:39:59 AM UTC-5, Lamps902 wrote

Re: [web2py] Update on multiple tables with one form

2013-01-29 Thread Angelo Compagnucci
Thanks Antony, I think the previous solution is the most simple and clean way to make multiple updates on Web2py and worked wonderfully. Anyway, thank you for your intrest! 2013/1/29 Anthony > On Tuesday, January 29, 2013 4:40:04 AM UTC-5, AngeloC wrote: > >> Hi Steve, >> >> Great suggestion,

[web2py] Re: web2py world conference 2013

2013-01-29 Thread Bill Thayer
I'll mention it on my Dallas Python mailing list too. Don't know how many web2py users we have in Texas though. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an emai

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread Massimo Di Pierro
Mind I think it should be possible to do: auto = SQLFORM.widgets.autocomplete(request,db.Person,id_field=db.Person.id ) db.define_table('Person', Field('name'), format='%(name)s') db.define_table('Relation', Field('name',db.Person), ('contact',db.Person)) db.Relation.name.w

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread Massimo Di Pierro
Can you submit a patch? On Tuesday, 29 January 2013 05:36:53 UTC-6, DenesL wrote: > > > You have found a bug. > > The problem is that identical field names are being generated in the form > for both Relation fields: > name="_autocomplete_Person_name_aux" ... > name="_autocomplete_Person_name_au

Re: [web2py] Update on multiple tables with one form

2013-01-29 Thread Anthony
On Tuesday, January 29, 2013 4:40:04 AM UTC-5, AngeloC wrote: > Hi Steve, > > Great suggestion, but the problem remains. How can I update a record that > I cannot select? > > The SQLFORM.factory way cannot permits to select a record to prepopulate > the forms, so you only can insert, but not upd

[web2py] Re: Autoincrement field

2013-01-29 Thread Massimo Di Pierro
Please open a ticket about this. On Tuesday, 29 January 2013 03:05:17 UTC-6, szimszon wrote: > > Some other issue: > > db: > import datetime > db.define_table('sometable', > Field('otherid', > compute=lambda r: 'SPPRIME%s' % ( > datetime.date.toda

[web2py] Re: how to install plugin_wiki?

2013-01-29 Thread Massimo Di Pierro
Plugin wiki has to die. Almost all of its functionalities are now in web2py core (auth.wiki). It will be removed from the book. On Tuesday, 29 January 2013 03:02:11 UTC-6, Paul Whipp wrote: > > This is an old thread but there is still the same issue with the > documentation which is very worryin

[web2py] Re: Insert works using SQLite, not GAE/Datastore

2013-01-29 Thread Scott Hunter
Sorry - yes, I changed the model, replacing the floats with doubles. On Tuesday, January 29, 2013 4:33:12 AM UTC-5, Alan Etkin wrote: > > > OK, it seems that GAE isn't fond of floats, but is quite happy with > doubles > > Good to know, but, how did you fix GAE?. Have you changed your model? This

[web2py] Re: Reporting server side calculation progress via ajax

2013-01-29 Thread Niphlod
can't reproduce right now, but usually for this kind of stuff I'd use a totally external process. Beware that "several minutes" standing requests may be killed by your webserver to free up resources (usually governed by the timeout* parameters). If you'd like to have that running inside your w

[web2py] Reporting server side calculation progress via ajax

2013-01-29 Thread Andriy
I have a time consuming server side calculation, which is triggered by edit-form submitting and can run up to several minutes (its a sports event data recalculation if rules are changed). During this time I want to receive messages via ajax from server and post them in a div for a progress visu

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread DenesL
You have found a bug. The problem is that identical field names are being generated in the form for both Relation fields: -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from

[web2py] Re: Date comparison in datetime field

2013-01-29 Thread Alan Etkin
> > db(db.table_name.timestamp.date()==datetime.today.date()) > Dal supports the year, month and day operators. You could split the query by the three values using & db((db... .year()==..date().year)&(db ... .month()== ...date().month ...) ... Not sure as I never tried it, but should work. -

[web2py] Re: RuntimeError: Unable to handle upload

2013-01-29 Thread Alan Etkin
> > I am attempting to write a function that will eventually go in to a > migration script to upload legacy data files. As you can see I "Unable to handle load" is too generic for this case. I'd better temporarily let dal not to catch the error so there's a more precise description of it. Pe

[web2py] Date comparison in datetime field

2013-01-29 Thread Pradeeshnarayan
In my table I have a datetime field. In one condition I have to check only date in that field, so I have tried as below db(db.table_name.timestamp.date()==datetime.today.date()) but it is throwing error as 'AttributeError: 'Field' object has no attribute 'date''. I have tried both 'date()' and

Re: [web2py] Re: Update on multiple tables with one form

2013-01-29 Thread Annet
Hi Angelo, I am glad you solved your problem. I found a way to add automatically variables to form.vars, hope this helps! > > record = db(...).select().first() > > for table in [db.table1, db.table2]: > for field in table.fields: > form.vars[field] = record[table][fiel

[web2py] Re: where to post problems/feedback on web2py.com?

2013-01-29 Thread Sean Murphy
Thanks Massimo - I think it would be good to modify http://www.web2py.com/appliances to reflect this. BR, Seán. On Monday, January 28, 2013 5:21:30 PM UTC+1, Massimo Di Pierro wrote: > > Please use the github issues: > https://github.com/mdipierro/web2py-appliances > > On Monday, 28 January 20

Re: [web2py] Re: CentOS 6.3 + nginx = 502 Bad gateway

2013-01-29 Thread Arnon Marcus
Yeah, already done, it's running... On Tuesday, January 29, 2013 12:38:49 PM UTC+2, Niphlod wrote: > > add > > unzip sudo > > to the requirement lines. > > On Tuesday, January 29, 2013 11:31:14 AM UTC+1, Arnon Marcus wrote: >> >> Wait a minute - this is not good... : >> >> Install web2py >>> %

  1   2   >