Re: [web2py] Passing python string to javascript

2015-01-29 Thread Manuele Pesenti
Il 29/01/15 00:04, José Eloy ha scritto: > Hello! > > How can I pass a python string to javascript? I know how to pass an > integer variable to javascript. > > Example: > > def pass_variable(): > variable = 25 > return dict(variable=variable) > > In the view: > >var v={{=variable}}; >

[web2py] Re: pydal / postgres / jsonb

2015-01-29 Thread Kiran Subbaraman
Opened a request here: https://github.com/web2py/pydal/issues/48. Thanks for looking into this. On Wednesday, January 28, 2015 at 11:31:08 PM UTC+5:30, Paolo Valleri wrote: > > I agree. we should set jsonb as default json data type for pg >= 9.4 > I'll provide a patch as soon as possible, in the

Re: [web2py] Re: pydal / postgres / jsonb

2015-01-29 Thread Paolo Valleri
@niphlod, an option is to set travis-ci to use postgres 9.4 to tests this new data type very carefully. I guest it'll be ready "as stable" soon https://github.com/travis-ci/travis-ci/issues/2983 Paolo 2015-01-29 9:34 GMT+01:00 Kiran Subbaraman : > Opened a request here: https://github.com/web2

[web2py] Re: pydal / postgres / jsonb

2015-01-29 Thread Kiran Subbaraman
My understanding is that jsob is a storage format, and behind the scenes in postgres, and does not impose a change in the programming model. Or is there some other view point you wanted to share? On Thursday, January 29, 2015 at 1:51:24 AM UTC+5:30, Niphlod wrote: > > watch out for all the evid

[web2py] Pack Custom does not customize

2015-01-29 Thread António Ramos
Hello i have web2py 2.9.x i want to pack my app but not including the upload folder (4GB!). I tried pack custom but it does not allow me to customize!! Also Pack custom is not translated as the other options are and its a litle strange to see portuguese and english at the same popup. Thank you

[web2py] Re: pydal / postgres / jsonb

2015-01-29 Thread Niphlod
did you read the whole page or not ? there are several huge limitations in what it accepts. IMHO using it by default is not an option, and it shouldn't be enforced. On Thursday, January 29, 2015 at 10:24:34 AM UTC+1, Kiran Subbaraman wrote: > > My understanding is that jsob is a storage format,

[web2py] Re: site went down for no reason on pythonanywhere

2015-01-29 Thread Niphlod
yep. you recently updated web2py and something "garbagy" has been left there. Use a new clean 2.9.12 On Thursday, January 29, 2015 at 3:24:07 AM UTC+1, LoveWeb2py wrote: > > receiving this error when I try to restart.. any thoughts? > Type "help", "copyright", "credits" or "license" for more inf

[web2py] Re: site went down for no reason on pythonanywhere

2015-01-29 Thread LoveWeb2py
Loaded fresh install on pythonanywhere.com Clicked upgrade button received this error: unable to upgrade because [Errno 2] No such file or directory: "/home/myaccount/myapp/gluon/dal/__init__.py" Reloaded the app and receiving the same error from pythonanywhere. They cannot start the service. Goi

[web2py] Re: Passing python string to javascript

2015-01-29 Thread Leonel Câmara
There's also the rarely used ASSIGNJS helper which you can use for this. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because

[web2py] Re: Suggestion for web2py hosting

2015-01-29 Thread Ramkrishan Bhatt
After coming to lot of option like open stack, open shift ,Pythonanywhere Massimo would you please some of the hosting services for development and production. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://co

Re: [web2py] Re: Suggestion for web2py hosting

2015-01-29 Thread António Ramos
also webfaction. I use with a lot of success 2015-01-29 12:52 GMT+00:00 Ramkrishan Bhatt : > After coming to lot of option like open stack, open shift ,Pythonanywhere > Massimo would you please some of the hosting services for development and > production. > > -- > Resources: > - http://web2p

[web2py] Re: Passing python string to javascript

2015-01-29 Thread Anthony
We should probably document that. On Thursday, January 29, 2015 at 7:43:15 AM UTC-5, Leonel Câmara wrote: > > There's also the rarely used ASSIGNJS helper which you can use for this. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (S

[web2py] Re: web2py 2.9.12 is OUT

2015-01-29 Thread Massimo Di Pierro
please open github ticket about this. On Tuesday, 27 January 2015 12:34:06 UTC-6, Antonio Salazar wrote: > > Since the upgrade, I'm getting this annoyance in the web editor. > > When I save a controller with a syntax error, the operation stalls at > "saving now...". > If I retry the save, I get t

