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
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
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
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)
-
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
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',
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:
>>
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)
---
You received
>
> 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
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 Monday, January 16, 2017 at 10:29:51 PM UTC+5:30, Ramos wrote:
>
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 opens without issue, but when
>> I login, chrome give me following error
>&
-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:
>>
>> Now my ap
> https://github.com/web2py/web2py/pull/1558
>
> Anthony
>
> On Friday, January 13, 2017 at 10:51:03 AM UTC-5, Gaurav Vichare wrote:
>>
>> I was unable to access http://127.0.0.1:8000/admin as well, so I first
>> removed attached routes.py and then created w2p package. Chr
th multiple
> extensions (and possibly no extension), you must include all possibilities:
>
> functions = ['myfunc', 'myfunc.load', 'myfunc.json',
> 'myfunc.xml']
>
> I made a pull request to fix this:
> https://github.com/web2py/web2py/pull/1558
>
> Anthony
>
>
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
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
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
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?
>>
>> Currently
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
On Friday
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)
-
be 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, December 9, 2016 at 11:52:10
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
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
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
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
() 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 UTC-4, Gaurav Vichare wrote:
I want to print
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]
27 matches
Mail list logo