[web2py] Re: Select rows

2014-12-23 Thread Oliver
I used this to get print def printme(): response.view='list.html' users = db(db.users).select(db.users.first_name,db.users.last_name) return dict(users=users) It's working for me now. thanks On Tuesday, December 23, 2014 1:24:12 AM UTC-5, Dave S wrote: > > > > On Wednesday, Decem

[web2py] Re: reddit clone - foreign key constraint failed

2014-12-23 Thread William Chen
Hi Chris, I had the same problem and found this thread when I was searching for a solution. The solution is to simply create 1 or more comments using app admin. If table B references table A, then you need populate to populate table A before you populate table B, else there will be an error. I

[web2py] Re: Bootstrap icons don't work with latest web2py?

2014-12-23 Thread DJ
I'm having trouble seeing the icons on the admin page - I also downloaded the latest version from the website: 2.9.11-stable+timestamp.2014.09.15.23.35.11 Has it been fixed? Thanks for your help! -Sebastian On Monday, September 22, 2014 11:26:31 AM UT

[web2py] unescaped HTML code in wiki page

2014-12-23 Thread Manuele Pesenti
Hi *, I'm trying to use auth_wiki together with plugin_ckeditor but creating the view as suggested in documentation I can see the HTML code in my page. So it seams the html code is unescaped during rendering of my wiki page. How can avoid this? What I'm missing from the documentation? Thanks a lot

Re: [web2py] Re: SQLFORM.factory with upload field - the operation is insecure

2014-12-23 Thread Cynthia Butler
Thank you, very helpful info to me. On Sunday, December 21, 2014 7:25:46 PM UTC-7, Jim S wrote: > > Yes. The issue was that I had it in a loaded component. That is not > supported and doesn't work. And, I know better, I've ran into this > before and just forgot about that restriction this t

Re: [web2py] Re: Dumb Question/Bug

2014-12-23 Thread Mark Billion
Thanks guys -- that makes a ton of sense. I really appreciate it. On Tue, Dec 23, 2014 at 2:54 PM, Anthony wrote: > More specifically, when you provide the "next" argument to > SQLFORM.process(), it ultimately calls redirect(), which raises an HTTP > exception. If you put the .process() call in

[web2py] Re: Select rows

2014-12-23 Thread Tim Richardson
On Tuesday, 23 December 2014 17:24:12 UTC+11, Dave S wrote: > > > > On Wednesday, December 17, 2014 12:17:53 PM UTC-8, Oliver wrote: >> >> I'm getting "None" printed in the webpage. I'm trying to print all >> first_name in the users table database. I'm trying to follow the select >> section in

[web2py] Re: Daily task on production: scheduler or cron?

2014-12-23 Thread Tim Richardson
I use the scheduler for activities that run daily to some that run every 15 minutes. It doesn't do day-of-the-week yet so you would need to check for that in your daily code. I for example have an app which sends SMS every hour, but the task checks that it is in office hours before doing any wo

[web2py] Re: Dumb Question/Bug

2014-12-23 Thread Anthony
More specifically, when you provide the "next" argument to SQLFORM.process(), it ultimately calls redirect(), which raises an HTTP exception. If you put the .process() call inside a try/except, that HTTP exception will get caught, and in your case, you are then ignoring it. We should probably s

[web2py] Re: Dumb Question/Bug

2014-12-23 Thread Niphlod
are you aware that in web2py any HTTP is a subclass of exception ? Never, never, never use an exception without specifying what exception your code may raise. On Tuesday, December 23, 2014 7:34:45 PM UTC+1, Mark Billion wrote: > > Why are you using an except without specifying the exception? Try

[web2py] Re: Dumb Question/Bug

2014-12-23 Thread Mark Billion
Why are you using an except without specifying the exception? Trying to catch all possible exceptions. On Tuesday, December 23, 2014 1:31:21 PM UTC-5, Leonel Câmara wrote: > > Why are you using an except without specifying the exception? Anyway just > do this: > > @auth.requires_login() > def

[web2py] Re: Dumb Question/Bug

2014-12-23 Thread Leonel Câmara
Why are you using an except without specifying the exception? Anyway just do this: @auth.requires_login() def cli_add(): db.client.au_usr.default = auth.user_id form = SQLFORM(db.client, fields = ['d_fn', 'd_ln', 'd_aka', 'd_ss'], labels = {'d_ss': 'Social Security', 'd_aka': 'Any Aliase

[web2py] Dumb Question/Bug

2014-12-23 Thread Mark Billion
Works Just Fine def cli_add(): try: db.client.au_usr.default = auth.user_id except: redirect(URL('index')) form = SQLFORM(db.client, fields = ['d_fn', 'd_ln', 'd_aka', 'd_ss'], labels = {'d_ss': 'Social Security', 'd_aka': 'Any Aliases', 'd_65': 'Older than 65'}).proc

Re: [web2py] Re: Domain model and web2py DAL

2014-12-23 Thread Alan Evangelista
> It might be easier if you provide a concrete example of what you are > trying to achieve (perhaps using the syntax of an existing ORM or using > pseudo-code) and explain how the DAL falls short. > Using SQLAlchemy as data mapper below. MyItem class (models.myitem): class MyItem(object):

[web2py] Daily task on production: scheduler or cron?

2014-12-23 Thread Lisandro
I've been reading about web2py's cron and sheduler ([1] and [2]) Also, I've read a post where Massimo says "Please use the scheduler, not cron. Cron must die." [3] Now I'm creating a web2py app and I want the user to be able to configure a daily background task. The task consist in sending a new

[web2py] Re: json empty with jquery

2014-12-23 Thread Jacinto Parga
First of all thanks so much for your help, Leonel. I finally got it. I had a concept mistake. I had to declare a variable to get the data of the client wiht the same structure of the data. I used datos = str(request.vars), it is correct because I can retrieve data: {'key':'value ','key2':'value

[web2py] Re: Datetime Grid Filtering ignores localized format and timezone

2014-12-23 Thread Niphlod
nope! the issue is that SQLFORM.build_query can't understand localized dates. On Tuesday, December 23, 2014 8:35:28 AM UTC+1, Paolo Valleri wrote: > > Hi, > the issue is here > https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L1830 > can you try to replace that line with the followi

[web2py] Re: Datetime Grid Filtering ignores localized format and timezone

2014-12-23 Thread mcamel
Hello, Sounded promising, but fails. Changed web2py/gluon/sqlhtml.py with v2.9.11 and with trunk version. Even fails if a use literal translated string as in: iso_format = {'_data-w2p_datetime_format' : '%d/%m/%Y %H:%M:%S'} Code to reproduce: def dt(): from datetime import datetime T.f

[web2py] Re: Lazy options widget

2014-12-23 Thread Leonel Câmara
Hey Gael, It should be auth.settings.expiration instead of auth.expiration. -- 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 bec

[web2py] Re: Computed field not computed at INSERT ?

2014-12-23 Thread Mirek Zvolský
I am sorry, today I have found that this was my mistake. I have string values from SQLFORM - and compute evaluates properly. But I have different FORM for bulk insert of many records, where in form.process().accepted I have integer values: compute in DAL is wrapper into try/except - and it fails

[web2py] Open Redirect Vulnerability and auth.settings

2014-12-23 Thread Prasad Muley
Hi All, We're using web2py_2.9 and There is open redirect vulnerability exist following pages: *1) **Change Profile: * https://127.0.0.1:8000/asdf/default/user/profile?_next=http%3A%2F%2Fgoogle.com *2) Change Password: * https://127.0.0.1:8000/asdf/default/user/change_passwo