[web2py] Re: Passing python string to javascript

2015-01-29 Thread Massimo Di Pierro
Actually {{=ASSIGNJS(v = variable)}} or, equivalent, var v = {{=XML(json.dumps(variable))}}; is the right thing to do. Not in the manual but is in 2.9.11 and beyond. On Wednesday, 28 January 2015 17:04:23 UTC-6, José Eloy wrote: > > Hello! > > How can I pass a python string to javascript? I k

[web2py] Re: Bootstrap modal for insert, update and delete

2015-01-29 Thread M.C. Botha
I have tried that but it does not reload the form. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to

Re: [web2py] Re: What are the usual steps for designing a web2py application?

2015-01-29 Thread Y
Not strange at all, it's what a user would demand to donate any personal information for the sciences. Am Montag, 26. Januar 2015 16:41:14 UTC+1 schrieb Richard: > > Strange requirement!! > > On Sat, Jan 24, 2015 at 7:23 AM, Y > > wrote: > >> In my case Facebook, LinkedIn, Google are not trustwo

[web2py] Re: why use the admin interface, at all?

2015-01-29 Thread Gary Cowell
I use the built in editor heavily. Lots of my web2py coding is done on a chromebook, so it's completely perfect for me. Be really hard if it worked any other way than this. On Friday, 12 February 2010 17:35:49 UTC, snfctech wrote: > > I'm just getting started with web2py and I must say - I lo

[web2py] Re: Groupby year on date field

2015-01-29 Thread Moiz Nagpurwala
This is the controller: def year(): sum_of_entries = db.mydiary.id.count() years = db(db.mydiary.id > 0).select(sum_of_entries, db.mydiary.Date. year(), groupby=db.mydiary.Date.year()) # years = db(db.mydiary.id > 0).select(db.mydiary.Date.year(), distinct=True) return locals() Th

[web2py] UnicodeDecodeError: 'utf8' codec can't decode byte... : invalid continuation byte (from DAL)

2015-01-29 Thread msdexp555
I'm having a unicode problem with the DAL. My web2py application work normal on local computer (Windows, MySQL). Bat after deploying on the server (Unix, Apache) this simple call: db(db.myTable).select().first() generates an exception (see my topic). The data on both machines (utf-8) is the sam

[web2py] dynamic buttons in sqlform.grid

2015-01-29 Thread Gary Cowell
Hello I have a SQLFORM.grid, where I wanted some buttons to do different things, and to look different based on the status of the entities being reported in the grid. Here's what I did for one of them: links = [ dict(header=T('Running'),body=lambda row: testslot(row

Re: [web2py] Is Web2py suitable for my project

2015-01-29 Thread Eric's Gmail
Richard, The users are biologists and chemists so any sort of “programming” is too much. Eric > On Jan 27, 2015, at 12:51 PM, Richard Vézina > wrote: > > I mean IPython notebook... > > On Tue, Jan 27, 2015 at 1:51 PM, Richard Vézina > wrote: > Eric, > >

[web2py] Re: Groupby year on date field

2015-01-29 Thread Moiz Nagpurwala
Both of the approaches you suggested are not yielding any results. > given that db.entries.date is a datetime field, the former is fetched with > > db(db.entries.id > 0).select(db.entries.date.year(), distinct=True) > > while the latter, e.g. the entry count per year, with > > sum_of_entries = db

[web2py] Submit current form prior to logout?

2015-01-29 Thread lillian
Hello, Imagine a page that has a form with many fields to fill out. A user (who must be logged in to use the app) fills out the form and then logs out before clicking submit. Is it possible to submit those changes ahead of the logout? Thanks! lillian -- Resources: - http://web2py.com - h

[web2py] Re: site went down for no reason on pythonanywhere

2015-01-29 Thread Ian Ryder
I had this a few days ago - on investigation I found a reference to it on an import statement in the web2py code...I've no idea where it came from (via an update?), I removed it all worked OK from there On Thursday, January 29, 2015 at 1:24:07 PM UTC+11, LoveWeb2py wrote: > > receiving this erro

[web2py] Newby Question

2015-01-29 Thread Eric
Sorry if this is too basic a question. I very new to web programming and Web2py. I have written some desktop applications. Where I'm having trouble right now is understanding exactly how the Python code in Web2py interacts with the HTML. In my desktop GUI apps, a control like a button generates

