Re: [web2py] Why am I getting "unable to import requests" in web2py even though requests is accessible directly through python

2023-05-29 Thread Saifuddin Rangwala
I had the same issue recently, but on windows. I did a workaround by importing requests before importing gluon in web2py.py. Looks like something is broken, after gluon is imported. On Mon, May 29, 2023 at 7:13 PM Massimiliano wrote: > Just for the records: > > clean python 3.7.16 w/o requests:

Re: [web2py] Re: web2py behind socks proxy

2016-08-30 Thread Saifuddin Rangwala
you want emails to go out using a > different network interface than the incoming http connections? > > > On Friday, 26 August 2016 08:19:36 UTC-5, Saifuddin Rangwala wrote: >> >> I meant to say: I tried searching and found a few threads where people >>

[web2py] Re: web2py behind socks proxy

2016-08-26 Thread Saifuddin Rangwala
I meant to say: I tried searching and found a few threads where people tried attempting the same in the past but it is "not" very clear what was the solution. Apology for spam. On Friday, August 26, 2016 at 6:45:46 PM UTC+5:30, Saifuddin Rangwala wrote: > > Hi, > >

[web2py] web2py behind socks proxy

2016-08-26 Thread Saifuddin Rangwala
Hi, In my environment, I have web2py running inside restricted network that doesn't have direct internet access. I have a socks proxy that can help with access to internet from web2py host. Is there a way to configure a global socks proxy for web2py, such that everything like emails,

RE: [web2py] CUSTOM VALIDATOR

2015-12-14 Thread Saifuddin Rangwala
Your file format should be dos (i.e. every line ends with \r\n). If you vim you should be able to execute :set ff=unix to fix this. Thanks. From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Laurent Lc Sent: 14 December 2015 22:06 To: web2py-users

[web2py] Always sending a custom HTTP header regardless of error or success

2015-07-15 Thread Saifuddin Rangwala
Hi, I would like to a custom http header X-APP-VERSION alongwith all the web2py responses. For 200 OK I do it using code below in the models file: response.headers[X-APP-VERSION] = config.version However, I would like to send this header for all error cases as well including the

[web2py] Always send a custom HTTP header with web2py responses

2015-07-15 Thread Saifuddin Rangwala
Hi, I would like to a custom http header X-APP-VERSION alongwith all the web2py responses. For 200 OK I do it using code below in the models file: response.headers[X-APP-VERSION] = config.version However, I would like to send this header for all error cases as well including the

[web2py] Re: Always send a custom HTTP header with web2py responses

2015-07-15 Thread Saifuddin Rangwala
:58:42 AM UTC-4, Massimo Di Pierro wrote: Good point. Please open a ticket. There is no way to do this now. On Wednesday, 15 July 2015 01:52:55 UTC-5, Saifuddin Rangwala wrote: Hi, I would like to a custom http header X-APP-VERSION alongwith all the web2py responses. For 200 OK I

[web2py] Multiple apps with different DB and auth on same web2py

2015-05-23 Thread Saifuddin Rangwala
Hi, I have got 2 apps on my web2py. Both the apps are different and having their own separate database and users. In this situation for some reason if I try to login to any app, it always defaults to login for one app. i.e. I have app A and app B. Now if I hit

Re: [web2py] Weird behavior with restful api

2015-03-27 Thread Saifuddin Rangwala
If I disable cookie manager with java HttpUrlConnection, it works! Not sure what has DAL got to do with cookies? On Fri, Mar 27, 2015 at 10:08 PM, Saifuddin Rangwala saifuddin.rangw...@gmail.com wrote: Pasting the output from web2py console, clearing it is getting the appid as parameter

[web2py] Weird behavior with restful api

2015-03-27 Thread Saifuddin Rangwala
I have following code in my controller that exposes a restful json api. I am trying to lookup the application by id which is passed as a parameter to this api. Now if I hit this api using curl twice, both the times I see the expected behavior (i.e. application row is fetched from db and a row

Re: [web2py] Weird behavior with restful api

2015-03-27 Thread Saifuddin Rangwala
Pasting the output from web2py console, clearing it is getting the appid as parameter correctly. snip application.id,application.appname 1,Test 1 application.id,application.appname 1 application.id,application.appname 1 snip On Fri, Mar 27, 2015 at 10:04 PM, Saifuddin Rangwala saifuddin.rangw

Re: [web2py] Weird behavior with restful api

2015-03-27 Thread Saifuddin Rangwala
Haven't done any configuration for sessions, it should be using the default configuration. Thanks, -Saif. On Fri, Mar 27, 2015 at 11:46 PM, Dave S snidely@gmail.com wrote: On Friday, March 27, 2015 at 10:18:37 AM UTC-7, Saifuddin Rangwala wrote: If I disable cookie manager with java

[web2py] How to automatically add referenced row during insert with SQLFORM.grid

2014-03-17 Thread Saifuddin Rangwala
I have 2 tables: db.define_table('category', Field('name', 'string'), ... format='%(name)s' ) db.define_table('idata', Field('description', 'string'), ... Field('category',

[web2py] Integration with source control system

2013-12-28 Thread Saifuddin Rangwala
While I make changes to my applications, is there a way to specify a source control like cvs, github, perforce etc.. that I can specify somewhere so that all changes that are made are tracked and that I can revert back to previous change easily? Or anything equivalent that I can setup to achieve

Re: [web2py] Re: Integration with source control system

2013-12-28 Thread Saifuddin Rangwala
December 2013 07:59:06 UTC-6, Saifuddin Rangwala wrote: While I make changes to my applications, is there a way to specify a source control like cvs, github, perforce etc.. that I can specify somewhere so that all changes that are made are tracked and that I can revert back to previous change

[web2py] One time setup of few configurations

2013-05-17 Thread Saifuddin Rangwala
Hi, I want to setup some groups like Administrators, Operators etc.. and give them several different permissions. I have added below to db.py to achieve this: admins = auth.add_group(role = 'Administrators') # Give all permissions to administrators auth.add_permission(admins.id, 'create',

[web2py] Question with RBAC and crud

2013-05-15 Thread Saifuddin Rangwala
I have a table named 'person' and I have given permission to all registered users create rows in this table with: db.define_table('person', Field('name','string', required=True, label=Full Name), Field('gender', 'string', required=True, label=Gender, default='Male',

[web2py] Not able to get db.table.field.represent to output urls in SQLTABLE

2012-05-31 Thread Saifuddin Rangwala
Hi, I am new to web2py. I have created a simple table like below: db.define_table('Test', Field('name', 'string', required=True, unique=True), Field('Description', 'text'), ) db.Test..name.represent=lambda r, v: A(v, _href=URL('default', 'download', args=v)) I am using SQLTABLE to

Re: [web2py] Re: Not able to get db.table.field.represent to output urls in SQLTABLE

2012-05-31 Thread Saifuddin Rangwala
name, row: A(name, _href=URL('default', 'download', args=name)) On Thursday, 31 May 2012 13:34:01 UTC+1, Saifuddin Rangwala wrote: Hi, I am new to web2py. I have created a simple table like below: db.define_table('Test', Field('name', 'string', required=True, unique=True

Re: [web2py] Re: Not able to get db.table.field.represent to output urls in SQLTABLE

2012-05-31 Thread Saifuddin Rangwala
db.define_table( 'users', Field('name'), Field('email') ) db.users.name.represent = lambda name, row: A(name, _href=URL('default', 'download', args=name)) On Thu, May 31, 2012 at 8:22 PM, Saifuddin Rangwala saifuddin.rangw...@gmail.com wrote: Doesnt work. I tried doing