[web2py] Re: Part 3 of a previous conversation on empty field display after update

2022-10-20 Thread Gaurav Vichare
Use *notnul=True* in Field constructor. http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor On Saturday, April 2, 2022 at 11:59:19 AM UTC+5:30 rjwh...@gmail.com wrote: > (The following appends 2 previous posts that are still under review:) > > So her

[web2py] Re: customizing field's visibility in user's profile

2022-06-09 Thread Gaurav Vichare
In controllers/default.py, inside *user* function set *readable* and *writable* to *False* for the fields that you want to hide. def user(): *db.auth_user.field_name.readable = False db.auth_user.field_name.writable = False* return dict(form=auth()) On Wednesday, June 8, 2022 at 2:0

[web2py] Recommended python version for web2py-2.22.5(latest)

2022-06-09 Thread Gaurav Vichare
I am upgrading web2py 2.14.6 running on python 2.7 to latest web2py 2.22.5. May I know which python 3 version should i go with? Can I use python 3.10? Thank You - Gaurav -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Logout all active sessions when user resets password

2021-08-18 Thread Gaurav Vichare
How I can logout user's all active sessions when user resets his password? Suppose user is logged in on firefox and chrome. And he resets his password from chrome, then I want firefox session to expire. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.co

[web2py] validator IS_URL() throws error for google group URLs

2017-03-29 Thread Gaurav Vichare
I am using IS_URL() validator to validate URLs, but it doesn't accepts following url and similar google group urls Example: https://groups.google.com/forum/#!searchin/web2py/url$20validation$20problem|sort:relevance/web2py/69KmsrYAF44/Sgk_hA_6TlcJ Should I create custom URL validato with simple

[web2py] Re: 2 email configurations