[web2py] Modify source to run web2py server with a pre-selected server IP

2015-01-29 Thread Aydin S
Hi, how to run web2py without a need to specify the IP? Running machine is linux. I know how to modify the file widget.py to eleminate the need for password, but I'm stuck to get it work with an pre-selected IP, meaning that to get web2py server to run from public IP always and not to ask me to

[web2py] Re: Passing python string to javascript

2015-01-29 Thread lillian
Jose, You are missing quotes: var v='{{=variable}}'; In your code js thinks HOLA is an object. If you don't want to use quotes on the js side you need to use extra ones in python and prevent them from being escaped: variable = XML("'HOLA'") This will get you 'HOLA' in js. If you don't use

[web2py] Re: Strange behaviour with request.args(0)

2015-01-29 Thread Ian Ryder
Hi, here's the code which sits as a link/button on a grid: A(T('Profile >'), _class='', _target='_blank', _href=URL('visuals', 'supporter_profile', args=[row.entity_External_Key,])))] The URL generated looks a bit like this:

Re: [web2py] Is Web2py suitable for my project

2015-01-29 Thread Richard Vézina
:D I know that... Though I am biologist too :) There is biologist that like coding... Richard On Tue, Jan 27, 2015 at 1:53 PM, Eric's Gmail wrote: > Richard, > > The users are biologists and chemists so any sort of “programming” is too > much. > > Eric > > On Jan 27, 2015, at 12:51 PM, Richa

Re: [web2py] Re: What are the usual steps for designing a web2py application?

2015-01-29 Thread Richard Vézina
In this context you are right... Though, it what you need to build Silkroad web2py app too!! :) Richard On Wed, Jan 28, 2015 at 5:13 AM, Y wrote: > Not strange at all, it's what a user would demand to donate any personal > information for the sciences. > > Am Montag, 26. Januar 2015 16:41:14 U

Re: [web2py] vars=dict(_next= ...) and settings.cas_domains = None

2015-01-29 Thread Richard Vézina
Funny I just finish by figure it out how make an user redirected where he was coming from after submitting a form... So I have a A() button like yours and where I construct _next var like that : vars=dict(_next=urllib.quote(URL(request.controller, request.function, args=request.args, vars=request.

[web2py] Empty text field throws an error in fpdf.py

2015-01-29 Thread Richard Warg
There is a possible problem in gluon/contrib/fpsf/fpdf.py when the user leaves an entry blank. What is the process for submitting this issue in the new reporting procedure? 51.filler = False 52.for row in db_rows: 53.pdf.cell(25,5,row.case_number,1, fill=filler) 54. 55.

Re: [web2py] vars=dict(_next= ...) and settings.cas_domains = None

2015-01-29 Thread Richard Vézina
Note, my solution may not be full secure... Richard On Thu, Jan 29, 2015 at 11:52 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Funny I just finish by figure it out how make an user redirected where he > was coming from after submitting a form... So I have a A() button like > yours

Re: [web2py] Newby Question

2015-01-29 Thread Richard Vézina
Without the code from your controller and view it is more difficult to be sure of what you are talking about exactly... I guess you have wrote a model, where you define a field of type upload, then you want to understand how the upload of the file works and thing get done... A simple question may

[web2py] Re: web2py with bootstrap-slider && bootstrap-typeahead

2015-01-29 Thread JoeCodeswell
Dear Niphlod, Thanks SO MUCH for being a GREAT technical contributor to my FAVORITE web framework. I have a suggestion for you regarding tone of the first part of your answer. In your answer to *fsp*, the first sentence could have been *profitably skipped*. I think that first sentence is disco

[web2py] Re: Passing python string to javascript

2015-01-29 Thread José Eloy
Thanks guys for your answer. Making var v="{{=variable}}" was the solution. I didn't know the ASSIGNJS helper. Is not in the manual. It would be great if is included. Regards. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread JoeCodeswell
Dear Richard, Regarding your comment, "I don't understand the dichotomy of your question?". I have been thinking about it. Here's what i have come up with. I am a Website Administrator for a WordPress site that I host because: - I don't care to write/read/understand ANY WordPress/PHP code

[web2py] Re: pydal / postgres / jsonb

2015-01-29 Thread Kiran Subbaraman
Yes, I did, and have tabulated them with what I thought are implications for developers (would like to hear from you about the implications). Have put it up on github issues page, because of its markdown support: https://github.com/web2py/pydal/issues/48 On Thursday, January 29, 2015 at 4:48:0

[web2py] Re: pydal / postgres / jsonb

2015-01-29 Thread Niphlod
that basically sums the whole thing to "until now you could have stored the hell you wanted in json, while from now on you'll have this limitations". Still think that cutting options by default is a good thing to do ? I could be +1 for adoption as an option, but -1000 for making it the default,

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread Richard Vézina
So how could we serve Web Developers better? Richard On Thu, Jan 29, 2015 at 2:34 PM, JoeCodeswell wrote: > Dear Richard, > > Regarding your comment, "I don't understand the dichotomy of your > question?". > > I have been thinking about it. Here's what i have come up with. > > I am a Website Ad

[web2py] Re: web2py with bootstrap-slider && bootstrap-typeahead

2015-01-29 Thread Niphlod
and of course resuming a 2-month old thread is equally helpfulthanks for the kind words but I still think it's a forum for webp2y users, who will always need to read docs OUTSIDE the world of web2py if they'd like to poke with CUSTOM js code coming from OUTSIDE... we can't

[web2py] Re: pydal / postgres / jsonb

2015-01-29 Thread Kiran Subbaraman
In agreement with you on not enforcing this - jsonb - as default, but something that a knowledge-able developer can turn on as a configuration / code option, and specifically for the PG db. On Friday, January 30, 2015 at 1:35:26 AM UTC+5:30, Niphlod wrote: > > that basically sums the whole thin

[web2py] Re: Modify source to run web2py server with a pre-selected server IP

2015-01-29 Thread Niphlod
web2py.py has 2 useful parameters: -i and -p. Respectively, they make the application listen on the address specified after -i and at the port specified with -p. To avoid the widget from popping up, you should also pass the -a parameter to supply a password. Special bonuses: there is a special v

[web2py] Re: Groupby year on date field

2015-01-29 Thread Niphlod
I assure you you will get results, as long as there are values in the table try using: 1) this model in a fresh app db.define_table('entries', Field('this_is_datetime', 'datetime')) 2) fill some data in 3) create this controller function def test(): distinct_ = db(db.entries.id > 0).

