Re: [web2py] Re: form error with list field when using openpyxl

2016-01-06 Thread aetagothno
I tried that, and although it allows the form to submit without any tickets.. it appears that it messes up something in openpyxl because it does not upload a file On Wednesday, January 6, 2016 at 3:56:06 PM UTC-5, Richard wrote: > > What about : > > if row.n1.split(',') == 'Yes': > > Richard > >

[web2py] Re: SQLFORM security question

2016-01-06 Thread Joe
Thanks very much Massimo, I appreciate your reply. On Tuesday, January 5, 2016 at 9:00:03 PM UTC+8, Massimo Di Pierro wrote: > > form = SQLFORM(db.table) prevents again CSRF but does not limit access. > For that you need to decorate the page with @auth.requires_login() etc. > > Once SQLFORM stor

[web2py] Re: websocket messaging

2016-01-06 Thread Ron Chatterjee
Take back the post. This seems to works fine for me. https://github.com/rpedroso/w2pchat On Wednesday, January 6, 2016 at 1:34:02 PM UTC-5, Ron Chatterjee wrote: > > Any example of chatting application someone can share? > -- Resources: - http://web2py.com - http://web2py.com/book (Document

[web2py] geometry field /postgis/srid conversion

2016-01-06 Thread Pierre
Hi all, here is the table def: db.define_table('geom', Field('loc','geometry()')) I gave up on this : I need to convert a Point(longitude,latitude) from srid 4326 to srid 2154 before insertion into the geometry field (or keep 2 versions of the same point one in each spatia

Re: [web2py] Re: form error with list field when using openpyxl

2016-01-06 Thread Richard Vézina
What about : if row.n1.split(',') == 'Yes': Richard On Wed, Jan 6, 2016 at 2:48 PM, wrote: > Okay, I got it to work with this: > > > wb = load_workbook(filename= os.path.join(request.folder, 'static', > 'survey.xlsx')) > cells = wb['Sheet1'] > if row.n1 ==* [*'Yes'*]*: > ce

[web2py] Re: form error with list field when using openpyxl

2016-01-06 Thread aetagothno
Okay, I got it to work with this: wb = load_workbook(filename= os.path.join(request.folder, 'static', 'survey.xlsx')) cells = wb['Sheet1'] if row.n1 ==* [*'Yes'*]*: cells['I8'] = 'Yes' else: cells['I8'] = 'No' Just needed the brackets because it is from a list..

[web2py] Re: form error with list field when using openpyxl

2016-01-06 Thread aetagothno
I tried doing: ... wb = load_workbook(filename= os.path.join(request.folder, 'static', 'survey.xlsx')) cells = wb['Sheet1'] if row.n1 == 'Yes': cells['I8'] = 'Yes' else: cells['I8'] = 'No' Doing this allows me to submit the form without error..but when I open the

[web2py] form error with list field when using openpyxl

2016-01-06 Thread aetagothno
I am sure this is a problem with openpyxl and not web2py, although I do not understand exactly why it is happening. Is there a way around it or to fix it? When I submit the form the error is: * Cannot convert['Yes'] to Excel* Here is the code: q = ('Yes', 'No') def surv_excel(row): fro

[web2py] websocket messaging

2016-01-06 Thread Ron Chatterjee
Any example of chatting application someone can share? -- 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 subscribe

Re: [web2py] Re: Auth extra fields

2016-01-06 Thread Anthony
On Wednesday, January 6, 2016 at 12:42:56 PM UTC-5, Mathieu Clabaut wrote: > > Be careful that when you update extra fields, it is your responsibility to > update auth.user and session.auth.user accordingly... > Note just "extra" fields, but any fields in db.auth_user. Anthony -- Resources: -

Re: [web2py] Re: Auth extra fields

2016-01-06 Thread Mathieu Clabaut
Be careful that when you update extra fields, it is your responsibility to update auth.user and session.auth.user accordingly... Le mer. 6 janv. 2016 03:42, Anthony a écrit : > I assume you want auth.user.store. > > > Anthony > > > On Tuesday, January 5, 2016 at 5:24:19 PM UTC-5, greenpoise wrot

[web2py] Re: Problems validating SQLFORMs w/o DB IO

2016-01-06 Thread Anthony
Could be a bug. When you set unique=True, you get a default IS_NOT_IN_DB validator. For some reason, when that validator is called, it is throwing an exception. Please open a Github issue. Anthony On Wednesday, January 6, 2016 at 11:58:04 AM UTC-5, Scott Hunter wrote: > > I've solved 1/2 of the

[web2py] Re: GRID selectable inside component

2016-01-06 Thread Anthony
O > The issue isn't simply whether there have been changes in the file but >> whether there have been changes in the file that are directly linked to >> changes in the core framework. web2py.js includes code that depends on >> particular HTML classes and data-* attributes generated by web2py HT

[web2py] ITSM

2016-01-06 Thread Alex Glaros
Has anyone written an ITIL ( ITSM) system in web2py that I could look at? thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.c

[web2py] Re: GRID selectable inside component

2016-01-06 Thread Krzysztof Socha
On Wednesday, January 6, 2016 at 5:30:25 PM UTC+1, Anthony wrote: > > >> I guess, this is more-less what I need to do, but this is not perfect, as >> I have several applications that I maintain and updating all of them >> manually is not great. Also - is this the only file that should be update

[web2py] Re: Problems validating SQLFORMs w/o DB IO

2016-01-06 Thread Scott Hunter
I've solved 1/2 of the problem: as per the documentation, `required` only applies to DB access; instead, I needed to supply appropriate validators via the `requires` parameter. That still leaves the exception; I can understand it being an odd situation (validation against the DB when no DB IO i

[web2py] Re: Simple left sidebar example

2016-01-06 Thread Ron Chatterjee
Just pitching in so I understand. Isn't it: {{block right_sidebar}} {{=T("admin")}} {{=T("Don't know what to do?")}} {{=A(T("Online examples"), _href=URL('examples','default','index'))}} http://web2py.com";>web2py.com http://web2py.com/book";>{{=T('D

[web2py] Re: GRID selectable inside component

2016-01-06 Thread Anthony
> > I guess, this is more-less what I need to do, but this is not perfect, as > I have several applications that I maintain and updating all of them > manually is not great. Also - is this the only file that should be updated > in this way? I am not sure... What about web2py_ajax.html? appadmi

[web2py] Re: import a database into web2py

2016-01-06 Thread Ron Chatterjee
Not sure if those scripts you are referring to Anthony works. I had some issues with them earlier On Wednesday, January 6, 2016 at 7:46:05 AM UTC-5, Anthony wrote: > > web2py comes with scripts to do this for MySQL, Postgres, Oracle, and > SQLite. See the scripts that start with "extract_" in >

[web2py] Re: web2py version reported in the admin interface does not match the git tag?

2016-01-06 Thread Massimo Di Pierro
oops. Something is broken in the build process. I will fix for the future. sorry. On Tuesday, 5 January 2016 10:52:19 UTC-6, Krzysztof Socha wrote: > > I have been playing with git repo for web2py, and I find it very useful. > Especially the tags - you can easily move from the current master (tr

[web2py] Re: GRID selectable inside component

2016-01-06 Thread Krzysztof Socha
On Wednesday, January 6, 2016 at 1:58:19 PM UTC+1, Anthony wrote: > > > Well, any time you upgrade the framework, you should always upgrade > web2py.js (no need to check whether it has changed -- just do it). > > I guess, this is more-less what I need to do, but this is not perfect, as I have s

[web2py] Re: GRID selectable inside component

2016-01-06 Thread Anthony
On Monday, January 4, 2016 at 6:20:42 PM UTC-5, Krzysztof Socha wrote: > > Ok. I think I got it... I started developing my application long time ago > based on a welcome app. I have updated web2py regularly, but I have not > updated original welcome application files that are specific to web2py,

[web2py] Re: generic.html issue

2016-01-06 Thread Anthony
Generic views are disabled by default. The welcome app includes the following in db.py: response.generic_patterns = ['*'] if request.is_local else [] That activates the generic views for local requests only. If a generic view is being executed for a non-local request, it would only be because y

[web2py] Re: import a database into web2py

2016-01-06 Thread Anthony
web2py comes with scripts to do this for MySQL, Postgres, Oracle, and SQLite. See the scripts that start with "extract_" in https://github.com/web2py/web2py/tree/master/scripts. Anthony On Tuesday, January 5, 2016 at 10:09:07 PM UTC-5, Nir Haramati wrote: > > Can I import an already designed da

[web2py] Re: View To Controller, HTML componets

2016-01-06 Thread Anthony
Just to be clear regarding terminology, data do not pass from the view to the controller. Rather, the controller passes data to the view, which is then executed to generate HTML, which is sent to the browser. If there is a form on the page, when the user submits the form, the form data are sent

Re: [web2py] how to get old version

2016-01-06 Thread Anthony
On Tuesday, January 5, 2016 at 10:09:21 PM UTC-5, Carlos Correia wrote: > > Hi, > > To get an old version you can clone the git repo (git clone --recursive > https://github.com/web2py/web2py.git) and then checkout the appropriated > version > (git checkout tags/R-2.7.2, to get version 2.7.2). >

[web2py] generic.html issue

2016-01-06 Thread Annet
In one of my controllers I send a mail. The mail has its own view. usermessage = response.render('mail/send/username.html', usercontext) usermail = mail.send(to=[recipient], subject='Your username', message=[None, usermessage]) I put this view in a subfolder and forgot to adjust the controller

[web2py] Re: View To Controller, HTML componets

2016-01-06 Thread 黄祥
perhaps this link can help you : http://web2py.com/books/default/chapter/29/05/the-views#INPUT http://web2py.com/books/default/chapter/29/07/forms-and-validators#FORM best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: import a database into web2py

2016-01-06 Thread 黄祥
there is a script included in the web2py package in folder scripts (extract_db_models.py) db is refer to mysql, oracle, pgsql, sqlite. doesn't know if the adrien python script is same or not like the included one. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: import a database into web2py

2016-01-06 Thread Adrien
Hi, I don't know if web2py can do that but i have a python script which create the define_table statements. You have to execute with the terminal and python (on windows : python yourscript.py). And for the primary key in the table, you have to modify the type (put id instead of int). #!/usr/bi