Re: [web2py] Re: 'truncate' broken in SQLTABLE with 'headers'.

2018-01-30 Thread Mandar Vaze / मंदार वझे
are using, and possibly sample code. -Mandar On Wed, Jan 31, 2018 at 6:19 AM, Yi Liu <lav...@gmail.com> wrote: > This is still not fixed as of 01/30/2018 > > On Tuesday, January 22, 2013 at 1:38:29 AM UTC-8, Mandar Vaze wrote: >> >> Just to revive the discussion, if SQLTAB

[web2py] Re: How to refer uploads files

2015-06-25 Thread Mandar Vaze
On Thursday, June 25, 2015 at 1:47:13 PM UTC+5:30, Chaitu P wrote: I want to compile the files that were uploaded. But the files are getting uploaded with some random name. So how can I refer them. Filenames under uploads folder are purposely mangled (what you call random names) for

[web2py] Re: Encrypt uploaded files

2015-06-18 Thread Mandar Vaze
command = openssl enc -aes-256-cbc -salt -in %s -out %s -k %s % (input_file, output_file, key) Will openssl command be available where you want to deploy this ? (on production server) What about path of openssl command on the production server ? Have you considered using encryption

[web2py] High Memory usage due to uploads_in_blob

2015-04-02 Thread Mandar Vaze
Hi, I have an application that uses uploads_in_blob feature as follows : db._adapter.uploads_in_blob = True This creates an additional column of BYTEA type at the DB Level (I am using postgres, if it matters) Here is a sample table (This is just to give you the idea, this is not the

Re: [web2py] Re: High Memory usage due to uploads_in_blob

2015-04-02 Thread Mandar Vaze / मंदार वझे
at 4:20:29 PM UTC+2, Paolo Valleri wrote: That is a bug because Grid selects the 'hidden' doc_blob field. Please open an issue on github Yes, I will. -Mandar On Thursday, April 2, 2015 at 11:03:15 AM UTC+2, Mandar Vaze wrote: Hi, I have an application that uses uploads_in_blob feature

[web2py] Re: High Memory usage due to uploads_in_blob

2015-04-02 Thread Mandar Vaze
On Thursday, April 2, 2015 at 7:50:29 PM UTC+5:30, Paolo Valleri wrote: That is a bug because Grid selects the 'hidden' doc_blob field. Please open an issue on github https://github.com/web2py/web2py/issues/896 -Mandar -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: web2py and pylint

2014-12-17 Thread Mandar Vaze
Can you share the entire pip freeze output ? Especially Astoid and logilab-common versions/details ? https://bitbucket.org/logilab/pylint says Pylint requires the astroid (the later the better; formerly known as logilab-astng) and logilab-common (version = 0.53) packages This may provide

[web2py] Re: Displaying blob image on login page

2014-12-01 Thread Mandar Vaze
From http://stackoverflow.com/questions/22580518/display-image-from-database-in-the-html-form-using-php - you can try setting img src=data:image/gif;base64,' On Tuesday, December 2, 2014 12:09:25 PM UTC+5:30, Prasad Muley wrote: Hi All, I need to display logo according to url in

[web2py] Re: Displaying blob image on login page

2014-12-01 Thread Mandar Vaze
http://stackoverflow.com/questions/16279856/converting-blob-stored-on-a-database-to-an-image-on-an-html-website On Tuesday, December 2, 2014 12:09:25 PM UTC+5:30, Prasad Muley wrote: Hi All, I need to display logo according to url in login page. I tried to display the logo but it

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-27 Thread Mandar Vaze
Current code looks like this : https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2031 See if it helps -Mandar P.S. : I posted original query (2 yrs ago) but as mentioned earlier in the thread - I ended up using session variable though. -- Resources: - http://web2py.com -

Re: [web2py] Re: How to delete session file on logout

2014-10-19 Thread Mandar Vaze / मंदार वझे
On Sat, Oct 18, 2014 at 11:45 PM, Niphlod niph...@gmail.com wrote: that's why the whole thing goes away behind SSL. Expiring a session on logout is better than leaving it as it is, but even in that case *while userA is logged in *there's NO way to prevent a MITM from someone else. That is

Re: [web2py] Re: How to delete session file on logout

2014-10-17 Thread Mandar Vaze
On Thu, Oct 16, 2014 at 2:29 AM, Anthony wrote: Yes. Session file does not get deleted. The side effect of session file remaining on the disk is that if the hijacked session ID is used by the attacker - then somehow contents of the session file on the disk are reused (even if session

Re: [web2py] Is it possible to restrict a user to single login instance ?

2014-10-15 Thread Mandar Vaze / मंदार वझे
- and allow this login attempt to go thru) *But I am not sure how this maps to web2py flow/hooks etc*. So pointers w/ specifics above would help. Thanks, -Mandar On Tue, Oct 14, 2014 at 11:31 PM, Mandar Vaze mandarv...@gmail.com wrote: This is related to possible security issue. I've written privately

Re: [web2py] Re: How to delete session file on logout

2014-10-15 Thread Mandar Vaze / मंदार वझे
On Wed, Oct 15, 2014 at 1:06 AM, Anthony abasta...@gmail.com wrote: On Tuesday, October 14, 2014 2:18:05 PM UTC-4, Mandar Vaze wrote: (This is related to security issue - I've explained the security issue in detail to Massimo and anthony separately) I want the session to be invalid as soon

[web2py] Re: pysaml for web2py2.9.5

2014-10-14 Thread Mandar Vaze
Does this help ? https://github.com/web2py/web2py/blob/447493c754da06b9e455643f6ce2d180add60391/gluon/contrib/login_methods/saml2_auth.py On Tuesday, October 14, 2014 12:53:43 PM UTC+5:30, Prasad Muley wrote: Hi All, I need to implement SSO using pysaml2 for a product. We've Okta as

[web2py] Re: pysaml for web2py2.9.5

2014-10-14 Thread Mandar Vaze
https://dl.dropboxusercontent.com/u/18065445/Tmp/saml2.pdf - Link found here : https://groups.google.com/forum/#!searchin/web2py/SAML2/web2py/8DgzUksCmSo/f-jlU5wV20UJ On Tuesday, October 14, 2014 10:33:03 PM UTC+5:30, Mandar Vaze wrote: Does this help ? https://github.com/web2py/web2py

[web2py] Is it possible to restrict a user to single login instance ?

2014-10-14 Thread Mandar Vaze
This is related to possible security issue. I've written privately to Massimo and Anthony (in another email on this list - they suggested that security issues not be discussed publicly on this list) Lets say UserA logs in successfully from MachineA now without logging out from MachineA - UserA

[web2py] How to delete session file on logout

2014-10-14 Thread Mandar Vaze
(This is related to security issue - I've explained the security issue in detail to Massimo and anthony separately) I want the session to be invalid as soon as after user logs out (as well as after certain period of inactivity) This is supposed to be default behaviour - but somehow doesn't

[web2py] Re: Is it possible to restrict a user to single login instance ?

2014-10-14 Thread Mandar Vaze
three different devices and would be quite annoyed if I had to keep logging in again when I move between devices. e Anthony On Tuesday, October 14, 2014 2:01:19 PM UTC-4, Mandar Vaze wrote: This is related to possible security issue. I've written privately to Massimo and Anthony (in another

[web2py] Re: Is it possible to restrict a user to single login instance ?

2014-10-14 Thread Mandar Vaze
. There's a pretty outstanding issue in your design, though how do you recognize machineA from machineB ? On Tuesday, October 14, 2014 8:01:19 PM UTC+2, Mandar Vaze wrote: This is related to possible security issue. I've written privately to Massimo and Anthony (in another email

[web2py] Re: OWASP Top 10 web app vuln # 10

2014-10-13 Thread Mandar Vaze
This seems to be fixed ONLY for login But issue exists for all other redirections (Am using 2.9.5-stable+timestamp.2014.03.16.02.35.39) e.g. 127.0.0.1:8000/user/profile?_next=http://www.google.com Or http://127.0.0.1:8000/user/logout?_next=http://www.google.com Is there some setting/code that we

[web2py] Re: OWASP Top 10 web app vuln # 10

2014-10-13 Thread Mandar Vaze
of these methods. -Mandar On Monday, October 13, 2014 9:23:23 PM UTC+5:30, Mandar Vaze wrote: This seems to be fixed ONLY for login But issue exists for all other redirections (Am using 2.9.5-stable+timestamp.2014.03.16.02.35.39) e.g. 127.0.0.1:8000/user/profile?_next=http://www.google.com Or http

[web2py] Re: Web2py sessions table does not exist?

2014-07-24 Thread Mandar Vaze
Cool I learnt a lot from this thread. I used to delete everything from both DB as well as applications/myapp/databases folder I think later contains *.table files. I didn't know that I can remove individual *.table files. Also did not know about fake_migration. Gotta try it sometime. In

[web2py] DAL query for optional integer field (Postgres)

2014-07-18 Thread Mandar Vaze
Background : I'm using postgres (web2py 2.9.5 - but I don't think it matters) I have an integer field - which is optional say Number of pets I have NOT set any default value (I think for Postgres - this means default NULL) When user does not select from the drop down

[web2py] Re: PythonAnywhere Web2py Script

2014-07-18 Thread Mandar Vaze
I have some scripts that do not output anything - but I know they work (Mostly DB initialization, populate initial DB etc.) You can put some print statements in voltrin_grabber.py just for debugging - see if you hit those print statements. On Wednesday, July 16, 2014 7:07:21 PM UTC+5:30, Tom

Re: [web2py] Alternative IDEs?

2014-07-18 Thread Mandar Vaze
On Monday, July 14, 2014 6:58:51 PM UTC+5:30, Ramos wrote: Sublime Text Does ST have web2py integration ? as sasogeek wrote help me find methods and variables easily. for example autocomplete options to choose from after using a dot operator? Are there any plugins for that ? I know

[web2py] Re: DAL query for optional integer field (Postgres)

2014-07-18 Thread Mandar Vaze
On Friday, July 18, 2014 10:42:47 PM UTC+5:30, Leonel Câmara wrote: Postgres is right NULL doesn't equal anything dude. db((db.user_profile.pets == 1)|(db.user_profile.pets == None)).count() web2py user mailing list has NEVER failed me Leonel - Thanks a LOT !!! (Yes, it worked.) (I wonder

[web2py] Default value in dict returned by the controller

2014-07-01 Thread Mandar Vaze
Hi, I have several views which are similar, so I am using common view file using response.view =common_view.html rather than separate one per controller. Out of these - 2 or 3 views are slightly different where certain parts of the page (layout.html) need to be hidden. I tried : return

Re: [web2py] Default value in dict returned by the controller

2014-07-01 Thread Mandar Vaze
: globals().get(' hide_my_div',False) should return a False, if this is not present. Kiran Subbaramanhttp://subbaraman.wordpress.com/about/ On Tue, 01-07-2014 10:06 PM, Mandar Vaze wrote: Hi, I have several views which are similar, so I am using

[web2py] Re: Best No SQL DB supported by web2py?

2014-06-24 Thread Mandar Vaze
MongoDB has been marked experimental for quite some time - though. On Wednesday, June 18, 2014 7:56:15 AM UTC+5:30, Anthony wrote: web2py supports MongoDB as well as the Google App Engine Datastore. There is also a CouchDB adapter, though not sure how functional it is. Anthony On Tuesday,

[web2py] Re: How to deploy Web2py on the NEW Openshift directory layout for Python web apps?

2014-06-18 Thread Mandar Vaze
On Wednesday, June 18, 2014 5:33:14 PM UTC+5:30, Mandar Vaze wrote: Bump !! Can someone respond ? I tried to deploy using Web2py Admin interface. clicked on Deploy to Openshift I checked that some additional commits were successfully done - but I don't know how to access my

Re: [web2py] Re: How to use requires with list:reference

2014-06-14 Thread Mandar Vaze / मंदार वझे
This is brilliant !! Thanks a LOT Anthony What I ended up doing is : if request.args(0) == edit: db.child.parent.requires = IS_IN_DB(.) In my actual setup - user does not create new record - so new is not an issue *for me*. -Mandar On Thu, Jun 12, 2014 at 4:57 PM, Anthony

Re: [web2py] Re: How to use requires with list:reference

2014-06-11 Thread Mandar Vaze / मंदार वझे
with lambda - where last_name is same as that of the child -Mandar Anthony On Tuesday, June 10, 2014 12:51:20 PM UTC-4, Mandar Vaze wrote: On Tue, Jun 10, 2014 at 7:53 PM, Anthony abasta...@gmail.com wrote: The first argument to IS_IN_DB must be a DAL object or a Set object -- it cannot

Re: [web2py] Re: How to use requires with list:reference

2014-06-11 Thread Mandar Vaze / मंदार वझे
Anthony, Let me say that you have been tremendous help. On Wed, Jun 11, 2014 at 6:00 PM, Anthony abasta...@gmail.com wrote: Are you saying you want the user to enter a last name for the child and then have the drop-down dynamically updated with the list of parents with the entered last name?

[web2py] How to use requires with list:reference

2014-06-10 Thread Mandar Vaze
when using default 'list:reference mytable' all the entries from mytable are shown in the dropdown (when using SQLFORM.grid) I want to show the list in the drop down after applying some filters Here is an example : db.define_table('parent', Field('fname', 'string'),

Re: [web2py] Re: How to use requires with list:reference

2014-06-10 Thread Mandar Vaze / मंदार वझे
different error mentioned above) I think I'm missing something important Thanks, -Mandar Anthony On Tuesday, June 10, 2014 10:05:21 AM UTC-4, Mandar Vaze wrote: when using default 'list:reference mytable' all the entries from mytable are shown in the dropdown (when using SQLFORM.grid) I want

Re: [web2py] Re: How to use HTML5 datalist for Select/dropdown widget ?

2014-06-09 Thread Mandar Vaze / मंदार वझे
BTW, the autocomplete widget included in web2py seems a pretty clear winner in this usecase, if you don't want to fiddle with select2. I looked thru http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#Auto-completion Is there a way to integrate this with SQLFORM.grid (I need

Re: [web2py] Re: Virtual Fields do not show in details view and are not searchable

2014-06-09 Thread Mandar Vaze / मंदार वझे
On Fri, Jun 6, 2014 at 5:51 PM, Anthony abasta...@gmail.com wrote: Virtual field shows up OK in the table view, but : 1. It does not appear at all when I click on View button By default, virtual fields don't show up in readonly forms, but you can list them in the fields argument. To pass

[web2py] How to use HTML5 datalist for Select/dropdown widget ?

2014-06-06 Thread Mandar Vaze
My application has select/option dropdown - which contains lots of entries (one has about 200 entries, other about 3000 - yes three thousand) I was wondering if there is a way to use HTML5 datalist widget to make the selection user friendly.

[web2py] Virtual Fields do not show in details view and are not searchable

2014-06-06 Thread Mandar Vaze
I'm on web2py 2.9.5, and using new style Virtual fields. Virtual field shows up OK in the table view, but : 1. It does not appear at all when I click on View button 2. are not used for default search Any workarounds ? -Mandar -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: issue with multi-select widget

2014-06-05 Thread Mandar Vaze
On Wednesday, November 21, 2012 12:38:36 AM UTC+5:30, SamD wrote: Would'nt it be more convenient to force whatever is passed to behave as a list (of strings) ? Came across response from Massimo about this here : https://groups.google.com/d/msg/web2py/Je-joYm3ob4/yrhE5r09vI4J TL:DR : Yes,

Re: [web2py] Re: Represent, list:reference, upload-field

2014-05-27 Thread Mandar Vaze
A Million Thanks for Johann (for asking the question) and Massimo (for providing the answer). Following is useful even after more than 3 years !!! Web2py rocks, and web2py community makes it even better :) -Mandar On Friday, October 14, 2011 6:56:07 PM UTC+5:30, Johann Spies wrote: On 14

Re: [web2py] Re: How to intercept download request

2014-05-23 Thread Mandar Vaze / मंदार वझे
, unless you want transfers to block the web2py process... Not possible is acceptable answer (to me). The explanation helps answer why not Thanks !! -Mandar On Thursday, May 22, 2014 10:46:00 AM UTC-7, Mandar Vaze wrote: Sorry for the delayed response. On Wed, May 14, 2014 at 12:14 PM

[web2py] How to make session variables persist even after logout ?

2014-05-23 Thread Mandar Vaze
I have two applications using different versions of web2py I'm using session variables to store some sort of user preferences. First one uses version 2.3.2 Here - I set the session variables after user selects their preferences. These values are available even after user logs out and logs back

[web2py] Re: How to make session variables persist even after logout ?

2014-05-23 Thread Mandar Vaze
Derek, May be I misrepresented my scenario - These aren't exactly preferences. In both the applications - user sees SQLFORM.grid with large number of records. User will use filter to reduce the count. Depending on the user - user is likely to use same filters for quite some time - across

Re: [web2py] Re: How to intercept download request

2014-05-22 Thread Mandar Vaze / मंदार वझे
Sorry for the delayed response. On Wed, May 14, 2014 at 12:14 PM, Niphlod niph...@gmail.com wrote: let's ask another question then. Can you post a link generated by your app that downloads something ? just the part after the domain is enough. This question definitely helped. Turns out

[web2py] Is there an Easier way to store uploads in the DB (postgres) ?

2014-05-19 Thread Mandar Vaze
Currently I am using uploadfield option of Field/table definition to ensure that uploads are stored in DB and not on the filesystem. While this works, this seems tedious because : 1. I have multiple tables with upload fields. If I forget defining uploadfield even one of them (or if someone

Re: [web2py] Re: Is there an Easier way to store uploads in the DB (postgres) ?

2014-05-19 Thread Mandar Vaze / मंदार वझे
On Mon, May 19, 2014 at 11:43 PM, Anthony abasta...@gmail.com wrote: Try: db._adapter.uploads_in_blob = True Then, when you do: db.define_table('mytable', Field('myfile', 'upload', uploadfield=True)) you should get a blob field called db.mytable.myfile_blob with the readable and

Re: [web2py] Re: Is there an Easier way to store uploads in the DB (postgres) ?

2014-05-19 Thread Mandar Vaze / मंदार वझे
On Mon, May 19, 2014 at 11:43 PM, Anthony abasta...@gmail.com wrote: Try: db._adapter.uploads_in_blob = True Then, when you do: db.define_table('mytable', Field('myfile', 'upload', uploadfield=True)) you should get a blob field called db.mytable.myfile_blob with the readable and

[web2py] Re: How to intercept download request

2014-05-14 Thread Mandar Vaze
() function all your inspection MUST be done in that function ^_^ On Tuesday, May 13, 2014 1:22:25 PM UTC+2, Mandar Vaze wrote: I want to audit the downloads - things like which file was downloaded, by whom and when etc - and then allow the download to proceed. I looked

[web2py] How to intercept download request

2014-05-13 Thread Mandar Vaze
I want to audit the downloads - things like which file was downloaded, by whom and when etc - and then allow the download to proceed. I looked at auth.settings.download_url - which is pointing to /app/default/download So I put debugger (import ipdb;ipdb.set_trace()) in download() function in

[web2py] Re: list:reference

2014-05-13 Thread Mandar Vaze
On Tuesday, May 13, 2014 5:06:52 AM UTC+5:30, Michael Beller wrote: I haven't used 'list:reference' before, what are the advantages or use cases for your approach rather than add a reference field such as Field('daily', 'reference daily') on the post table? Generic use case (I could

Re: [web2py] Re: Does Web2py Postgres Adapter support JSON as native type ?

2014-05-09 Thread Mandar Vaze / मंदार वझे
On Thu, May 8, 2014 at 6:25 PM, Anthony abasta...@gmail.com wrote: And here's where it happens in the code: https://github.com/web2py/web2py/blob/master/gluon/dal.py#L2886 Thanks for pointing the relevant piece of code. Definitely helps !!! -Mandar -- Resources: - http://web2py.com -

Re: [web2py] Re: Does Web2py Postgres Adapter support JSON as native type ?

2014-05-08 Thread Mandar Vaze / मंदार वझे
is a proof of concept for working with arrays, it's not stable nor tested. stick to postgres. the default adapter for postgres first checks the version of the backend and then updates the mappings to the proper type is json native support is available. On Sunday, May 4, 2014 7:23:07 PM UTC+2, Mandar

[web2py] Does Web2py Postgres Adapter support JSON as native type ?

2014-05-04 Thread Mandar Vaze
I looked at the gluon/dla.py - and it seems native_json is set to true only for MongoDBAdapter (Default value in BaseAdapter is False) Postgres supports native datatype JSON since 9.3 (9.2?) But PostgresAdapter maps JSON DAL type to TEXT for PostgresAdapter 1. What am I missing (if anything)

[web2py] Is MongoDB support still experimental ?

2014-04-17 Thread Mandar Vaze
I have been seeing questions about web2py+mongo as old as 2009 I think Mongo support became official in 2.3.2 (may be earlier ?) but the documentation still continues to say experimental I will soon start a development for a product that requires MongoDB Considering our existing product is

[web2py] Re: uploadfolder default value (MongoDB/web2py version 2.9.4)

2014-03-27 Thread Mandar Vaze
it as an argument to DAL - but that is NOT default, that is user supplied) -Mandar On Wednesday, March 26, 2014 10:32:27 PM UTC+5:30, Mandar Vaze wrote: I think this might be a false alarm on my part. In another project I used mysql - where ( I assume) self._adapter.folder is set - so default

[web2py] Re: boolean field type in a query.

2014-03-27 Thread Mandar Vaze
Which DB are you using ? The generated SQL seems correct (For MySQL - is_active is set to 'T' for True and 'F' for False) Can you run the (modified, if needed) raw SQL query on the DB ? Just examine various values under the f_test_is_a_clone column. That will give you idea as to what should be

[web2py] Re: Remove query db field

2014-03-27 Thread Mandar Vaze
select() query returns list of Rows Each Row looks like a python dict As far as I know the keys are database field names. If you want to print the rows as is - you may need to write your custom code to covert them to user-friendly titles. DAL is meant to interact with databases smartgrid is

[web2py] uploadfolder default value (web2py version 2.9.4)

2014-03-26 Thread Mandar Vaze
Documentation (http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-types) says uploadfolder defaults to the application's uploads/ folder. Yet, the code (web2py™ Version 2.9.4-stable+timestamp.2014.03.05.04.44.09) defaults to None resulting into following

[web2py] Re: uploadfolder default value (web2py version 2.9.4)

2014-03-26 Thread Mandar Vaze
the error. That begs a question - should mongodb set the adapter.folder value ? From the code it doesn't look like DB specific behaviour -Mandar On Wednesday, March 26, 2014 6:34:06 PM UTC+5:30, Mandar Vaze wrote: Documentation ( http://www.web2py.com/books/default/chapter/29/06/the-database

[web2py] Re: boolean field type in a query.

2014-03-26 Thread Mandar Vaze
You should try .. (db.t_tests.f_test_is_a_clone == False) that is how built-in is_active boolean works. For additional debugging learning - try printing db._lastsql after your query. It will show you raw query - It helps narrow down the problem -Mandar On Wednesday, March 26, 2014 5:38:40

Re: [web2py] Remove query db field

2014-03-26 Thread Mandar Vaze
In your original email you did mention smartgrid It is not clear when you say simple db select query Are you using select query on the commandline of the DB ? Or is it a DAL query ? If it is DAL query - headers are not returned/shouldn't matter -Mandar On Wednesday, March 26, 2014 7:57:11 PM

[web2py] Re: importing modules to test file using pytest

2014-03-21 Thread Mandar Vaze
All, On Monday, December 17, 2012 10:11:13 PM UTC+5:30, Ian W. Scott wrote: After a bit of hacking I put together a working test runner for pytest. Here it is: Run this app's tests via py.test place this file in applications/appname/bin/ run with: python your web2py dir/web2py.py -S

[web2py] Re: importing modules to test file using pytest

2014-03-06 Thread Mandar Vaze
Ian The following is still useful after more than a year. Thanks !! I made some modifications - mostly my specific paths before calling run_pytest, and my run_test.py is in scripts folder rather than bin. I'm getting an error : NameError: name 'db' is not defined I'm running it as : python

Re: [web2py] Re: Using @auth.requires_login() in modules

2013-09-25 Thread Mandar Vaze / मंदार वझे
On Wed, Sep 25, 2013 at 7:53 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Let me clarify. You currently can pass auth to functions in modules and they can call auth methods. It is the decorators that would cause problems. Understood - in fact this is what we are doing right now

[web2py] Re: Using @auth.requires_login() in modules

2013-09-24 Thread Mandar Vaze
Even I have come across such requirements. Similar to Reza's requirement - we want to allow read operations to anyone, but insert/update/delete only for logged in user. Moreover, we also want to check auth.has_membership too. DB operations could be invoked from several different places,

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-14 Thread Mandar Vaze / मंदार वझे
I wonder, that no one except Mandar Vaze is interrested in this feature, as i missed it some times! Or maybe everybody could solve that himself?! Actually, even I Voted for this feature, since I will also need this feature, and happen to see your email (Coincidence ?) But if I had not seen

[web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Mandar Vaze
On Monday, May 13, 2013 2:52:20 PM UTC+5:30, Thomas Wimmer wrote: Instead of buttons or links, the row itself should be the link. The link area contains all fields. Yes, this will be useful. We also need this functionality -Mandar -- --- You received this message because you are

SOLVED : Re: [web2py] Need help : Errors when running web2py app using uWSGI on Webfaction

2013-05-13 Thread Mandar Vaze
You get memory errors, just remove limits (64 MB address space are not enough for sure). As I mentioned later in my question - removing --limit-as 64 did not help either. If anything - it may have made things worse - I got SegFault (See my original post) Anyway, it seems like as you

Re: [web2py] Re: Limit SQLFORM.grid results

2013-05-06 Thread Mandar Vaze / मंदार वझे
Villas, On Mon, May 6, 2013 at 5:52 AM, villas villa...@gmail.com wrote: If you don't need the main features of the grid (eg pagination) then it is better not to use it. I mean, it is a trivial task to produce a nice table without pagination. The other option would be to hide the pagination

Re: [web2py] Re: Limit SQLFORM.grid results

2013-05-03 Thread Mandar Vaze
On Monday, April 23, 2012 7:57:23 PM UTC+5:30, Bruce Wade wrote: Yeah see that was my original question how to tell grid to only select/count the first 50,000 records instead of it just generating pages for all the records. I understand that this is an year-old thread - but I too have a

[web2py] Searching for multiple words in SQLFORM.grid

2013-03-01 Thread Mandar Vaze
Hi, As you all know, SQLFORM.grid search does not support searching for multiple words - it throws an error Invalid Query Searching for multiple words may be a common requirement. I looked thru various older posting on this group, but none worked for me AS IS (Possiblly because they were old -

[web2py] Re: SQLFORM.grid and joins

2013-03-01 Thread Mandar Vaze
I too have come across this same problem - good to see a solution (Now to try it for my scenario) Thanks Kyle !! -Mandar On Thursday, February 28, 2013 9:54:35 PM UTC+5:30, sander.vi...@gmail.com wrote: Awesome, that's it, field_id. To prove our loyalty and to please the many python and

Re: [web2py] SQLFORM.grid custom search where is the error?

2013-02-21 Thread Mandar Vaze
I'm using Version 2.3.2 (2012-12-17 15:03:30) stable and the problem still persists. i.e. I'm still getting Invalid Query error. I'm using Alex's workaround which seems to be working. Thanks Alex. -Mandar On Friday, September 28, 2012 6:07:13 PM UTC+5:30, Massimo Di Pierro wrote: Clearly

[web2py] Re: 'truncate' broken in SQLTABLE with 'headers'.

2013-01-22 Thread Mandar Vaze
Just to revive the discussion, if SQLTABLE is passed a headers dict AND truncate value, then truncate isn't honored. e.g mytable = SQLTABLE(somequery, headers={'table.field1': 'Label1', 'table.field2': 'Label2'} truncate=25) On Wednesday, July 20, 2011 5:45:21

[web2py] Re: 'truncate' broken in SQLTABLE with 'headers'.

2013-01-22 Thread Mandar Vaze
On Wednesday, July 20, 2011 5:45:21 AM UTC+5:30, Anthony wrote: On Tuesday, July 19, 2011 7:48:35 PM UTC-4, Carlos wrote: So 'truncate' is not being respected when using the previous 'headers' format (simple dict of strings). Oh, I see, you're right -- that should be fixed.

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-27 Thread Mandar Vaze / मंदार वझे
You should be able to clone a deleted record however. I agree. An ability to clone the deleted record would be great. I assume no such feature exists (correct ? I didn't find any) If you are just using your auditing log like a recycle bin, then please name it as such. Minor nitpick -

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-27 Thread Mandar Vaze / मंदार वझे
On Fri, Dec 28, 2012 at 12:33 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: If we allow setting is_active from False to True we would be able to re-cycle the record and there would be a record of the recycling (who deleted it, who restored it, and when). Considering there would be

[web2py] Unable to set is_active=True when record_versioning is enabled

2012-12-26 Thread Mandar Vaze
I am also seeing this problem. Using Version 2.3.2 (2012-12-17 15:03:30) stable I get a flash done on submit. but is_active is still False. I wouldn't call it failing silently either. Should I file a bug ? -Mandar On Monday, July 16, 2012 12:16:24 AM UTC+5:30, simon wrote: If you edit a

Re: [web2py] Re: Edit or delete not committing in sqlform.grid for custom query

2012-12-26 Thread Mandar Vaze / मंदार वझे
. I don't know how to fix this because I don't how to handle callback. Boris Dne sreda, 19. december 2012 17:23:18 UTC+1 je oseba Mandar Vaze napisala: I know it is a tough one, but can you guess what could be the problem ? As I mentioned, explicitly adding db.commit() helps resolve

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-26 Thread Mandar Vaze / मंदार वझे
On Wed, Dec 26, 2012 at 11:08 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: there is a ticket about. I understand the problem but there is a logic problem. if is_active=False with versioning it means the record was deleted. So the record is ignored. It should not be visible at all

[web2py] Re: Edit or delete not committing in sqlform.grid for custom query

2012-12-19 Thread Mandar Vaze
Problem still persists in 2.3.2 On Tuesday, October 9, 2012 6:05:08 AM UTC+5:30, Derek wrote: did you open an issue? http://code.google.com/p/web2py/issues/list Done. http://code.google.com/p/web2py/issues/detail?id=1234 -Mandar --

[web2py] Re: Edit or delete not committing in sqlform.grid for custom query

2012-12-19 Thread Mandar Vaze
On Wednesday, December 19, 2012 3:24:31 PM UTC+5:30, Niphlod wrote: I can't reproduce the issue. I know it is a bit tough one. Even I too wasn't able to pinpoint the exact problem. I debugged till the dal.py as well. Not sure when does the db.commit() get called. Can you post a packed

Re: [web2py] Re: Edit or delete not committing in sqlform.grid for custom query

2012-12-19 Thread Mandar Vaze / मंदार वझे
I know it is a tough one, but can you guess what could be the problem ? As I mentioned, explicitly adding db.commit() helps resolve the problem (Whether in gluon/sqlhtml.py or separately in my custom ondelete) Does that give you any hints ? I debugged but (obviously) couldn't find the culprit.

[web2py] question about web2py VERSION number

2012-12-12 Thread Mandar Vaze
Currently Version 2.2.1 (2012-10-21 16:57:04) stable seems to be available for download. So I assumed that all the fixes that went in 2.2.1 are available to me. But then I came across this : http://code.google.com/p/web2py/source/detail?r=74e0cc2bcec9 Looking at VERSION file here - it looks

Re: [web2py] Re: question about web2py VERSION number

2012-12-12 Thread Mandar Vaze / मंदार वझे
labelled as 2.2.1. Only one of them is tagged as R-2.2.1 and that is the one this is posted as stable at the link above, usually it is the first version labelled as 2.2.1. Currently trunk contains 2.3.0 ... rc1. Massimo On Wednesday, 12 December 2012 11:15:43 UTC-6, Mandar Vaze wrote

Re: [web2py] Re: Duplicate headers received from server on Google Chrome

2012-12-10 Thread Mandar Vaze / मंदार वझे
Sorry it me so long to test this. could you try opening globals and around line 400 replace with this ? (just the quotation marks added) headers['Content-Disposition'] = \ 'attachment; filename=%s' % filename If the error goes away we can patch other few places using just

Re: [web2py] Re: Duplicate headers received from server on Google Chrome

2012-12-10 Thread Mandar Vaze / मंदार वझे
On Mon, Dec 10, 2012 at 8:48 PM, Niphlod niph...@gmail.com wrote: This patch https://github.com/web2py/web2py/commit/5e7de996e023a21247d4a9b05a55755d42478895 shows that it's fixed already. Aha .. Seems like it is fixed in 2.3.0 I am still on 2.2.1 Good to know this is fixed. -Mandar --

[web2py] Re: web2py in Web Project

2012-11-26 Thread Mandar Vaze
I'm also seeing similar problems : web2py (2.0.8) on webfaction, using dataTables plugin I started seeing 502 gateway errors Was the following problem resolved ? -Mandar On Friday, April 15, 2011 8:55:56 PM UTC+5:30, contatog...@gmail.com wrote: Hello, As I said before, I believe a system

Re: [web2py] Re: No module named xxx Ubuntu

2012-11-22 Thread Mandar Vaze / मंदार वझे
at 4:20 PM, António Ramos ramstei...@gmail.com wrote: Now i have another python module requests that i cannot import in web2py2.X why? 2012/11/19 António Ramos ramstei...@gmail.com i moved my app to web2py2.XX and it works now! thank you António 2012/11/19 Mandar Vaze mandarv

Re: [web2py] Re: No module named xxx Ubuntu

2012-11-22 Thread Mandar Vaze / मंदार वझे
Ignore following - I didn't realize the problem was resolved - my bad. On Thu, Nov 22, 2012 at 6:37 PM, Mandar Vaze / मंदार वझे mandarv...@gmail.com wrote: requests seems common name, possible conflict ? Depending on your web2py version, check to see if the following discussions are useful

Re: [web2py] Re: Need to save a multipage PDF

2012-11-22 Thread Mandar Vaze
return response.stream(open(request.folder+'/static/temp.pdf', 'rb'),chunk_size=4096) # pdf.output(pfile, 'F') redirect(URL(index)) Will the execution ever reach redirect statement above ? I'm interested because I have a report page which generates the reports based on form

Re: [web2py] Re: Need to save a multipage PDF

2012-11-22 Thread Mandar Vaze
On Thursday, November 22, 2012 7:00:32 PM UTC+5:30, Mandar Vaze wrote: return response.stream(open(request.folder+'/static/temp.pdf', 'rb'),chunk_size=4096) # pdf.output(pfile, 'F') redirect(URL(index)) Will the execution ever reach redirect statement above ? I'm interested

[web2py] How to reset the form after PDF is returned using appreport plugin

2012-11-22 Thread Mandar Vaze
-Mandar On Thursday, November 22, 2012 8:28:06 PM UTC+5:30, Mandar Vaze wrote: I did some debugging using firebug - Here is what is happening : When I choose HTML report there is a POST (posts form data - essentially filters selected by user) followed by GET (actual HTML page is returned from

[web2py] Re: Choosing the PDF file's name with appreport PISA

2012-11-19 Thread Mandar Vaze
Same here. I downloaded the w2p on Nov 12th - so I think I have the latest version. But the filename seems to be ignored. I'm using web2py 2.0.9 On Monday, November 12, 2012 1:26:53 PM UTC+5:30, David Sorrentino wrote: Hello everybody! :) I am using appreport with the PISA engine in order to

[web2py] Re: Choosing the PDF file's name with appreport PISA

2012-11-19 Thread Mandar Vaze
version. -Mandar On Monday, November 19, 2012 2:24:07 PM UTC+5:30, Mandar Vaze wrote: Same here. I downloaded the w2p on Nov 12th - so I think I have the latest version. But the filename seems to be ignored. I'm using web2py 2.0.9 On Monday, November 12, 2012 1:26:53 PM UTC+5:30, David

[web2py] Re: No module named xxx Ubuntu

2012-11-19 Thread Mandar Vaze
if pycall is under applications/myapp/modules, then try restarting web2py When I created a new file under the modules folder, web2py couldn't import until it was restarted See if it helps -Mandar On Thursday, November 15, 2012 5:38:27 PM UTC+5:30, Ramos wrote: Hello i have web2py running in

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Mandar Vaze / मंदार वझे
Even if we were to add ability in grid to take vars as params - it may not be useful in my case (I think) because when controller is invoked for view/search/pagination, original request.vars are lost (that is why saving in session is needed) -Mandar On Wed, Oct 24, 2012 at 3:26 PM, Niphlod

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Mandar Vaze / मंदार वझे
On Wed, Oct 24, 2012 at 12:10 PM, lyn2py lyn...@gmail.com wrote: When/where should I clean these variables from session ? In case user directly accesses second URL (without going thru first URL to select the search criteria) they might see incorrect results - since controller function will

  1   2   >