[web2py] Re: Field validatio with multiple columns

2015-08-12 Thread Dave S
On Wednesday, August 12, 2015 at 8:17:45 PM UTC-7, JC wrote: > > Hello, > I´ve the following model: > > db.define_table('bsc_input', > Field('id_p_indicator', db.p_indicator, label=T( > 'Indicator'), notnull=True), > Field('current_month', 'integer', label=T('Month

[web2py] Re: error with "list:reference table"

2015-08-12 Thread Michael Beller
The error occurs when I use the render() function, e.g., teachers = db( db.teacher.id>0).select().render(0) The render() function works fine without the list:reference fields but fails with the list:reference fields. On Wednesday, August 12, 2015 at 11:23:44 PM UTC-4, Massimo Di Pierro wrote: >

[web2py] Re: error with "list:reference table"

2015-08-12 Thread Massimo Di Pierro
It is only when printed in CSV that it represents with the |. It is all fine: In [1]: db.define_table( ...: 'school', ...: Field('Name'), ...: format='%(Name)s', ...: migrate=True ...: ) Out[1]: In [2]: In [2]: db.define_table

[web2py] Field validatio with multiple columns

2015-08-12 Thread JC
Hello, I´ve the following model: db.define_table('bsc_input', Field('id_p_indicator', db.p_indicator, label=T('Indicator' ), notnull=True), Field('current_month', 'integer', label=T('Month'), notnull= True), Field('current_year', 'integer', label=T('

[web2py] Re: 2.12.1 is out

2015-08-12 Thread Massimo Di Pierro
Ouch! Will fix it asap. On Wednesday, 12 August 2015 08:46:49 UTC-5, ermolaev.icrea...@gmail.com wrote: > > if session stored in cookies - folders in /sessions folder created anyway > (( > > пятница, 7 августа 2015 г., 19:59:13 UTC+3 пользователь Massimo Di Pierro > написал: >> >> Changelog: >>

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Richard Vézina
When doing this : db.define_table('mystringtest', Field('samplefield', 'string'), Field('mystringtest', 'list:string', requires=IS_IN_SET(['test1', 'test2', 'test3'], multiple=True)), format='%(id)s: %(prompt)s') The value stay selected in the multi

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Richard Vézina
I just fall on this trying to understand web2py list:string code : Also notice that this field gets a default represent attribute which represents the list of references as a comma-separated list of formatted references. This is used in read forms and SQLTABLEs. While list:reference has a defaul

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Richard Vézina
They show in flash in 2.9.11 and 2.9.12... Though the widget doesn't displayed them... Do you see values in the flash message or not? From my understanding of you last message you have them... So, if it the case, I am pretty sure it is a widget issue... This issue seems to be there for a wild, I

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Richard Vézina
If I bring your stuff into a dummy web2py app under web2py 2.9.5, the keeped values appears in the flash message... Though they are not appearing in the widget... I will try it under more recent version... wait On Wed, Aug 12, 2015 at 8:24 PM, Ian W. Scott wrote: > Hi Richard, > > Here's the p

[web2py] Re: web2py return list of uploaded files with original filenames

2015-08-12 Thread Val K
Hi! Here is my solution for upload/download files with originals filename. I hope it help you. 1. Make a *modUle* file (don't confuse with m*O*del ) with name *file_serv.py: * # coding: utf8 # # - file_serv.py --- from gluon import * import os import shutil # --

[web2py] Re: Converting python list into javascript array in views (web2py) ?

2015-08-12 Thread Wabbajack
Thanks Niphlod, var t= {{=XML(response.json(p))}} this way is functional with web2py 2.9.11 but with the latest version your way is the correct way :) Thanks...luckily i stumble on this... On Friday, November 8, 2013 at 3:50:30 AM UTC+8, Niphlod wrote: > nope. > from gluon.serializers impor

[web2py] Multi file upload

2015-08-12 Thread Luis Valladares
Hello! I'm trying to create a form in order to upload multiple files with description for each file, i've something like this: View: {{=T('Archivo')}} {{=T('Descripción')}}

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Ian W. Scott
Sure, I'll post a dummy app here. It'll probably be later tonight or tomorrow. Ian On Wednesday, August 12, 2015 at 2:04:28 PM UTC-4, Richard wrote: > > Hi Ian, > > Can you pack a dummy app with a list:string field an single field form > with SQLFORM.factory so I can try it here and confirm you

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Richard Vézina
Hi Ian, Can you pack a dummy app with a list:string field an single field form with SQLFORM.factory so I can try it here and confirm your issue... Also, can you tell us which web2py version you use. Thanks Richard PS.: Once I confirm I have the issue we should open a ticket on github... # On

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Ian W. Scott
No, they're not submitted if I re-submit the form with the preserved values. Ian On Wednesday, August 12, 2015 at 1:25:01 PM UTC-4, Richard wrote: > > Is the form widget only display the last input but insert the other > values? I mean, it may be possible that values are there but not correctl

[web2py] Re: Ajax callback with current select value

2015-08-12 Thread Val K
Yes! Of course! Because there is a small bug in web2py.js in ajax() (or in the manual) : If middle arg ( '[ ]' ) is string, it's treated as JQuery selector without any processing! So ajax() call must be like: ajax('{{=URL('default','get_options_for_dropdown2')}}', '[name="sel_1"], [name

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Richard Vézina
Is the form widget only display the last input but insert the other values? I mean, it may be possible that values are there but not correctly display by the widget... Richard On Wed, Aug 12, 2015 at 1:21 PM, Ian W. Scott wrote: > Sorry if I'm not explaining this well. The default widget for a

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Ian W. Scott
Sorry if I'm not explaining this well. The default widget for a list:string field is a vertically stacked list of inputs, one per value. There is a little + at right that allows me to add more inputs to the list dynamically. In a SQLFORM, when I set keepvalues=True the values are preserved in

[web2py] IIS 8.5 static file using rewrite problem

2015-08-12 Thread Remco Boerma
Hi, I'm migrating from ubuntu to windows 2012R2 + IIS 8.5. Following a slightly altered recipe from the book to install web2py under IIS (but mostly the same) i've come across a strange error. Since i'm not accustomed to IIS, it can well be my issue is standard IIS-knowledge-gap related. I h

[web2py] Re: Load Balanced Server code updating

2015-08-12 Thread Michael M
That gives me a lot to go on. Thank-you Niphlod. I just got off the vanpool this morning and found out one of my co-workers runs some of our corporate infrastructure. He suggested I look at Puppet, Chef, or Ansible for cluster management. So looks like I have some learning to do. :) Wish

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Richard Vézina
Could you show your model and controller... This make no sens... Richard On Wed, Aug 12, 2015 at 10:45 AM, Ian W. Scott wrote: > I never got any suggestions on this, even though it seems like a > significant limitation of the widget. Has anyone come up with a solution > for keeping all the val

[web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Ian W. Scott
I never got any suggestions on this, even though it seems like a significant limitation of the widget. Has anyone come up with a solution for keeping all the values in a list:string field after form submission? Thanks. On Wednesday, June 25, 2014 at 11:33:26 AM UTC-4, Ian W. Scott wrote: > > I'

[web2py] Re: 2.12.1 is out

2015-08-12 Thread ermolaev . icreator
if session stored in cookies - folders in /sessions folder created anyway (( пятница, 7 августа 2015 г., 19:59:13 UTC+3 пользователь Massimo Di Pierro написал: > > Changelog: > > - security fix: Validate for open redirect everywhere, not just in login() > > - allow to pack invidual apps and selec

[web2py] Re: error with "list:reference table"

2015-08-12 Thread Michael Beller
db.define_table( 'school', Field('Name'), format='%(Name)s', migrate=True ) db.define_table( 'teacher', Field('Name'), Field('schools', 'list:reference school', label='School Villages'), format='%(Name)s', migrate=

[web2py] Re: web2py return list of uploaded files with original filenames

2015-08-12 Thread Vladimiras Lomovas
Hello Anthony, I'll try to do according to the book but unfortunately it won't work. import os user_name = request.vars['user_name'] path_ = "/var/www-data/web2py/applications/app_name/uploads/%s" % user_name db.define_table('media', Field('user_name', 'string', length=30, required=True),

[web2py] Re: Possible bug in 2.12.2 when including a .css file in a HTML email template

2015-08-12 Thread Eric
I've created an issue on GitHub: https://github.com/web2py/web2py/issues/1041 Feels like a better place to report this than here... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues

[web2py] Re: Uploading app to server using ftp

2015-08-12 Thread Joe
Thanks very much Niphlod, shortly after I posted my question it occurred to me that this must be the solution. In any case, thanks very much for your very quick reply with the answer. I appreciate it. On Wednesday, August 12, 2015 at 2:53:10 PM UTC+8, Niphlod wrote: > > if you're uploading the

[web2py] Re: Ajax callback with current select value

2015-08-12 Thread Gael Princivalle
Thanks a lot Val that's certainly the solution, however in the controller the var is always empty. This is the original select code: If I set manually the var in get_options_for_overrides the ajax call works. For debug, if I modify get_options_for_overrides for returning get_options_for_overrid

[web2py] Re: Load Balanced Server code updating

2015-08-12 Thread Niphlod
the update process on several frontend servers can be split into 2 modes: you can have an "incremental" update, in which the newer version of the application doesn't break the old one, and the "breaking" update, in which the newer version of the application breaks the old one. in the first case