[web2py] Is it possible to translate data in SQLFORM.grid?

2015-07-29 Thread Gael Princivalle
Hello all. Is it possible to translate data in SQLFORM.grid? MODEL: db.define_table('fruits', Field('name', type='string'), format='%(name)s') db.define_table('cake', Field('name', type='string'), Field('fruit', 'reference fruits',

[web2py] Re: OpenLDAP and TLS auth example, please

2015-07-29 Thread backseat
Hmm, we may have an LDAP server issue. Ignore for now; sorry for the noise. -- 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 beca

[web2py] Re: Getting a demo_mode not defined error in admin (even though demo_mode defined in 0.py)

2015-07-29 Thread Mark Li
I upgraded to version 2.11.2, but the error was still occurring. I deleted all the .pyc files from the web2py directory and this seems to have solved the problem. On Wednesday, July 29, 2015 at 12:06:46 PM UTC-7, Mark Li wrote: > > I am getting a very odd error in my admin app (2.9.10) on Pytho

[web2py] Re: Will database callbacks be appended each time model is changed?

2015-07-29 Thread Anthony
auth.add_group() actually does a database insert, so you don't want to keep repeating it on every request (actually, I would probably move that code out of the app altogether, as it really only needs to be run once ever). Specifying the after update callback, on the other hand, does not affect

Re: [web2py] Re: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
Deleting all the .pyc files from the web2py directory seems to have done the trick. On Wed, Jul 29, 2015 at 8:31 PM, Mark Li wrote: > I've updated to version 2.11.2, and the problem still persists. I've > deleted all errors, cache, and sessions for both admin app and "myapp" > > I am getting the

[web2py] Re: plugin for handsontable

2015-07-29 Thread Massimo Di Pierro
Fantastic. I a big fun of handontable. On Wednesday, 29 July 2015 11:59:27 UTC-5, Pablo Angulo wrote: > > I have packaged a plugin with one possible use of the great library > handsontable: > > > http://www.web2pyslices.com/slice/show/2042/handsontable-plugin-for-a-spreadsheet > > You may commen

[web2py] Re: Auth_user dynamic cascading registration fields

2015-07-29 Thread Massimo Di Pierro
The problem is that what you want to do cannot be resolved server side. You want the team dropdown to depend on the section, the section dropdown to depend on the department, and the department dropdown to depend on the factory. There is no web2py syntax to do this because there is no way to ge

[web2py] ExtendLogin not working

2015-07-29 Thread Marlysson Silva
I'm trying to implement two types of login ( email + password and social login ) I'm using the ExtendLogin(auth,LinkedinAcount(),signals=['token']) Just that it show me: form.components.append(self.alt_login_form.login_form()) 'LinkedInAccount' object has no attribute 'login_form' Login meth

[web2py] Autocomplete widget issue on IBM system i DB2

2015-07-29 Thread Maurizio Brilli
Hi everybody. I think I found an issue in the DB2 adapter. This is the scenario: I have a field in a table with the following two attributes: *db.table1.field.requires=IS_EMPTY_OR(IS_IN_DB(db, db.table2.id, '%(description)s, null=None)* *db.table1.field.widget = SQLFORM.widgets.autocomplete(*

[web2py] Re: File upload/download over https freezes site

2015-07-29 Thread admin
Sorry about that, here are those details: Ubuntu server 14.04.01 CPU: Intel Xenon X5660 @ 2.80Ghz (dual core) RAM: 8GB The last file i tested was 50MB (web2py should be able to handle up to 2GB?) Here are the models and controllers: db.define_table('mytable', Field('file','upload')) def

[web2py] favicon.ico

2015-07-29 Thread Александр Остыловский
Hello! I replaced the files favicon.ico and favicon.png on the site and nothing has changed. Why is that? thanks -- 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 Issu

[web2py] How to use the HTML tags in slugs created using CKEditor?

2015-07-29 Thread mishra
Hi, My name's Mishra and I just started using Web2Py. I have some basic knowledge in coding (HTML, PHP, CSS and Python.) I don't usually write on forum as answers for most questions are already somewhere on the net, but I don't figure the solution for this problem despite of my efforts. I kno

Re: [web2py] Re: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
I've updated to version 2.11.2, and the problem still persists. I've deleted all errors, cache, and sessions for both admin app and "myapp" I am getting the following traceback when I look in the admin/errors files: Traceback (most recent call last): File "/home/marladarla7/web2py/ gluon/restr

[web2py] Re: view and edit on same page

2015-07-29 Thread JorgeH
Exactly, Just as Dave S says. ;) On Wednesday, July 29, 2015 at 9:18:10 PM UTC-5, Dave S wrote: > > > > On Wednesday, July 29, 2015 at 4:34:30 PM UTC-7, Alex Glaros wrote: >> >> Hi Jorge, >> >> are there two views? view and new-view (formula _general)? >> > > I would expect a view for the page

[web2py] Re: view and edit on same page

2015-07-29 Thread JorgeH
yes. The first view, lets call it formula. for this example, just a tiny button with a pencil on it It calls the controler called 'formula_general' def formula_general(): fields = ['nombre'] record = session.formula form = SQLFORM(db.formulas, record, fields=fields) requ

[web2py] Will database callbacks be appended each time model is changed?

2015-07-29 Thread Thomas Sitter
Hello, I'm adding an _after_update callback to my table in db.py using: def myfunc(s,f): #do stuff return False db.tt._after_update.append(myfunc) My question is whether this will continuously append this method every time a database table is modified. I'm asking because I had a similar i

[web2py] Re: When will we have a "proper" forum ?

2015-07-29 Thread Dave S
On Wednesday, July 29, 2015 at 10:45:22 AM UTC-7, Anthony wrote: > > Meteor is using Discourse (self-hosted), as > are a number of other open source communities, such as ReactJS, Mozilla, > and ElasticSearch (also used by New Relic and How-To Geek). > > I like it and

[web2py] Re: view and edit on same page

2015-07-29 Thread Dave S
On Wednesday, July 29, 2015 at 4:34:30 PM UTC-7, Alex Glaros wrote: > > Hi Jorge, > > are there two views? view and new-view (formula _general)? > I would expect a view for the page (page.html) and the view for the component (formula_general.load, as listed in the onclick(), and a view for th

[web2py] Re: view and edit on same page

2015-07-29 Thread Alex Glaros
Hi Jorge, are there two views? view and new-view (formula _general)? thanks, 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) --- You received this me

[web2py] Re: File upload/download over https freezes site

2015-07-29 Thread Dave
That would be good to know. Nothing in the web2py docs suggests that Apache should not be used in production, it actually seems more like the default since it is the first discussed in the documentation and it's used in the one-step production deployment. The line of code in question is also

[web2py] OpenLDAP and TLS auth example, please

2015-07-29 Thread backseat
Does anyone have an example of configuring an OpenLDAP TLS connection for authentication? I've tried: auth.settings.login_methods.append(ldap_auth( server='my.ldap.server', base_dn='ou=users,dc=my,dc=ldap,dc=server', secure=True, port=389, )) ...but that fails with "Invalid logi

[web2py] Re: File upload/download over https freezes site

2015-07-29 Thread Niphlod
I dropped off the apache train too soon to have any issues with it, but frankly, given the total sum of issues encountered so far on the forums, I'm starting to think that we'd need to "officially discontinue" our apache support.. may be total lack of luck in setting it up or very biased perspe

Re: [web2py] Re: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Richard Vézina
sorry I miss read... 2.9.10... Why not 2.9.12... Why not install 2.11.2?? Richard On Wed, Jul 29, 2015 at 3:49 PM, Richard Vézina wrote: > Did you update the admin app? > > Also, if I remember there have been many correction over 2.10.x web2py > build... I would avoid the 2.10.x series for th

Re: [web2py] Re: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Richard Vézina
Did you update the admin app? Also, if I remember there have been many correction over 2.10.x web2py build... I would avoid the 2.10.x series for this reason... I remember having testing and having found it not that stable and I stay with 2.9.5... 2.11.2 seems to work great... Richard On Wed, J

[web2py] Re: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Dave S
On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote: > > I am looking at the errors for the admin (at the files), and I am getting > a " name 'DEMO_MODE' is not defined"" error > > That doesn't ring any bells for me, although I'm currently on 2.11.2. I think the step that required

[web2py] Getting a demo_mode not defined error in admin (even though demo_mode defined in 0.py)

2015-07-29 Thread Mark Li
I am getting a very odd error in my admin app (2.9.10) on PythonAnywhere. I am getting the following error: Traceback (most recent call last): File "/home/marladarla7/web2py/gluon/restricted.py", line 224, in restricted exec ccode in environment File "applications/admin/models/0_imports.

[web2py] Re: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
I am looking at the errors for the admin (at the files), and I am getting a " name 'DEMO_MODE' is not defined"" error On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote: > > I've run sessions2trash.py to remove all sessions, as well as remove all > the files from the errors folder.

[web2py] Re: When will we have a "proper" forum ?

2015-07-29 Thread Anthony
> This one is very good as an example. >> https://forums.meteor.com >> A lot easier to learn from something like this... >> >> > Anything specific about that exceites your interest? > For one thing, we would own the data/content. -- Resources: - http://web2py.com - http://web2py.com/book (Docu

[web2py] Re: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
I've run sessions2trash.py to remove all sessions, as well as remove all the files from the errors folder. Unfortunately I'm still getting the error loop. Should I do this for the admin app as well? On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote: > > > > On Wednesday, July 29, 20

[web2py] Re: XML helper mangles svg file with namespace prefixes

2015-07-29 Thread jackson . read
I followed the link given and used lxml package instead of xml and it works. lxml does not add the prefixes that xmk does. The lxml API is a superset of the xml API so I did not have to change the code much. BTW I tried removing the ns0 prefix in the svg as per the suggestion the svg displays

[web2py] Re: When will we have a "proper" forum ?

2015-07-29 Thread Dave S
On Wednesday, July 29, 2015 at 10:46:42 AM UTC-7, Dave S wrote: > > > > On Wednesday, July 29, 2015 at 8:00:00 AM UTC-7, Ramos wrote: >> >> I hate google groups because its not easy to find help so people keep >> asking the same question over and over again. >> > > I expect any system to include

[web2py] Re: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Dave S
On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote: > > I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, > so my live site can match my test site web2py version > > This in turn has caused the admin page to start producing errors, so I am > unable to look a

[web2py] Re: When will we have a "proper" forum ?

2015-07-29 Thread Dave S
On Wednesday, July 29, 2015 at 8:00:00 AM UTC-7, Ramos wrote: > > I hate google groups because its not easy to find help so people keep > asking the same question over and over again. > I expect any system to include people asking the same question over and over again. Many people jump in for

[web2py] Re: When will we have a "proper" forum ?

2015-07-29 Thread Anthony
Meteor is using Discourse (self-hosted), as are a number of other open source communities, such as ReactJS, Mozilla, and ElasticSearch (also used by New Relic and How-To Geek). I like it and even suggested it here

[web2py] Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, so my live site can match my test site web2py version This in turn has caused the admin page to start producing errors, so I am unable to look at error tickets (they will just produce more errors). I'm quite lost as to w

[web2py] plugin for handsontable

2015-07-29 Thread Pablo Angulo
I have packaged a plugin with one possible use of the great library handsontable: http://www.web2pyslices.com/slice/show/2042/handsontable-plugin-for-a-spreadsheet You may comment on the plugin as you want, but I specifically want to ask if you find the following trick acceptable (or improvable):

[web2py] Re: File upload/download over https freezes site

2015-07-29 Thread Dave
Sorry about that, here are those hardware details: Ubuntu server 14.04.01 CPU: Intel Xenon X5660 @ 2.80Ghz (dual core) RAM: 8GB On Wednesday, July 29, 2015 at 10:00:47 AM UTC-6, Dave wrote: > > Actually, it looks like i was chasing the wrong issue... It wasn't https > after all. > > Everything

[web2py] Re: File upload/download over https freezes site

2015-07-29 Thread Dave
Actually, it looks like i was chasing the wrong issue... It wasn't https after all. Everything seems to be working after changing this line in apache default.conf: WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1 to: WSGIDaemonProcess web2py user=www-data group=www

Re: [web2py] When will we have a "proper" forum ?

2015-07-29 Thread Richard Vézina
It seems nice, maybe build with web2py!! :) Richard# On Wed, Jul 29, 2015 at 10:59 AM, António Ramos wrote: > I hate google groups because its not easy to find help so people keep > asking the same question over and over again. > we should follow other ideas as Massimo said > Ideas we had, ide

[web2py] When will we have a "proper" forum ?

2015-07-29 Thread António Ramos
I hate google groups because its not easy to find help so people keep asking the same question over and over again. we should follow other ideas as Massimo said Ideas we had, ideas we... This one is very good as an example. https://forums.meteor.com A lot easier to learn from something like this..

[web2py] Re: How to display uploaded files

2015-07-29 Thread Anthony
web2py renames files uploaded via SQLFORM, so typically the new filenames are stored in the database so they can be associated with some other metadata in order to aid retrieval (possibly including the original filename). You can of course read the list of filenames in any folder in Python via

[web2py] How to display uploaded files

2015-07-29 Thread Selman Kocael
I can get uploaded files if i upload with SQLFORM or SQLFORM.factory via* form.name.filename*. How can get all uploaded file names under 'upload' directory? Is the only way to save the names to db? -- Selman Kocael İsabet Yayınları -- Resources: - http://web2py.com - http://web2py.com/book (D

[web2py] Re: Header name in grid single record view

2015-07-29 Thread Anthony
The grid.view_form is just a SQLFORM with readonly=True, and its "record" attribute is just a Row object, which does not store any field labels. Instead, you can do db.mytable.field_name.label to get the label for each field. Anthony On Wednesday, July 29, 2015 at 9:32:32 AM UTC-4, Gael Princi

[web2py] Header name in grid single record view

2015-07-29 Thread Gael Princivalle
Hello all. Is there a way to retrieve an header name in a grid single record view? I've tried with .header without success. {{if request.args and request.args[-3] == 'view':}} {{=P(grid.view_form.record.field_name.header)}}: {{=P(grid.view_form. record.field_name)}} {{else:}} {{=grid}} {{p

[web2py] Re: sqlite3 locking

2015-07-29 Thread Niphlod
db.py is usually a model, so it gets executed once per request. Enabling WAL is a thing needed just one time only (that "setting" gets stored in the sqlite database file). When you "reopen" the file WAL is already been activated. There is no other activity involved once the database file has bee

[web2py] Re: sqlite3 locking

2015-07-29 Thread jackson . read
thats once per database I assume. Can I put it in db.py to have it executed once? On Friday, July 24, 2015 at 4:52:26 PM UTC-4, jackso...@quantachrome.com wrote: > > The docs say that web2py locks a sqlite3 database file always...even if > just reading. Is there a way to circumvent this so that

[web2py] Re: XML helper mangles svg file with namespace prefixes

2015-07-29 Thread Anthony
The problem is not with the XML helper but with the way you are generating the SVG markup (you must do it without the "ns0" namespace). For tips on how to do it correctly, see http://stackoverflow.com/questions/3895951/create-svg-xml-document-without-ns0-namespace-using-python-elementtree. Alte

[web2py] Re: SQLFORM.widgets.options.widget(f, v, _disabled=True)

2015-07-29 Thread Annet
Hi Anthony, Can't you just do: > > SQLFORM.widgets.options.widget(f, v, _disabled=True, _class='generic_widget > form-control') > > Yes , that solves the issue, thanks. > > The fourth argument to IS_IN_DB is the error message, so a lambda wouldn't > go there. Perhaps you meant for that to be

[web2py] Re: Does web2py support reCAPTCHA v2?

2015-07-29 Thread Niphlod
there's recaptcha "v2" https://github.com/web2py/web2py/blob/master/gluon/tools.py#L971 On Saturday, July 25, 2015 at 10:06:54 PM UTC+2, Chris wrote: > > I recently got an email notifying me that Google is upgrading its captcha > to the new "no CAPTCHA" version. Does web2py support that by defau

[web2py] Re: sqlite3 locking

2015-07-29 Thread Niphlod
to alleviate the issues, recent sqlite builds feature a mode to activate that is called "WAL" , which you can read about at https://www.sqlite.org/wal.html . you can enable it just executing PRAGMA journal_mode=WAL once in the database . if you want to do it in web2py, run this code just once d

[web2py] Re: File upload/download over https freezes site

2015-07-29 Thread Niphlod
uhm, you left out some pretty specific details what resources has the server web2py is deployed on ? moreover, what's the size of the file ? and what code are you using to handle the upload? are you using the default 'upload' Field or is it in conjunction with a 'blob' one to store the file