[web2py] Re: Passing python string to javascript

2015-01-29 Thread Anthony
Yes, this is the best approach because it automatically handles quoting strings (but leaving numbers unquoted), so you don't have to worry about the data type. Anthony On Thursday, January 29, 2015 at 9:47:05 AM UTC-5, Massimo Di Pierro wrote: > > Actually > > {{=ASSIGNJS(v = variable)}} > > or

[web2py] Re: Submit current form prior to logout?

2015-01-29 Thread Niphlod
if the "log out" is an event, like a click on the "logout" button, you can intercept it, issue a submit with javascript and then actually logout the user... if you're good with javascript-fu, the user won't notice it. If instead the "log out" is the user closing the window, YMMV. You can hook u

Re: [web2py] vars=dict(_next= ...) and settings.cas_domains = None

2015-01-29 Thread Anthony
Note, it is not necessary to use urllib.quote, as the URL function already does that for URL vars. Nor is it necessary to use urllib.unquote, as incoming query strings are already unquoted by the framework. Anyway, Annet's problem appears to be related to CAS, as settings.cas_domains is None, w

Re: [web2py] vars=dict(_next= ...) and settings.cas_domains = None

2015-01-29 Thread Richard Vézina
Thanks Anthony you are right about that... Have been strungling with that and may have forget a test case... I was not using URL() in the first place and has to use urllib.quote() to make proper _next vars url, so didn't realize that I was not requiring it... :) Richard On Thu, Jan 29, 2015 at 3

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread Niphlod
In that POV, you'll always identify an "administrator" as a person who "clicks" on existing apps he didn't code and a "developer" of apps someone that "clicks" on fruits of his mind. That's basically comparing oranges and bananaswordpress is hardly a framework. It's an application that does

[web2py] SQLFORM hanging on insert