2017-02-16 Thread Gaurav Vichare
Yes , you can. from gluon.tools import Mail other_mail = Mail() other_mail.settings.server = 'smtp.example.com:25' other_mail.settings.sender = 'u...@example.com' other_mail.settings.login = 'username:password' And for sending emails other_mail.send('y...@example.com','Message subject',

Re: [web2py] data from controller to javascript

2017-01-25 Thread Gaurav Vichare
Or you can use ASSIGNJS helper {{=ASSIGNJS(js_array = python_list)}} http://gauravvichare.com/how-to-assign-python-variable-to-javascript-variable-in-web2py/ On Tuesday, January 24, 2017 at 9:22:08 PM UTC+5:30, Anthony wrote: > > On Tuesday, January 24, 2017 at 7:43:24 AM UTC-5, Ramos wrote: >>

[web2py] Store dates in UTC format across all tables

2017-01-21 Thread Gaurav Vichare
sk is to show record creation date/time according to user's timezone. Thank You - Gaurav Vichare -- 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) --- Yo

[web2py] Re: Display URL from Component LOAD

2017-01-18 Thread Gaurav Vichare
> > Can you use the referrer header from the request? On my LOAD() example, > FF inspect-element/network shows the parent page as the referrer. I have used request.env.http_referer to find link of parent page in load controller function, I don't know whether it's correct or not. On Thursday,

[web2py] Re: how to add "checked" to an input helper ?

2017-01-16 Thread Gaurav Vichare
ox", _id='delete', _checked="checked") else: =INPUT(_name='delete', _type="checkbox", _id='delete') pass }} Read here about checked attribute value - http://stackoverflow.com/a/7852002/4065350 Thank You - Gaurav Vichare On Mo

[web2py] Re: Issue with web2py load component

2017-01-16 Thread Gaurav Vichare
27;index', 'user', 'download', 'call', 'test_load.load'] > ) > ) > > > Anthony > > On Saturday, January 14, 2017 at 11:49:37 PM UTC-5, Gaurav Vichare wrote: >> >> Page for login to administrative interface

[web2py] Re: Issue with web2py load component

2017-01-14 Thread Gaurav Vichare
l=en-GB>. ERR_TOO_MANY_REDIRECTS1 Clearing cookies doesn't work. And on firefox, I am redirected to same admin login page. Thank You On Sunday, January 15, 2017 at 1:31:39 AM UTC+5:30, Anthony wrote: > > On Saturday, January 14, 2017 at 12:43:43 PM UTC-5, Gaurav Vichare wrote: >> >>

[web2py] Re: Issue with web2py load component

2017-01-14 Thread Gaurav Vichare
', 'myfunc.load', 'myfunc.json', > 'myfunc.xml'] > > I made a pull request to fix this: > https://github.com/web2py/web2py/pull/1558 > > Anthony > > On Friday, January 13, 2017 at 10:51:03 AM UTC-5, Gaurav Vichare wrote: >> >> I

[web2py] Re: Issue with web2py load component

2017-01-13 Thread Gaurav Vichare
27;test_load.load' > ] > > More, generally, if you plan to call a given function with multiple > extensions (and possibly no extension), you must include all possibilities: > > functions = ['myfunc', 'myfunc.load', 'myfunc.json', > 

[web2py] Re: Issue with web2py load component

2017-01-13 Thread Gaurav Vichare
There is no {{extend 'index.html'}} in test_load.load. I faced similar issue once, when I added {{extend 'layout.html'}} inside load view. But this time, I have {{extend 'layout.html'}} only in index.html Thanks for the reply! On Friday, January 13, 2017 at 6:54:53 PM UTC+5:30, Leonel Câmar

Re: [web2py] add_button to go to the previous page

2017-01-12 Thread Gaurav Vichare
request.env.http_referer contains link to the referrer page, i. e. previous page! On Thursday, January 12, 2017 at 7:55:26 PM UTC+5:30, Andrea Fae' wrote: > > I don't know what is the previous page because this page can come from > different pages...this is the problem...I want to reference the

[web2py] Issue with web2py load component

2017-01-12 Thread Gaurav Vichare
I have LOAD component in my application. I made changes in web2py/routes.py file and made my application default application, 'default' controller and 'index' function as defaults. Also added function list of default.py controller in routes.py to distinguish between args and function name(https

[web2py] Re: SQLFORM doesn't work when browser cookies are disabled

2016-12-30 Thread Gaurav Vichare
wrote: > > On Friday, December 30, 2016 at 10:50:12 AM UTC-5, Gaurav Vichare wrote: >> >> Thanks Anthony for reply! I used session=None because SQLFORM was not >> working on disabling browser cookies. >> >> Why can't you use cookies? >> >> Curre

[web2py] Re: SQLFORM doesn't work when browser cookies are disabled

2016-12-30 Thread Gaurav Vichare
I disabled my browser cookies from browser settings, then I am not able to submit form successfully. So how can I make my web2py application(/SQLFORM) to work for users who disable their browser cookies? SQLFORM will not work if browser cookies are disabled? Thank You - Gaurav Vichare

[web2py] SQLFORM doesn't work when browser cookies are disabled

2016-12-30 Thread Gaurav Vichare
elif form.errors: response.flash = "form has errors" return dict(form=form) {{extend "layout.html"}} {{=form}} Thank You - Gaurav Vichare -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: substantial increase in page load time after upgrade to web2py 2.14.6 (only for grid pages)

2016-12-11 Thread Gaurav Vichare
xhibits the same slowdown (maybe add some > code using gluon.contrib.populate > <http://web2py.com/books/default/chapter/29/14/other-recipes#Populating-database-with-dummy-data> > > to generate some dummy data so we can run it with a similar amount of data)? > > On Friday,

[web2py] substantial increase in page load time after upgrade to web2py 2.14.6 (only for grid pages)

2016-12-09 Thread Gaurav Vichare
I did following steps to upgrade: 1. From admin panel, I cleaned, caches, sessions and errors using "clean". (also cleaned my browser cache and cookies) 2. Then created w2p package using "pack all" 3. Downloaded latest web2py 2.14.6 from http://web2py.com/init/default/download 4. Then installed

[web2py] keyerror in update SQLFORM

2016-11-21 Thread Gaurav Vichare
Posting it again because my last post(7 days old) was not approved. I am facing issue while updating record using SQLFORM when readable and writable is False for id field and record_versioning is on. I am explaining this issue with example app 'mywiki' given in web2py book

[web2py] Re: Encrypt uploaded files

2015-06-21 Thread Gaurav Vichare
openssl command is available on production server. I also tried Pycrypto for encryption/decryption. Implementation of encryption/decryption function can be anything, that's not my issue. I want suggestions on general approach/ flow , 'how to store file in encrypted format and decrypt while dow

[web2py] Encrypt uploaded files

2015-06-18 Thread Gaurav Vichare
I want to store uploaded files in encrypted format. I want encrypt all kind of files(PDF, jpg, docx, etc) . And while downloading it should download decrypted file. Currently I am using "openssl unix command ( openssl enc -aes-256-cbc -salt -in input_file -out output_file -k key) to decrypt file

[web2py] Re: How to access request.args in download() controller ?

2015-06-18 Thread Gaurav Vichare
e @cache.action() decorator on > the download function, so if you have already downloaded the file once, it > may have been cached, so the download function code (including the print > statement) will not re-execute. > > Anthony > > On Wednesday, June 17, 2015 at 2:57:42 AM

[web2py] How to access request.args in download() controller ?

2015-06-16 Thread Gaurav Vichare
I want to print request.args inside download controller for testing. But it dosn't print anything. It print "request" but not request.args. Download controller : @cache.action() def download(): """ allows downloading of uploaded files http:///[app]/default/download/[filename]