[web2py] Re: Unable to run web2py_no_console.exe (v2.14.6)

2016-06-14 Thread Arglanir
In the meantime I have updated my launching script in order to start web2py.exe minimized, if web2py_no_console.exe does not create a "web2py.pid" file. Le mardi 14 juin 2016 21:21:22 UTC+2, Arglanir a écrit : > > Thank you. As I said, web2py.exe works. > The goal is to deploy web2py on Windows

[web2py] Key Error when try to access records in DB tables

2016-06-14 Thread Joe
I can't understand what could possibly cause this. When I submit the form, the form is processed, the page is redirected, email sent and the records stored in the DB table as expected. But, when I click on the ID number of the row in the table, trying to access the records, as I always do, I

[web2py] generic.docx ?

2016-06-14 Thread H. Das
Would it be possible in web2py to create a generic.docx (word document, odf, or similar) template that can convert from HTML? Basically it should work just like generic.pdf. Thanks, love you guys. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Pure HTML form

2016-06-14 Thread Jeff Riley
Oh lord folks. I had the same name for two fields. That was my only problem. Thank you all very much. On Monday, June 13, 2016 at 6:27:20 PM UTC-5, Jeff Riley wrote: > Hello all. So sorry to bother you again. Since I have to overlay form > fields on top of a canvas, I have to build pure

[web2py] how to debug weasyprint error - failed to load a library: cairo / cairo-2

2016-06-14 Thread Michael Beller
I posted this on the pythonanywhere (PAW) forums also but I think it may be web2py specific (or at least specific to the PAW/web2py combination) ... I'm using weasyprint to generate a PDF. It's working on my local dev environment and my PAW personal account. On a new PAW account it fails on:

[web2py] Re: how to open parent window from javascript

2016-06-14 Thread Alex Glaros
never mind answered here: http://stackoverflow.com/questions/32107617/web2py-pass-a-variable-from-view-to-controller -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

Re: [web2py] Re: ReferenceError: web2py is not defined

2016-06-14 Thread Manuele Pesenti
Il 14/06/16 23:22, Manuele Pesenti ha scritto: > > Yes! It fixes the bug. I'll open the issue. > > Thanks to Everyone! :) > > M. > just opened: https://github.com/web2py/web2py/issues/1364 Best regards M. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: ReferenceError: web2py is not defined

2016-06-14 Thread Manuele Pesenti
Il 14/06/16 21:19, Anthony ha scritto: > es, looks like a bug here: > https://github.com/web2py/web2py/blob/master/applications/welcome/static/js/web2py-bootstrap3.js#L14. > Should be: > > | > $.web2py.validate_entropy($(this)); > | > > See if that change works, and please file a Github issue. > >

[web2py] how to open parent window from javascript