2015-01-29 Thread Ian W. Scott
I have a create form (SQLFORM) that works (a new record is actually created) but immediately after inserting the new record the web2py process hangs. The form remains greyed out and no other functions will work (e.g., can't refresh the page or navigate away). But there's no error raised. Can an

[web2py] Re: SQLFORM hanging on insert

2015-01-29 Thread Ian W. Scott
Oh, and I'm running version 2.9.11-stable. On Thursday, January 29, 2015 at 4:00:54 PM UTC-5, Ian W. Scott wrote: > > I have a create form (SQLFORM) that works (a new record is actually > created) but immediately after inserting the new record the web2py process > hangs. The form remains greyed

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread Richard Vézina
I am not sure where it is going... My understanding, is that Joe explain what he means by admin and devs (that I did already understand in the first place, but he make it clear)... And what I understand, is that he think that web2py help more admins in their day to day work then developers... If m

Re: [web2py] Why does redirect() always append '#'?

2015-01-29 Thread Richard Vézina
Getting the same issue... Could your suggestion of emtpy action in this case be improve with "/" action which will be parsed out by url processing? Also, how do we suppose to manage form action with SQLFORM and .factory... I try add action='', also to form.process(action='', ...), nothing works..

[web2py] Re: SQLFORM hanging on insert

2015-01-29 Thread Niphlod
what about if you start a shell and issue the insert statement with a db.commit() ? does it hang also there ? On Thursday, January 29, 2015 at 10:05:30 PM UTC+1, Ian W. Scott wrote: > > Oh, and I'm running version 2.9.11-stable. > > On Thursday, January 29, 2015 at 4:00:54 PM UTC-5, Ian W. Scott

Re: [web2py] Why does redirect() always append '#'?

2015-01-29 Thread Anthony
SQLFORM(..., _action='') SQLFORM.factory(..., _action='') The above are both just HTML helpers, so you can add any attribute as usual (i.e., by preceding the attribute name with an underscore). Anthony On Thursday, January 29, 2015 at 4:25:42 PM UTC-5, Richard wrote: > > Getting the same issue

Re: [web2py] Re: Question about web2py roadmap.

2015-01-29 Thread JoeCodeswell
Dear Richard and Niphlod, Thanks for your responses. Richard, your understanding is the indeed meaning of what i was trying to express. Regarding my suggestions for improving web2py support for web-devs, i have 2 suggestions i can think of right now: - When writing a Plugin or a Wizard or s

[web2py] Re: web2py 2.9.12 is OUT

2015-01-29 Thread Antonio Salazar
I tried to replicate the bug report on a clean install, but it didn't happen. I think I'll stick with manual updates for now. El jueves, 29 de enero de 2015, 8:40:59 (UTC-6), Massimo Di Pierro escribió: > > please open github ticket about this. > > On Tuesday, 27 January 2015 12:34:06 UTC-6, Anto

[web2py] Re: Modify source to run web2py server with a pre-selected server IP

2015-01-29 Thread Aydin S
Thanks so much for the very useful and precise answer. I understood, however, what I meant with public IP was not 0.0.0.0, I mean public IP assigned to my machine. I don't want to every time check it to see what it is because it is dynamic and I want to be able to use web2py's ability to read i

[web2py] Re: Modify source to run web2py server with a pre-selected server IP

2015-01-29 Thread Aydin S
I found it out. Just used the hostname after -i. quinta-feira, 29 de Janeiro de 2015 às 21:33:08 UTC-5, Aydin S escreveu: > > Thanks so much for the very useful and precise answer. I understood, > however, what I meant with public IP was not 0.0.0.0, I mean public IP > assigned to my machine.

[web2py] Trying to run web2py from linux, all ports fail

2015-01-29 Thread Aydin S
Hi, I'm trying to run web2py from linux. However, it fails with this error: ERROR:Rocket.Errors.Port8000:Socket hostname:8000 in use by other process and it won't share. WARNING:Rocket.Errors.Port8000:Listener started when not ready. I have tried various ports like 8001, and it fails still. Ther

Re: [web2py] Trying to run web2py from linux, all ports fail

2015-01-29 Thread Mirko Scavazzin
*TIME_WAIT** is the state that typically ties up the port for several minutes after the process has completed.*The length of the associated timeout varies on different operating systems, and may be dynamic on some operating systems, however typical values are in the range of one to four minutes. HT

[web2py] Re: [video] websockets com web2py e tornado

2015-01-29 Thread Dmitry Ermolaev
In curent version it not exist? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups

Re: [web2py] vars=dict(_next= ...) and settings.cas_domains = None

2015-01-29 Thread Annet
Thank you both for your replies. Thanks for your reply. I am not using CAS, there's this setting in db.py ## to prevent the auth_cas table from being created auth.settings.cas_domains = None that causes vars=dict(_next=...) to break in my application. This worked in previous versions of web2py,

[web2py] Re: web2py with bootstrap-slider && bootstrap-typeahead

2015-01-29 Thread Tim Richardson
an incredibly restrained answer. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Group