[web2py] Re: syntax for belongs in IS_IN_DB

2015-01-22 Thread Anthony
On Thursday, January 22, 2015 at 1:04:32 AM UTC-5, Alex Glaros wrote: see anything wrong with belongs and IS_IN_DB off the top of your head, with this syntax? db.Role.roleType.requires = IS_IN_DB(db, db.RoleType.id.belongs(2, 3, 5, 7 , 8, 9, 10, 17, 18, 19), '%(roleType)s',zero=T('choose

[web2py] Google Cloud Storage libraries interaction web2py appengine

2015-01-22 Thread Jacinto Parga
Hello, I am trying to manage (upload and download) big files from google cloud storage width a web2py app deployed in GAE. First step, I have adapted the example: https://cloud.google.com/storage/docs/json_api/v1/json-api-python-samples I works fine in localhost. Here it is the controller:

[web2py] Re: Grid order for reference fields

2015-01-22 Thread Gael Princivalle
I thin it's not necessary adding rows id's, almost for me it don't change nothing. Yes like that it's searchable and you can order rows, but in the details view you've the db.l1_categories.id and the db.l1_categories.name. In your case for example 1 and Music. Il giorno giovedì 22 gennaio

[web2py] Re: export table to csv

2015-01-22 Thread Yebach
I managed to solve the issue with the following code def csvExport(): scriptId = request.args[0] #rows = db(query,ignore_common_filters=True).select() rows = db(db.result.r_id_script == scriptId).select(db.result.r_item1_name, db.result.r_date,

[web2py] Re: Virtual fields in SQLFORM.grid and Export to CSV

2015-01-22 Thread Prasad Muley
This is a web2py bug. The expcolumns list contains all the table fields i.e including virtual fields. for eg: [field1, field2, ..,field_N, Virtual_field_1, Virtual_field2, ..., Virtual_field_N] selectable_columns list contain only the selectable fields. It actually removes all the virtual

[web2py] Re: Grid order for reference fields

2015-01-22 Thread Gael Princivalle
Thanks Niphlod I understand that the web2py grid cannot do all that users would like to, but for my use it's quite to. Viewing, sorting, editing, creating new rows, I like it. For my needs it just miss a way for sorting rows properly by fields that contain an row id of another table. If there's

[web2py] Re: How to display data at top of nav bar

2015-01-22 Thread Jose C
Assume I don't know how to put anything in nav bar. Which methods and docs do I write to? I do something similar by adding this code to a file in the models directory (i call mine 'menu.py') where you set up response.menu: if no_action_users: response.menu += [

[web2py] Re: Grid order for reference fields

2015-01-22 Thread Alex Glaros
with your new join, the fields are searchable, this search works on my version: l2_categories.name = Jazz l1_categories.name = Music Maybe fields need to be explicitly identified in grid command: grid = SQLFORM.grid(query, fields = [db.l1_categories.name, db. l1_categories.id,

[web2py] Re: What is the best way to add an extra input on the client side?

2015-01-22 Thread Derek
I'm glad, I hope that you read the comment at the bottom, this isn't very secure since i'm not using a formkey or anything. It's vulnerable to CSRF. On Saturday, January 17, 2015 at 2:03:46 PM UTC-7, Dave S wrote: On Friday, January 16, 2015 at 11:15:17 AM UTC-8, Przemysław wrote: Thank

[web2py] Re: syntax for belongs in IS_IN_DB

2015-01-22 Thread Alex Glaros
This works, but can't find syntax for the belongs part wanted above: db.Role.roleType.requires = IS_IN_DB(db, db.RoleType.roleType, '%(roleType)s',zero=T('choose one')) am going insane, please give me hint for belongs syntax -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-22 Thread Leonel Câmara
if you go there with your browser in incognito mode does it work? -- 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 because you

[web2py] Re: Grid order for reference fields

2015-01-22 Thread Niphlod
On Thursday, January 22, 2015 at 10:59:28 AM UTC+1, Gael Princivalle wrote: Thanks Niphlod I understand that the web2py grid cannot do all that users would like to, but for my use it's quite to. Viewing, sorting, editing, creating new rows, I like it. For my needs it just miss a way for

Re: [web2py] Re: Mastering web2py DAL

2015-01-22 Thread António Ramos
I buy it now!! Use this https://leanpub.com/ Cheaper for us and better for writers! i think Regards António 2015-01-22 19:11 GMT+00:00 Derek sp1d...@gmail.com: expect it on your local bookstore shelf next winter. On Wednesday, January 21, 2015 at 5:57:07 AM UTC-7, Ramos wrote: Hello

[web2py] Re: stoping database insert in onvalidation

2015-01-22 Thread UG
Thank you , i understand now. On Wednesday, January 21, 2015 at 12:16:56 PM UTC-8, Niphlod wrote: read the book about onvalidation http://web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation . If you want to stop the form from being processed, you have to fill

[web2py] Re: What are the usual steps for designing a web2py application?

2015-01-22 Thread Y
Wouldn't step 2 be designing the database itself? Cheers -- 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 because you are

[web2py] Managing passwords while migrating from web2py to Django

2015-01-22 Thread Priyansh Goel
I want to migrate my models from web2py to Django and there is already some data of users along with the passwords which are using SHA 512 algorithm for encryption in web2py. I also want to migrate those passwords to Django and so, I want a way to encrypt the passwords using SHA 512 in Django.

[web2py] Re: Admin and tickets broken after upgrade to 2.9.4

2015-01-22 Thread Jason Lee
I was able to fix the issue by changing the file ownership back to www-data. During the update process some of the files changed ownership. form the /www-data directory I ran sudo chown -R www-data:www-data web2py/ Now it works fine Jason On Friday, March 14, 2014 at 9:47:45 AM UTC-4,

Re: [web2py] Re: Using a graph database with web2py

2015-01-22 Thread Y
Neo4j is a known one: https://en.wikipedia.org/wiki/Graph_database -- 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 because you

[web2py] Does someone know that how to import python module ?

2015-01-22 Thread C N.O
Hello. I am web2py beginner. I have trouble in web2py. Does someone know that how to import python module ? Please help. [Thu Jan 22 10:53:55 2015] [error] [client X] mod_wsgi (pid=2241): Target WSGI script '/home/www/web2py/wsgihandler.py' cannot be loaded as Python module. [Thu Jan 22

[web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-22 Thread Omi Chiba
I just bring the customized app I crated so admin app is from the latest download. No change. Today, I tried fresh install. Download the latest source and run using apache and got the exact same error! So it means the lates web2py doesn't work with apache via wsgi hadler. I need this fixed

Re: [web2py] Re: syntax for belongs in IS_IN_DB

2015-01-22 Thread Richard Vézina
Alex, Note, also that with belongs you should ever make sure you pass it a list, because you will have problem with it if there is only one item .belongs(1) This is true when your belongs creteria is a subquery for instance and it not return many items. So, think to always surround you belongs

[web2py] Re: Bootstrap modal for insert, update and delete

2015-01-22 Thread Massimo Di Pierro
I think you are missing .process() form = SQLFORM(db.comment_post, r).process() On Sunday, 18 January 2015 22:58:55 UTC-6, M.C. Botha wrote: I would like to use a bootstrap modal to create new and update existing records using a bootstap modal. It works for new records but I cannot get it

[web2py] Re: Ubuntu Software-Center contains web2py 1.99

2015-01-22 Thread Massimo Di Pierro
I agree. Can you help? On Monday, 19 January 2015 08:14:54 UTC-6, Y wrote: Hello It would be great if you could update web2py in the Ubuntu Software-Center to the current release. Cheers -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: http://www.web2pyslices.com/ - how download as application?

2015-01-22 Thread Massimo Di Pierro
It is powered by web2py. Ask the author. I think it is free. On Tuesday, 20 January 2015 02:28:31 UTC-6, Dmitry Ermolaev wrote: It is free? It is powered by web2py? why It not in examples apps? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Decimal( error )

2015-01-22 Thread Massimo Di Pierro
0E-8.00 is a float, not a decimal. Anyway, it is not a valid decimal either, it is 0. On Monday, 19 January 2015 23:22:10 UTC-6, Dmitry Ermolaev wrote: Yes, I use: Field('balance', 'decimal(17,8)', readable=False, default = Decimal('0.0')), Try use that field in table then add

[web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-22 Thread Massimo Di Pierro
I am pretty sure that is what web2py does. If sessions are deleted the cookie is ignored. Are these session in cookies? On Thursday, 22 January 2015 11:35:56 UTC-6, Leonel Câmara wrote: Basically you have an old cookie in your browser that's messing things up. Obviously it's also a bug with

Re: [web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-22 Thread Omi Chiba
Please see my quick test result below. I'm not sure if it's related to sessions and/or cookies because I always failed when I access with https. 1st test 1. delete all the cookie on my browser and delete sessions from all the app. 2. open the website = display welcome app = ok 3. tried to access

Re: [web2py] Re: Using a graph database with web2py

2015-01-22 Thread Dave S
On Thursday, January 22, 2015 at 3:24:05 PM UTC-8, Dave S wrote: On Wednesday, January 21, 2015 at 10:43:32 PM UTC-8, Y wrote: Neo4j is a known one: https://en.wikipedia.org/wiki/Graph_database I left that off my list because the wparticle only lists Java. But if I had checked

[web2py] Re: models: markmin.py

2015-01-22 Thread Massimo Di Pierro
Sorry. Now I get it. In the examples application, some of the text in web pages is not statically embedded in the html pages. It is generated from markmin syntax. This is because we want pick from different sources depending on the accepted languages of the client. That module defines

[web2py] Re: web2py 2.9.12 is OUT

2015-01-22 Thread Massimo Di Pierro
Please open a ticket. It should not be doing that. On Tuesday, 20 January 2015 03:41:06 UTC-6, c...@cemeren.com wrote: Sanitizer is closing br and img tags. I did not notice this on 2.9.12 beta test probably missed that. On Saturday, January 17, 2015 at 8:20:14 AM UTC+2, Massimo Di Pierro

Re: [web2py] Re: Using a graph database with web2py

2015-01-22 Thread Dave S
On Wednesday, January 21, 2015 at 10:43:32 PM UTC-8, Y wrote: Neo4j is a known one: https://en.wikipedia.org/wiki/Graph_database I left that off my list because the wparticle only lists Java. Following the links to end up at the Neo4j site, I haven't yet gotten to where they list

[web2py] Re: What are the usual steps for designing a web2py application?

2015-01-22 Thread Dave S
On Thursday, January 22, 2015 at 3:30:25 PM UTC-8, Dave S wrote: On Thursday, January 22, 2015 at 12:21:31 AM UTC-8, Y wrote: Wouldn't step 2 be designing the database itself? If a database was part of the solution, then a first cut at the database would be a reasonable step 2. Step

[web2py] Re: What are the usual steps for designing a web2py application?

2015-01-22 Thread Dave S
On Thursday, January 22, 2015 at 12:21:31 AM UTC-8, Y wrote: Wouldn't step 2 be designing the database itself? If a database was part of the solution, then a first cut at the database would be a reasonable step 2. Step 1 should tell you if a database is part of the solution. Web2py makes

[web2py] Re: models - session.py

2015-01-22 Thread Massimo Di Pierro
If you open it and read it you find it contains the following line: session.connect(request,response,cookie_key='yoursecret') it tells web2py to store sessions in cookies (not in files) for this application. On Monday, 19 January 2015 23:00:17 UTC-6, Dmitry Ermolaev wrote: I found it in

[web2py] Re: more simple form field for search in some table coloumn

2015-01-22 Thread Massimo Di Pierro
Do you mean something like: form = SQLFORM.factory(Field('key')).process() if form.accepted and form.vars.key: search_product = form.vars.key rows = db((db.model.id == db.product.model) (db.product.quantity 0) )((db.product.serial_no.contains(search_product) ) |

[web2py] Re: helper LOAD() - how forse reload it?

2015-01-22 Thread Massimo Di Pierro
:-) On Wednesday, 21 January 2015 00:03:01 UTC-6, Dmitry Ermolaev wrote: solved jQuery('#sel_curr').get(0).reload(); and target= in LOAD среда, 21 января 2015 г., 8:49:27 UTC+3 пользователь Dmitry Ermolaev написал: I use helper LOAD: DIV(LOAD('bill', 'show_update', args=[so_secr_id],

[web2py] Re: Admin backend not displaying right on GAE

2015-01-22 Thread Massimo Di Pierro
You have an old app.yaml. Check into web2py/examples/app.example.yaml. Yours is missing this - url: /(.+?)/static/_\d.\d.\d\/(.+) On Tuesday, 20 January 2015 16:12:01 UTC-6, Otto Domínguez wrote: I have a very simple, two table app. It works ok on Python web2py 2.9.12 and on GAE web2py

[web2py] Re: Google Cloud Storage libraries interaction web2py appengine

2015-01-22 Thread Massimo Di Pierro
GAE does not provide httplib2 they want you to use urlfetch (their api). web2py provides gluon.tools.fetch which wraps urlfetch and works like urllib.urlopen when not on GAE. First step, I have adapted the example: https://cloud.google.com/storage/docs/json_api/v1/json-api-python-samples

Re: [web2py] Re: Using a graph database with web2py

2015-01-22 Thread Ovidio Marinho
Look this: http://www.highcharts.com/ Ovidio Marinho Falcao Neto ITJP.NET.BR ovidio...@gmail.com itjp.net...@gmail.com Brasil 2015-01-22 20:26 GMT-03:00 Dave S snidely@gmail.com: On Thursday, January 22,

[web2py] Automatically displaying email field as mailto anchor tag in views.

2015-01-22 Thread Paul
I am a web2py newbie though I've used Python for years. I need a CRMy kind of application so I latched onto this https://github.com/mdipierro/web2py-appliances/tree/master/CustomerRelationshipManagement and am trying to tweak it for my specific needs. It would probably be better to cut my

Re: [web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-22 Thread Massimo Di Pierro
Did you restart the web server? I do not think this has anything to do with cookies. This has to do with pickle being None and it cannot be because it is clearly imported. Something very bad happened to your import. Make sure you stop and start again the web server. If you use mod_proxy also

[web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-22 Thread Omi Chiba
Thank you. I posted a ticket for this. https://code.google.com/p/web2py/issues/detail?id=2036 Even I delete session, cookies, hittp or https will get error so the website is useless. I will postpone my upgrade until this fix. On Thursday, January 22, 2015 at 11:35:56 AM UTC-6, Leonel Câmara

[web2py] Re: What is the best way to add an extra input on the client side?

2015-01-22 Thread Dave S
On Thursday, January 22, 2015 at 10:48:23 AM UTC-8, Derek wrote: I'm glad, I hope that you read the comment at the bottom, this isn't very secure since i'm not using a formkey or anything. It's vulnerable to CSRF. I'll keep that in mind, although I'm a long way from any release outside

[web2py] Re: Mastering web2py DAL

2015-01-22 Thread Derek
expect it on your local bookstore shelf next winter. On Wednesday, January 21, 2015 at 5:57:07 AM UTC-7, Ramos wrote: Hello all I suggest a new book (so few in web2py world) Mastering web2py DAL DAL Its so powerfull and a lot of people dont use it properly. I see a lot of use cases and

Re: [web2py] Re: syntax for belongs in IS_IN_DB

2015-01-22 Thread Alex Glaros
thanks for the insight Anthony and Richard works great Alex -- 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 because you

Re: [web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-22 Thread Omi Chiba
It works!!! and now I can access with or without incognito mode... but why?? Is this temporarly fix? On Thu, Jan 22, 2015 at 10:30 AM, Leonel Câmara leonelcam...@gmail.com wrote: if you go there with your browser in incognito mode does it work? -- Resources: - http://web2py.com -

Re: [web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-22 Thread Omi Chiba
Um... actually now I got the same error when I access http which I didn't have any problems. So the original problem was I couldn't access with https and now I cannot access with http with any app (Admin, Welcome...etc). On Thursday, January 22, 2015 at 10:39:34 AM UTC-6, Omi Chiba wrote: It

[web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-22 Thread Leonel Câmara
Basically you have an old cookie in your browser that's messing things up. Obviously it's also a bug with web2py as it should just discard it if it doesn't have a file for it anymore. But you should be good if you clear your browser cookies and the sessions in the apps. -- Resources: -