2016-06-14 Thread Alex Glaros
conditional javascript below correctly opens new window $("#alexTree").fancytree({ checkbox: true, selectMode: 3, source: {url: tree_url}, dataType: "json", postProcess: function(event, data){ data.result = convertData(data.response); }, select: function(event, data) {

[web2py] Re: Unable to run web2py_no_console.exe (v2.14.6)

2016-06-14 Thread Arglanir
Thank you. As I said, web2py.exe works. The goal is to deploy web2py on Windows computers that may not have any Python installed. So web2py.py will not be executable on them. Am I the only one that has this problem ? I reproduced this problem on a laptop using Windows 7 I think. Le mardi 14

[web2py] Re: ReferenceError: web2py is not defined

2016-06-14 Thread Anthony
Yes, looks like a bug here: https://github.com/web2py/web2py/blob/master/applications/welcome/static/js/web2py-bootstrap3.js#L14. Should be: $.web2py.validate_entropy($(this)); See if that change works, and please file a Github issue. Thanks. Anthony On Tuesday, June 14, 2016 at 5:55:59 AM

Re: [web2py] ReferenceError: web2py is not defined

2016-06-14 Thread Richard Vézina
Which version of web2py, trunk? I guess you should open a issue on github, but provide the exact path to reproduce the problem... Richard On Tue, Jun 14, 2016 at 2:56 PM, Manuele Pesenti wrote: > Il 14/06/16 17:56, Richard Vézina ha scritto: > > You miss

Re: [web2py] ReferenceError: web2py is not defined

2016-06-14 Thread Manuele Pesenti
Il 14/06/16 17:56, Richard Vézina ha scritto: > You miss web2py-bootstrap3.js in your app? Was that error with default > welcome or your app? First I got in my app (in wich I rewrote all the layout) but I noticed that I get the same error using the appadmin... the error is raised in

[web2py] simple file uploader to database as a plugin

2016-06-14 Thread Vic Ding
Hi all, I know it's 2 things in one post: how to make a file uploader as a plugin? It should upload a file store it in the database and keep a record of the table and record to which it belong to (associate the uploaded file with a record in another table). model is plugin_upload_file.py

[web2py] Re: XML(sanitize=True) and incorrect HTML

2016-06-14 Thread Anthony
In gluon.sanitizer.XssCleaner: def handle_endtag(self, tag): bracketed = '' % tag self.in_disallowed.pop() if tag not in self.permitted_tags: if (not self.strip_disallowed): self.result += xssescape(bracketed) elif tag in

[web2py] Re: SELECT without duplicates for a specific field

2016-06-14 Thread Dave S
On Tuesday, June 14, 2016 at 6:55:43 AM UTC-7, Gael Princivalle wrote: > > With inner joins orderby works but not groupby. > > db(db.table.reference == db.referencedtable.id).select(db.table.ALL, > orderby=db.referencedtable.Field) > Works. > > db(db.table.reference ==

[web2py] XML(sanitize=True) and incorrect HTML

2016-06-14 Thread Kirill Shatalaev
Hello. XML crashes while trying to sanitize some sorts of incorrect html. For example: a = '' # wrong html b = XML(a, sanitize=True) pop from empty list I suppose this is a severe bug. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] ReferenceError: web2py is not defined

2016-06-14 Thread Richard Vézina
You miss web2py-bootstrap3.js in your app? Was that error with default welcome or your app? On Tue, Jun 14, 2016 at 5:55 AM, Manuele Pesenti wrote: > Hi! > > I found some client side trouble using the validator IS_STRONG. > > Using this validator for such a field of a

[web2py] Re: is it safe to create url in javascript?

2016-06-14 Thread Alex Glaros
got it, thanks Stuart -- 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

[web2py] Re: what is syntax for recursive join?

2016-06-14 Thread Alex Glaros
Niphlod, good insight regarding managing response times. Thanks for pointing the right direction. Alex -- 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) ---

[web2py] Re: jquery-pjax

2016-06-14 Thread Niphlod
great, simple, done. On Tuesday, June 14, 2016 at 2:34:22 PM UTC+2, Carlos Cesar Caballero wrote: > > Hi everyone, have you any experience with > https://github.com/defunkt/jquery-pjax and web2py? it looks really > interesting. > > Greetings. > > -- > Este mensaje le ha llegado mediante el

[web2py] Re: SELECT without duplicates for a specific field

2016-06-14 Thread Gael Princivalle
With inner joins orderby works but not groupby. db(db.table.reference == db.referencedtable.id).select(db.table.ALL, orderby =db.referencedtable.Field) Works. db(db.table.reference == db.referencedtable.id).select(db.table.ALL, orderby =db.referencedtable.Field, groupby=db.products.cm1) Give a

[web2py] jquery-pjax

2016-06-14 Thread Carlos Cesar Caballero Díaz
Hi everyone, have you any experience with https://github.com/defunkt/jquery-pjax and web2py? it looks really interesting. Greetings. -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema

[web2py] Re: SELECT without duplicates for a specific field

2016-06-14 Thread Gael Princivalle
Thanks you Marlysson but it was not the missing 's'. Ticket is: 'Field' object has no attribute 'title' Il giorno martedì 14 giugno 2016 12:53:24 UTC+2, Marlysson Silva ha scritto: > > results = db(db.products).select(db.products.category, orderby=db.products > .category.title,

[web2py] Re: I am trying to change the background image every 5 seconds like this but this doesn't seem to work?

2016-06-14 Thread Anthony
The URL is in Javascript. In: var baseUrl = '{{=URL('static', 'images')}}' the part in curly braces is Python, which gets executed on the server before the page is sent to the browser. In the browser, you will end up with HTML that looks like: var baseUrl = '/yourapp/static/images'; That's a

[web2py] Re: I am trying to change the background image every 5 seconds like this but this doesn't seem to work?

2016-06-14 Thread Emmanuel Dsouza
But how do I opened a random d.jpg through Javascript to a URL that is in Python? On Tuesday, June 14, 2016 at 5:14:13 PM UTC+5:30, Anthony wrote: > > No, you're still attempting to run Python code in Javascript. You must > write actual Javascript code -- no Python. You should only be using

[web2py] Re: I am trying to change the background image every 5 seconds like this but this doesn't seem to work?

2016-06-14 Thread Anthony
No, you're still attempting to run Python code in Javascript. You must write actual Javascript code -- no Python. You should only be using Python to create the base URL -- for example: var baseUrl = '{{=URL('static', 'images')}}'; [everything else is Javascript] Anthony On Tuesday,

[web2py] Re: I am trying to change the background image every 5 seconds like this but this doesn't seem to work?

2016-06-14 Thread Emmanuel Dsouza
Thank you Anthony but still it is not going through! Could you check why: {{extend 'layout.html'}} window.setInterval(function(){ {{i=URL('static','images/%d.jpg' %(randint(0,2)))}} document.body.style.background = url("{{=i}}"); }, 5000); Even this one doesn't work: {{extend

[web2py] Re: Unable to run web2py_no_console.exe (v2.14.6)

2016-06-14 Thread Marlysson Silva
Try to download the source version of code, there are a file .py that it's possible executable from terminal without problems , and still can to see the code of framework , the windows version just have .exe and the code (framework) stay obfuscated. Em segunda-feira, 13 de junho de 2016

[web2py] Re: SELECT without duplicates for a specific field

2016-06-14 Thread Marlysson Silva
results = db(db.products).select(db.products.category, orderby=db.products. category.title, groupby=db.products.category) You probability forget the "s" at name of table "products" , I think it so. Em segunda-feira, 13 de junho de 2016 12:31:33 UTC-3, Gael Princivalle escreveu: > > New model: >

[web2py] ReferenceError: web2py is not defined

2016-06-14 Thread Manuele Pesenti
Hi! I found some client side trouble using the validator IS_STRONG. Using this validator for such a field of a table and then visiting the admin and trying to add a new record the debugger console shows thi error: ReferenceError: web2py is not defined1 web2py-bootstrap3.js:14:6 At this link

[web2py] Re: Size of SQLFORM.grid items

2016-06-14 Thread Jitun John
Thanks a lot Anthony. Works like Charm. On Monday, June 13, 2016 at 8:42:16 PM UTC+5:30, Anthony wrote: > > As per the documentation: > > >- maxtextlength sets the maximum length of text to be displayed for >each field value, in the grid view. This value can be overwritten for each >

[web2py] Re: SELECT without duplicates for a specific field

2016-06-14 Thread Tribo Eila
Try INNER JOINS. On Monday, June 13, 2016 at 6:31:33 PM UTC+3, Gael Princivalle wrote: > > New model: > db.define_table('categories): > Field('title', type='string')) > > db.define_table('products'): > Field('code', type='string'), > Field('category', reference 'categories')) >

Re: [web2py] Re: JANRAIN

2016-06-14 Thread Laurent Chambon
in fact i have installed conf2py: the model : if settings.rpx_domain: from gluon.contrib.login_methods.rpx_account import RPXAccount auth.settings.actions_disabled=['register','change_password', 'request_reset_password'] auth.settings.login_form =

[web2py] Re: I am trying to change the background image every 5 seconds like this but this doesn't seem to work?

2016-06-14 Thread Anthony
Actually, in this case, you don't really need to bother with Ajax. Instead, just implement the random integer generation in Javascript and use the random integer to generate the URL in Javascript. For future reference, though, the third argument to the ajax() function can be ":eval" (which