[web2py] Re: Disabled fields in SQLFORM fail validation?

2015-03-04 Thread 黄祥
perhaps you can add the field for counter and increase whenever the table is edit (onupdate), and then using conditional if to check if counter > 1 then field.writable = False best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/we

[web2py] Re: web2py nginx ubuntu 14.04

2015-03-04 Thread 黄祥
did you had any chance check the logs? please take a look at the log it'll tells you more detail what's going on happen in the background server process. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source co

[web2py] web2py nginx ubuntu 14.04

2015-03-04 Thread T.R.Rajkumar
I ran the setup-web2py-nginx-uwsgi-ubuntu.sh in a ubuntu 14.04 machine. The script ran and webpy, uwsgi, nginx are all running. I am not able to browse the sites. The error the server is taking too long to respond appears in firefox. I am able to ping the server. Pl. help. Also I want to have p

[web2py] Re: SQLFORM.factory adding dynamic form

2015-03-04 Thread 黄祥
perhaps you can create an address table and use list:reference in sqlform.factory e.g. (not tested) db.define_table('address', Field('address') ) def form_from_factory(): form = SQLFORM.factory( Field('address', *'list:reference', requires = IS_IN_DB(db, db.address.id, '%(address)s'

[web2py] confirmation on sqlform.grid (add and edit)

2015-03-04 Thread 黄祥
hi, is it possible to have confirmation on sqlform.grid (add and edit)? so when user click submit during add or edit using grid it will appear the confirmation. the grid signature seems don't have it. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

[web2py] Re: how to define field so that it only pulls from auth_user those who have a certain auth_membership?

2015-03-04 Thread 黄祥
perhaps you can achieve it with query on IS_IN_DB validator: e.g. query_sessions = ( (db.auth_user.id == db.auth_membership.user_id) & (db.auth_membership.group_id == db.auth_group.id) & (db.auth_group.role.like('coach')) ) db.sessions.coach.requires = IS_IN_DB(db(query_sessions), db.auth_user.id,

[web2py] how to define field so that it only pulls from auth_user those who have a certain auth_membership?

2015-03-04 Thread Oliver Holloway
All players' and coaches' names are stored in auth_user, with roles (Player, Coach) listed in auth_group and assigned in auth_membership. How do I define the field "coach" below so that it will allow only those who have the Coach role? Here's the table definition. db.define_table('sessions',

[web2py] Re: Bootstrap is really killing web2py

2015-03-04 Thread Leonel Câmara
You need to name the app too, just giving it the upload file is not enough. -- 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: Web2py ckEditor

2015-03-04 Thread Alex Glaros
hi Tim how do I install ck_editor? assume I don't know what directory to use or anything else 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)

Re: [web2py] dbio=False proper way to update every fields not only the one that had changed

2015-03-04 Thread Anthony
The update should calculate the computed field as long as all the values needed for the calculation are included with the update. Anthony On Wednesday, March 4, 2015 at 4:55:01 PM UTC-5, Richard wrote: > > Thanks for answering Anthony, > > Actually f1 and f2 belongs to the table, I am filtering

Re: [web2py] dbio=False proper way to update every fields not only the one that had changed

2015-03-04 Thread Richard Vézina
Thanks for answering Anthony, Actually f1 and f2 belongs to the table, I am filtering them because I want to treat them separately... About your question, I am investigating why my compute didn't work... My first impression is that it is not include in form.vars so it not get hit at all... But I

Re: [web2py] dbio=False proper way to update every fields not only the one that had changed

2015-03-04 Thread Anthony
Does form.vars include all the variables needed by the compute function? Also, instead of: **{f: v for f, v in form.vars.iteritems()} you can do: **db[request.args(0)]._filter_fields(form.vars) _filter_fields will filter out the "id" field as well as any form.vars that are not fields in the t

[web2py] Re: Disabled fields in SQLFORM fail validation?

2015-03-04 Thread Anthony
Hard to say without seeing any code. On Wednesday, March 4, 2015 at 2:59:27 PM UTC-5, lillian wrote: > > > No suggestions or insight into this? Anyone? > > On Saturday, February 28, 2015 at 5:07:03 AM UTC-8, lillian wrote: >> >> Hello, >> >> I have a SQLFORM.factory-created form with several fiel

[web2py] dbio=False proper way to update every fields not only the one that had changed

2015-03-04 Thread Richard
Hello, I need to do control record update in order to clear some fields values in case a flag is set to false. But doing the update like this : db(db[request.args(0)].id == request.args(1)).update(**{f: v for f, v in form.vars.iteritems()}) prevent a compute field to be trigger and updating p

Re: [web2py] Re: IMPORTANT - WEB2PY CONSULTING

2015-03-04 Thread Manuele Pesenti
Il 04/03/15 17:40, Chris ha scritto: > I do web2py consulting work on the side but I'm an individual. Can I > include just an email address, and not a webpage? me too... in Italy. M. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] SQLFORM.factory adding dynamic form

2015-03-04 Thread Ramkrishan Bhatt
Hi Everyone, SQLFORM.factory can we create dynamic form for one to many relation. Like person can have multiple address. So how can we achieve with composit form with SQLFORM.factory with multiple tables. Please send me example too. Like I can add many address form than bulk record insertion.

[web2py] Re: admin pointing to wrong static css in rendered page.

2015-03-04 Thread Massimo Di Pierro
No you do not get rid of that. That is very important and a web2py feature called "static asset management": http://web2py.com/books/default/chapter/29/04/the-core#Static-asset-management You just need the proper web server rule. What server do you use? On Wednesday, 4 March 2015 13:59:27 UTC-6

[web2py] Re: Resizable SQLFORM grid columns?

2015-03-04 Thread LoveWeb2py
Although I do like the layout of jqgrid I'm also using custom buttons in the sqlform.grid and have links going back to database versioning. I will give jqgrid a shot, but I'd love to hear other thoughts/ideas. On Wednesday, March 4, 2015 at 9:00:52 AM UTC-5, LoveWeb2py wrote: > > Very nice slic

[web2py] Re: web2py static files and bootstrap 3

2015-03-04 Thread Massimo Di Pierro
speaking for bootstrap2 > > bootstrap.min.css - which needs to be replaced with the new one [REQUIRED] > bootstrap-responsive.min.css - no idea what this is... [OPTIONAL] > calendar - I assume this is used for Fields that are datetime, does it > require bootstrap2? [NEEDED BUT NOT BASED ON BOOTST

[web2py] Re: admin pointing to wrong static css in rendered page.

2015-03-04 Thread Niphlod
please point to the script used: it probably comes from an old setup. You'll find numerous occurrences of the same "problem" here and there on the forum. What needs to be changed is the "thing" that serves static files, taking into consideration static asset management

[web2py] Re: Creating custom auth

2015-03-04 Thread Massimo Di Pierro
what is token_auth? On Wednesday, 4 March 2015 13:59:27 UTC-6, Franky Davis Monroe Jr. wrote: > > I have added the following to a controller method: > > @auth.requires_login() > def index(): > return 'Hello world!' > > > This forces the app to take the user to the login page correctly. > > >

[web2py] Re: Creating custom auth

2015-03-04 Thread Massimo Di Pierro
what is token_auth? On Wednesday, 4 March 2015 13:59:27 UTC-6, Franky Davis Monroe Jr. wrote: > > I have added the following to a controller method: > > @auth.requires_login() > def index(): > return 'Hello world!' > > > This forces the app to take the user to the login page correctly. > > >

[web2py] Re: Bootstrap is really killing web2py

2015-03-04 Thread Niphlod
On Wednesday, March 4, 2015 at 8:59:28 PM UTC+1, Guilherme Rosa wrote: > > I am running the latest version of web2py and for some reason it will not > let me load the w2p file in the admin interface under "upload and instal > packed application". > > Anyone having this same issue? > does it sa

[web2py] Re: web2py static files and bootstrap 3

2015-03-04 Thread Simon Marshall
i would also like to know this please -- 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 G

[web2py] admin pointing to wrong static css in rendered page.

2015-03-04 Thread John McMaster
Just installed web2py on webfaction. Used one of the scripts on the webfaction community site. The domain is working. When I try to access the admin/default/index the css is clearly not being used. After using the Inspect Element to see what went wrong you can clearly see that the admin index.h

Re: [web2py] Re: Weird Error Message From Web2py - OSError: [Errno 24] Too many open files ???????

2015-03-04 Thread Massimo Di Pierro
yes. On Wednesday, 4 March 2015 07:30:09 UTC-6, Paolo Valleri wrote: > > Massimo, I suggest adding a message when web2py start using internal cron > in which is stated that cron is no longer supported. > Do you agree ? > > On Tuesday, March 3, 2015 at 5:51:50 PM UTC+1, Massimo Di Pierro wrote: >>

Re: [web2py] Re: [solved] Weird 'Row' object has no attribute 'id' and Ñ error

2015-03-04 Thread Tom Stratton
Oddly, neither of those terms come up when you search the book online ;-) I'm glad to have this forum to find the hidden gotchas! Tom On Tuesday, March 3, 2015 at 9:13:45 AM UTC-8, mcm wrote: > > You can use rname or entity quoting to support all of the names your > chosen db engines support.

Re: [web2py] web2py static files and bootstrap 3

2015-03-04 Thread Guilherme Rosa
I have seen it, yes. Thanks Richard. Unfortunatly when I tried to upload this into the admin interface as either a a packed application or as a layout template it fails Even if I could get that w2p file to work, I'd really like to know which css and js are extra and which are must have. O

[web2py] Re: Bootstrap is really killing web2py

2015-03-04 Thread Guilherme Rosa
I am running the latest version of web2py and for some reason it will not let me load the w2p file in the admin interface under "upload and instal packed application". Anyone having this same issue? On Monday, 21 July 2014 03:39:56 UTC-5, Massimo Di Pierro wrote: > > Here is welcome optimized f

[web2py] How to properly import Active Directory users into web2py auth_user table?

2015-03-04 Thread Grzegorz Dzień
I have tried doing it this way: def showthemall(): # LDAP connection settings LDAP_SERVER = "ldap://ad.superhost"; BIND_DN = "superuser@ad.superhost" BIND_PASS = "mysupersecretpassword" # Connect to LDAP con = ldap.initialize(LDAP_SERVER) # Authenticate in LDAP con.

[web2py] sqlform.grid populated with an AJAX call, grid search doesn't work correctly

2015-03-04 Thread drmbded
I have a relatively simple page which has a drop down selection and an empty DIV. When a user selects an item from the drop down an ajax call back to web2py creates an sqlform.grid with a left join query and populates the empty DIV with the grid. This works great. Now if I use the search capabi

[web2py] Creating custom auth

2015-03-04 Thread Franky Davis Monroe Jr.
I have added the following to a controller method: @auth.requires_login() def index(): return 'Hello world!' This forces the app to take the user to the login page correctly. I have then added a simple class: def querystring_auth(): """ Querystring based auth """ def

[web2py] Re: Disabled fields in SQLFORM fail validation?

2015-03-04 Thread lillian
No suggestions or insight into this? Anyone? On Saturday, February 28, 2015 at 5:07:03 AM UTC-8, lillian wrote: > > Hello, > > I have a SQLFORM.factory-created form with several fields but one in > particular that can only be filled out ONCE. If the form is edited that > particular field is d

[web2py] Re: nssm and web2py as a windows service

2015-03-04 Thread Niphlod
^_^ . Glad it worked out fine. @tim: maybe a PR on the book with this cmdline instead of the one posted there c:\web2py.py -p 8041 -i "0.0.0.0" --password="112233" --folder= "d:\web2py_internet" --socket-timeout=10 --timeout=120 -c "d:\web2py_internet\applications\example.com.au.crt" -k "d:\we

[web2py] Re: nssm and web2py as a windows service

2015-03-04 Thread Rod Watkins
Thanks Niphlod. i had a silly typo i kept missing. Got it working great. rod On Tuesday, March 3, 2015 at 3:46:50 PM UTC-8, Tim Richardson wrote: > > > > On Wednesday, March 4, 2015 at 6:43:03 AM UTC+11, Niphlod wrote: >> >> nssm isn't rocket science, from the web2py perspective. >> The point usu

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2015-03-04 Thread Chris
I do web2py consulting work on the side but I'm an individual. Can I include just an email address, and not a webpage? (web...@adventurecow.com, US) On Sunday, February 15, 2015 at 5:21:36 PM UTC-5, Massimo Di Pierro wrote: > > We need to update the list of companies that provide web2py consulti

[web2py] Re: Can somebody please spot my mistake--------Trying to use CKeditor with web2py

2015-03-04 Thread niki
hi Leonel, It worked like a charm. Thank you so much. Sorry for the late response was swamped to even test your suggestion till now. Regards, Sinini On Tuesday, 3 March 2015 22:51:07 UTC+2, Leonel Câmara wrote: > > Hey, > > Can you try this slice instead > http://www.web2pyslices.com/slice/sho

Re: [web2py] Re: Upload field default value ?!!

2015-03-04 Thread António Ramos
You are right I wrote before checking again. Last time i checked, after removing the "required", the record could not be saved. Then checked the sqlite db via firefox plugin and still the required was set at the sqlite db. So far so good more on this later if problems. Thank u 2015-03-04 1

[web2py] Re: Upload field default value ?!!

2015-03-04 Thread Leonel Câmara
Humm required is set at the DAL level I don't see how this could create problems due to sqlite. -- 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 recei

[web2py] Re: Resizable SQLFORM grid columns?

2015-03-04 Thread LoveWeb2py
Very nice slice! I'm going to give it a try. Wasn't sure if there was a builtin already with web2py. I'd like to see something integrated with web2py in the future. Maybe I'll write a widget to add to the SQLFORM which could integrated jqgrid. On Wednesday, March 4, 2015 at 8:36:00 AM UTC-5, W

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2015-03-04 Thread rochacbruno
Hi Massimo, You can remove my old (extinct) company - Blouweb Consultoria Digital (Brasil) I am not working with this company anymore, and I also do not have the domain. Thanks! On Sunday, February 15, 2015 at 8:21:36 PM UTC-2, Massimo Di Pierro wrote: > > We

[web2py] Upload field default value ?!!

2015-03-04 Thread António Ramos
Hello i have an app that was designed with some required upload fields. Now after 1 year and around 5gb in my download folder, someone tells me that the upload fields are not required anymore under some scenarios. I cannot delete the required value from my dal because the sqlite does not let it.

[web2py] Re: Resizable SQLFORM grid columns?

2015-03-04 Thread Willoughby
I'd move over to jqgrid for something like that. But I've been using it for 5+ years, so I'm a bit biased. I think Tim's update is the latest. Take a look: http://www.web2pyslices.com/slice/show/1714/jqgrid-viewing-and-updating-data On Wednesday, March 4, 2015 at 8:29:45 AM UTC-5, LoveWeb2py wr

[web2py] Resizable SQLFORM grid columns?

2015-03-04 Thread LoveWeb2py
Has anyone tried to tackle this before? I'd like to be able to resize the SQLFORM.grid columns so the user could expand or contract the column similar to excel. I'm guessing I'll have to use jquery for this? If anyone could point me in the right direction to get started I'd really appreciate

Re: [web2py] Re: Weird Error Message From Web2py - OSError: [Errno 24] Too many open files ???????

2015-03-04 Thread Paolo Valleri
Massimo, I suggest adding a message when web2py start using internal cron in which is stated that cron is no longer supported. Do you agree ? On Tuesday, March 3, 2015 at 5:51:50 PM UTC+1, Massimo Di Pierro wrote: > > BTW. We do not support cron anymore since we have the scheduler. Cron > causes

[web2py] Re: Current status of adapting OrientDB for web2py

2015-03-04 Thread Paolo Valleri
Hi, contributions are more than welcome :) You can start by having a look at those other no-sql adapters in https://github.com/web2py/pydal/tree/master/pydal/adapters Paolo On Wednesday, March 4, 2015 at 4:27:16 AM UTC+1, Pumplerod wrote: > > I'm curious if anyone has done any more to integrate