[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Niphlod
BTW, you just joined two groups I'm in : postgresql lovers and mysql haters. I'm a taddle biased too (mainly for hiccups seen here and there, also while working on web2py), but mysql doesn't really cut the deal of behaving like a serious database should. I'm happier with SQLite, and that's

[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Joe Barnhart
Niphlod -- I guess I was expecting more parity between the two since MySql has such a dominant position (at least here in the US). I am shocked at how different they are performance-wise. But my requirement of being able to deploy on cloud services easily is outweighing my disappointment in

[web2py] Re: Whoosh

2015-03-06 Thread Ron Chatterjee
Does anyone know how to install haystack? I see a python file with .py extension. I need to install whoosk and sunburnt first? Thought may be give haystack a try. On Friday, March 6, 2015 at 1:08:28 PM UTC-5, Massimo Di Pierro wrote: It may need some love. Very few people have used this. It

[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Joe Barnhart
Hi Jim -- Since I'm just starting with MySql, I'm using the latest and greatest 5.6. The newer 5.7 is still testing so I have not tried it. My site needs to be on official versions of stuff. On Friday, March 6, 2015 at 2:15:43 PM UTC-8, Jim S wrote: What version of MySQL? We had similar

Re: [web2py] Re: fastest way to count - check for mere existence of any record

2015-03-06 Thread Alex Glaros
thanks Niphlod and Massimo works great Alex On Fri, Mar 6, 2015 at 2:54 PM, Niphlod niph...@gmail.com wrote: yep. db(query).isempty() returns True if no records are found, in the uttermost simplicistic and speed-aware method I know, that is basically db(query).select(limitby=(0,1),

Re: [web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Ron Chatterjee
Massimo, whats the right syntax to pass the variable to smart_query? U mentioned list. But [db.table.field] gives u the dal object n the code given me a error on line 110 in methods.py . U have isinstance (fields, (list, tuple))). So I believe smart_query takes in list or tuple. But how do I

[web2py] Re: web2py.com/sqldesigner not working import export

2015-03-06 Thread Ron Chatterjee
I understand. Thanks On Friday, March 6, 2015 at 12:25:46 PM UTC-5, Massimo Di Pierro wrote: Ron. I am not sure this is about control as much as it is about resources. sqldesigner it an open source project not associated to web2py. Anybody can edit it and improve it. You can too. There are

[web2py] Re: Whoosh

2015-03-06 Thread Ron Chatterjee
Can u fix smart_query for me? Lol On Mar 6, 2015 6:53 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote: there should be instructions in the file. You need to install whoosh On Mar 6, 2015, at 5:50 PM, Ron Chatterjee achatterjee...@gmail.com wrote: Does anyone know how to install

[web2py] Re: Whoosh

2015-03-06 Thread Ron Chatterjee
Thats because I needed to do auth=Auth (db). For my auth_user On Mar 6, 2015 6:56 PM, Ron Chatterjee achatterjee...@gmail.com wrote: Can u fix smart_query for me? Lol On Mar 6, 2015 6:53 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote: there should be instructions in the file. You need

Re: [web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Ron Chatterjee
That code got bug in it. It cant b right. On Mar 6, 2015 1:06 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I agree with Leonel, is is better to make your own search. The all point of the grid is pagination of results. If that is not what you need, make your own search using this:

[web2py] Re: web2py.com/sqldesigner not working import export

2015-03-06 Thread Ron Chatterjee
I made that comment because I passed on the sql designer. I can just follow the examples and create database without having anything to do with that GUI (nice to have but I don't have a bmw either). But i thought if the other guy who asked, really want to use sqldesigner and web2py can no

[web2py] Re: Whoosh

2015-03-06 Thread Ron Chatterjee
It gives a run time error on line 110 when I try to pass the variable like u mentioned; list_of_searchble_field =[db.table.field]. It says field must b a list of fields. I tried to pass it like a set too. Didnt work. I m not the best python guy yet:(. Unfortunately. Matlab I could fix this in 5

[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Niphlod
On Friday, March 6, 2015 at 11:58:49 PM UTC+1, Joe Barnhart wrote: Niphlod -- I guess I was expecting more parity between the two since MySql has such a dominant position (at least here in the US). I am shocked at how different they are performance-wise. But my requirement of being able

[web2py] Re: Whoosh

2015-03-06 Thread Massimo DiPierro
there should be instructions in the file. You need to install whoosh On Mar 6, 2015, at 5:50 PM, Ron Chatterjee achatterjee...@gmail.com wrote: Does anyone know how to install haystack? I see a python file with .py extension. I need to install whoosk and sunburnt first? Thought may be give

[web2py] Re: Whoosh

2015-03-06 Thread Ron Chatterjee
I did what u told me. I have from pydal.helpers.methods import smart_query in my default.py On Mar 6, 2015 7:31 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote: Do you have any from …. import Field in your code? On Mar 6, 2015, at 6:20 PM, Ron Chatterjee achatterjee...@gmail.com wrote:

[web2py] Re: Whoosh

2015-03-06 Thread Ron Chatterjee
I think the issue is with the line isinstance (field, Field). When I pass the field.it is a gluon.dal.objects.Field n u r comparing that with pydal.object.Field. I m not sure but its failing both if and else. So it goes to raise. Lol On Mar 6, 2015 6:59 PM, Massimo DiPierro

[web2py] Can we disable moderation in the group?

2015-03-06 Thread Jack Kuan
I don't see the need and think it can be off putting for new comers. -- 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

[web2py] Weird problems with scheduler on OSX

2015-03-06 Thread Jack Kuan
I have had a similar problem with the scheduler on OS X. Try search scheduler os x urllib in this group, and see if my post helps. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Weird problems with scheduler on OSX

2015-03-06 Thread Niphlod
I'm entering in weekend-status, but really need to go to bed first. Stay tuned in the next days: I'll try to create a very small script that does what web2py does when started with -X (nothing special) : spawning a subprocess from a thread. If that small bit doesn't work, then it's Mac's fault

[web2py] Re: Whoosh

2015-03-06 Thread Massimo DiPierro
What is wrong with smart_query? On Fri, Mar 6, 2015 at 5:56 PM, Ron Chatterjee achatterjee...@gmail.com wrote: Can u fix smart_query for me? Lol On Mar 6, 2015 6:53 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote: there should be instructions in the file. You need to install whoosh

[web2py] Re: Whoosh

2015-03-06 Thread Massimo DiPierro
Do you have any from …. import Field in your code? On Mar 6, 2015, at 6:20 PM, Ron Chatterjee achatterjee...@gmail.com wrote: I think the issue is with the line isinstance (field, Field). When I pass the field.it is a gluon.dal.objects.Field n u r comparing that with pydal.object.Field. I

[web2py] Re: Whoosh

2015-03-06 Thread Ron Chatterjee
In my db.py I have from gluon.tools import*. Thats the issue? On Mar 6, 2015 7:31 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote: Do you have any from …. import Field in your code? On Mar 6, 2015, at 6:20 PM, Ron Chatterjee achatterjee...@gmail.com wrote: I think the issue is with

[web2py] Re: fastest way to count - check for mere existence of any record

2015-03-06 Thread Niphlod
yep. db(query).isempty() returns True if no records are found, in the uttermost simplicistic and speed-aware method I know, that is basically db(query).select(limitby=(0,1), orderby_on_limitby=False) On Friday, March 6, 2015 at 10:17:38 PM UTC+1, Alex Glaros wrote: does this look okay? if

[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Jim S
Shoot, I was hoping that information would help you out. Certainly made drastic improvements in my case. Let the hatefest continue!! However, I'll have to skip this one, MySQL has done very well for me over the years.. -Jim On Friday, March 6, 2015 at 4:55:41 PM UTC-6, Joe Barnhart wrote:

[web2py] Weird problems with scheduler on OSX

2015-03-06 Thread Joe Barnhart
I'm a huge fan of the web2py scheduler. I use it ALL the time so when it quit working, I noticed it. I've looked at the message board and nobody else is complaining about scheduler problems, so this is probably self-inflicted. But for the life of me I don't see it. I am using web2py

[web2py] Re: web2py.com/sqldesigner not working import export

2015-03-06 Thread Ron Chatterjee
Thats the thing with this group/community. Few people controls it. It will be upto them either cater to your need or their need. And if I have to guess, it will be their need. I will suggest, brush up on your knowledge of python and server based programming and learn django. There you will be

Re: [web2py] dbio=False proper way to update every fields not only the one that had changed

2015-03-06 Thread Anthony
No, the compute field should not be in the form/form.vars. Hard to say what the problem is. Maybe create a minimal app that reproduces the problem. Anthony On Friday, March 6, 2015 at 8:58:23 AM UTC-5, Richard wrote: Yah right! row = db[request.args(0)](request.args(1))

Re: [web2py] .grid() my own search widget possible? How?

2015-03-06 Thread Richard Vézina
You want the table to pop when there will be results selected? If so, I guess you will need some JS. You will need to init the table with a query that prevent any result to be selected (this query will require to be hiden somehow JS this is the tricky part, you will need to clear behind the scene

[web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Ron Chatterjee
18 views and not one single comment. It seems I may have asked the most complicated question, or its not even possible. Would have been nice though. Most sites have a search bar on the top to search for the content. Rather than reinventing the wheel (the purpose of a framework), I could quick

[web2py] Re: web2py with bootstrap-slider bootstrap-typeahead

2015-03-06 Thread Francisco Costa
On Saturday, 31 January 2015 03:24:04 UTC, Massimo Di Pierro wrote: Niphlod. Calm down. Everything is going to be fine. ;-) In fact, I almost did not know JS when I started web2py and avoided it as the plague. Today I like it a log. Back to the original question. Assuming we are

Re: [web2py] Re: two (or more) applications using the same database

2015-03-06 Thread Anthony
Also, note that technically, you don't have to move the zip codes to a third database. You can leave them where they are and just have other apps access that database (again, making sure only one of the apps is managing migrations of that table). Also, depending on the details, you may not

Re: [web2py] dbio=False proper way to update every fields not only the one that had changed

2015-03-06 Thread Richard Vézina
Yah right! row = db[request.args(0)](request.args(1)) for f in db[request.args(0)].fields: if f != db[request.args(0)]._id and f != db[request.args(0)].record_review_status: form.vars[f] = form.vars.get(f, row[f]) My table is kind of not

[web2py] Re: Weird problems with scheduler on OSX

2015-03-06 Thread Massimo Di Pierro
Yes. Mercurial is deprecated. I will remove it. for now I re-synced but the logs are off. On Friday, 6 March 2015 04:58:41 UTC-6, Joe Barnhart wrote: I'm a huge fan of the web2py scheduler. I use it ALL the time so when it quit working, I noticed it. I've looked at the message board and

[web2py] Re: digitally signed URLs

2015-03-06 Thread Massimo Di Pierro
if the user is logged-in you do not have to pass an hmac_key. It is automatically generated per-session. On Friday, 6 March 2015 05:26:47 UTC-6, Annet wrote: I read chapter 29/04 on digitally signed urls. and have a question. I have sort of a router function which routes requests: def

[web2py] Re: web2py with bootstrap-slider bootstrap-typeahead

2015-03-06 Thread Massimo Di Pierro
correction. My comment was wrong. The web2py code is correct. On Friday, 6 March 2015 11:18:24 UTC-6, Massimo Di Pierro wrote: I had no idea. I will change this immediately. On Friday, 6 March 2015 06:27:55 UTC-6, Francisco Costa wrote: On Saturday, 31 January 2015 03:24:04 UTC, Massimo

Re: [web2py] .grid() my own search widget possible? How?

2015-03-06 Thread Ron Chatterjee
Basically, quick and dirty way to display the search bar on the top of the site using smartgrid without showing the table. Then when someone put a query and hit, search, be able to redirect to another page. That way, the prototype will be complete without writing a customized search routine.

[web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Leonel Câmara
It's not that this isn't possible, it's just that it doesn't make much sense to use smartgrid if all you want is a searchbox. Anyway... Here's how you can do it. I don't recommend people use this. controller: def test(): grid = SQLFORM.smartgrid(db.mytable) return locals() view:

[web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Leonel Câmara
Well you can use LOAD to put the form there and then have the controller redirect if it has results. But really it's much simpler to just make your own search. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Ron Chatterjee
Can u send me a.link or point me to the chapter in the book? U can add. These mins to 37 that u mentioned. Its cool. On Mar 6, 2015 11:27 AM, Leonel Câmara leonelcam...@gmail.com wrote: Well you can use LOAD to put the form there and then have the controller redirect if it has results. But

[web2py] Re: web2py with bootstrap-slider bootstrap-typeahead

2015-03-06 Thread Massimo Di Pierro
I had no idea. I will change this immediately. On Friday, 6 March 2015 06:27:55 UTC-6, Francisco Costa wrote: On Saturday, 31 January 2015 03:24:04 UTC, Massimo Di Pierro wrote: Niphlod. Calm down. Everything is going to be fine. ;-) In fact, I almost did not know JS when I started web2py

Re: [web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Ron Chatterjee
Thank u for responding. U misunderstood. I m trying to have a search bar on the top of the page without having the table populated below. The idea was to link my tables to the search n when some one puts a query it redirect s them to the table based on the query. Lets say I want a complete blank

Re: [web2py] .grid() my own search widget possible? How?

2015-03-06 Thread Richard Vézina
What you want I think is plain text search... There is a example using Whoosh, if you search the google group you should find Massimo email annoncing it... Good luck. Richard On Fri, Mar 6, 2015 at 10:44 AM, Ron Chatterjee achatterjee...@gmail.com wrote: Basically, quick and dirty way to

[web2py] fastest way to count - check for mere existence of any record

2015-03-06 Thread Alex Glaros
Anyone have syntax to optimize speed of count, to check record existance? Often just want to check for the existence of ANY records and don't need a full count, but I only know how to get info from full count. See below where logic only cares if count is greater than zero.

Re: [web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Ron Chatterjee
https://gist.github.com/mdipierro/5479683 May be? Did anyone tried Whoosh? On Friday, March 6, 2015 at 11:48:59 AM UTC-5, Ron Chatterjee wrote: I mean python, web2py context. Without using jscript. Anyone have an example of creating a simple search box that are linked to ur datanase table?

Re: [web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Ron Chatterjee
I mean python, web2py context. Without using jscript. Anyone have an example of creating a simple search box that are linked to ur datanase table? On Mar 6, 2015 10:57 AM, Leonel Câmara leonelcam...@gmail.com wrote: It's not that this isn't possible, it's just that it doesn't make much sense to

[web2py] Re: Adding

2015-03-06 Thread James O' Driscoll
thanks for the info. would anyone have any code for this?? On Friday, March 6, 2015 at 12:39:47 PM UTC+10, Massimo Di Pierro wrote: On second thought... there is one way. You can create your own mail object which has a send_mail method and all it does is to queue its arguments. Then

[web2py] Re: Query Production Oracle database using DAL

2015-03-06 Thread Paolo Valleri
Instantiate DAL with migrate=False is enough to guarantee the read-only-mode operations. In addition accessing the db using an user without write permissions is better if you only have to dump data. To copy data from one db to an other, have a look at

Re: [web2py] Re: two (or more) applications using the same database

2015-03-06 Thread Michele Comitini
You can have zipdb = DAL('connection to the zip database') in both of your apps (let's call them app1 and app2) and identical table definitions for zipdb. Then you can have db = DAL('connection to app1 db') in app1 models and db = DAL('connection to app2 db') in app2. Just remember to pay

[web2py] digitally signed URLs

2015-03-06 Thread Annet
I read chapter 29/04 on digitally signed urls. and have a question. I have sort of a router function which routes requests: def router(): node_id = request.args(0, cast=int) row = db().select() if row: if row.view_id == 'bsc' redirect(URL('site', 'index',

[web2py] Re: fastest way to count - check for mere existence of any record

2015-03-06 Thread Alex Glaros
am looking for something like below if count(db((db.VerifiedConnection.personID == personID.id) (db.VerifiedConnection.connectedTo == auth.user_id)).select(limitby=(0,1)).first()) 0: redirect(URL('error_duplicate_role')) -- Resources: - http://web2py.com -

[web2py] Re: web2py.com/sqldesigner not working import export

2015-03-06 Thread Massimo Di Pierro
Ron. I am not sure this is about control as much as it is about resources. sqldesigner it an open source project not associated to web2py. Anybody can edit it and improve it. You can too. There are a few people that host sqldesigner and they are not associated with us. I will send a patch to

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Oliver Holloway
This is the controller, in case that matters. @auth.requires_membership('coach') def show_list_of_sessions(): # get list of evaluations evaluations = SQLTABLE(db(db.sessions.session_type=='evaluation').select(db.sessions.session_name), headers=None, truncate=128

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Oliver Holloway
Hi, Leonel. When I do that, I get this error: 'Row' object has no attribute 'sessions' On Friday, March 6, 2015 at 2:02:57 PM UTC-5, Leonel Câmara wrote: you need to write row.sessions.id You always need to be explicit in represents. -- Resources: - http://web2py.com -

[web2py] Re: Whoosh

2015-03-06 Thread Massimo DiPierro
https://github.com/mdipierro/web2py-haystack On Mar 6, 2015, at 11:29 AM, Ron Chatterjee achatterjee...@gmail.com wrote: Is whoosh is supported in DAL. Any example? Or have a js that create SQLFORM.search like SQLFOrM.smartgrid? Searching is important -- Resources: - http://web2py.com -

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Oliver Holloway
When I try that, this error occurs: 'Row' object has no attribute 'id' On Friday, March 6, 2015 at 1:47:08 PM UTC-5, Anthony wrote: It should be args=row.id, not args=db.session.id (the former is the value of the id for the current record, and the latter is the actual id Field object).

[web2py] Re: fastest way to count - check for mere existence of any record

2015-03-06 Thread Massimo Di Pierro
How about just fetching the id? if count(db((db.VerifiedConnection.personID == personID.id) (db.VerifiedConnection.connectedTo == auth.user_id)).select(db. VerifiedConnection.id,limitby=(0,1)).first()) 0: On Friday, 6 March 2015 11:26:00 UTC-6, Alex Glaros wrote: am looking for something

[web2py] Re: Whoosh

2015-03-06 Thread Massimo Di Pierro
It may need some love. Very few people have used this. It should work fine. It works for me. On Friday, 6 March 2015 11:40:25 UTC-6, Ron Chatterjee wrote: Omg, this is exactly what I was looking for. Sooo spooky On Mar 6, 2015 12:35 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote:

[web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Massimo Di Pierro
I agree with Leonel, is is better to make your own search. The all point of the grid is pagination of results. If that is not what you need, make your own search using this: from pydal.helpers.methods import smart_query list_of_searchable_fields = [db.table.field1, db.table.field2, ...]

[web2py] represent how to send row id in args

2015-03-06 Thread Oliver Holloway
In the following table, the session_name is represented as a link. I want to pass session.id in args (rather than args=1 as you see below). How do I do that? I've tried various ways to say args=db.sessions.id, and it's as if the sessions.id value is not being picked up.

[web2py] Re: fastest way to count - check for mere existence of any record

2015-03-06 Thread Alex Glaros
not sure how to structure that syntax Massimo...would this be okay? if (db((db.VerifiedConnection.personID == personID.id) (db.VerifiedConnection.connectedTo == auth.user_id)).select(limitby=(0,1)).first()): redirect(URL('error_duplicate_role')) -- Resources: - http://web2py.com

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Leonel Câmara
you need to write row.sessions.id You always need to be explicit in represents. -- 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

[web2py] Re: Whoosh

2015-03-06 Thread Ron Chatterjee
Omg, this is exactly what I was looking for. Sooo spooky On Mar 6, 2015 12:35 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote: https://github.com/mdipierro/web2py-haystack On Mar 6, 2015, at 11:29 AM, Ron Chatterjee achatterjee...@gmail.com wrote: Is whoosh is supported in DAL. Any

Re: [web2py] Re: sqlformfactory smartgrid just search field

2015-03-06 Thread Ron Chatterjee
I had to download paydal. It seems working. Except I need to difine search_text. N since thats an input, I believe i need to do form=SQLFORM.factory (Field ('search_text', label='peak inside', requires=IS_NOT_EMPTY ())) n then if form.process.accepted (): search_text = form.vars.search_name

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Anthony
It should be args=row.id, not args=db.session.id (the former is the value of the id for the current record, and the latter is the actual id Field object). Anthony On Friday, March 6, 2015 at 1:37:22 PM UTC-5, Oliver Holloway wrote: In the following table, the session_name is represented as a

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Oliver Holloway
Sorry, I've been trying various combinations. Here's what I've tried, none of them work. #db.sessions.session_name.represent = lambda session_name, row: A(row.session_name, _href=URL('demo', 'tests_for_this_eval',* args=sessions.id*)) # global name 'sessions' is not defined

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Oliver Holloway
I've caused some confusion with my typos. Here's the code. model db.define_table('sessions', Field('program_name', 'string', requires=IS_IN_DB(db, db.programs.program_name)), Field('session_type', 'string', requires=IS_IN_SET(['practice', 'evaluation'],

[web2py] Re: Weird problems with scheduler on OSX

2015-03-06 Thread Niphlod
add yourself to the bandwagon and help us see what's going wrong https://github.com/web2py/web2py/issues/711 BTW: asked several times for someone with a mac to test it. I haven't one so unfortunately I can't help that much if nobody replies. On Friday, March 6, 2015 at 6:16:28 PM UTC+1,

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Anthony
Is that the exact code, because you didn't change to args=row.id, and your second select is still missing the id field? Anthony On Friday, March 6, 2015 at 2:23:48 PM UTC-5, Oliver Holloway wrote: Added sessions.id to the select, same thing. Here's the table definition and the controller.

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Oliver Holloway
Hi, Anthony. I've posted the variations I've tried. As for the second select, I should have excised that because it's unimportant right now. On Friday, March 6, 2015 at 2:37:37 PM UTC-5, Anthony wrote: Is that the exact code, because you didn't change to args=row.id, and your second select

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Oliver Holloway
Added sessions.id to the select, same thing. Here's the table definition and the controller. The id does show up on the view page, but isn't passing as an arg. db.define_table('sessions', Field('program_name', 'string', requires=IS_IN_DB(db, db.programs.program_name)),

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Leonel Câmara
You have 'db' instead of 'row' in your args. -- 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 subscribed to the

[web2py] Re: fastest way to count - check for mere existence of any record

2015-03-06 Thread Niphlod
by any chance, is isempty() being totally forgotten ? it just does return not self.select(limitby=(0,1), orderby_on_limitby=False) On Friday, March 6, 2015 at 8:19:54 PM UTC+1, Alex Glaros wrote: oops, meant this if (db((db.VerifiedConnection.personID == personID.id) (db.

Re: [web2py] dbio=False proper way to update every fields not only the one that had changed

2015-03-06 Thread Niphlod
IMHO the hiccup comes from the fact that fields that are writable = False are not rendered as an input/select/whatever, but they're just a TD cell filled with data. Of course the form isn't submitting it. On Friday, March 6, 2015 at 4:19:35 PM UTC+1, Anthony wrote: No, the compute field

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Anthony
On Friday, March 6, 2015 at 2:02:57 PM UTC-5, Leonel Câmara wrote: you need to write row.sessions.id You always need to be explicit in represents. You need to be explicit in virtual fields (i.e., include the table name), but I don't think that is the case with represent. I think the

[web2py] Re: fastest way to count - check for mere existence of any record

2015-03-06 Thread Alex Glaros
oops, meant this if (db((db.VerifiedConnection.personID == personID.id) (db. VerifiedConnection.connectedTo == auth.user_id)).select(db. VerifiedConnection.id, limitby=(0,1)).first()): -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Oliver Holloway
Hey! I switched to vars and it worked :) Thank you to all of you who helped. db.sessions.session_name.represent = lambda session_name, r: A(r. session_name, _href=URL('demo', 'tests_for_this_eval', vars=dict(i=r.id))) -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Oliver Holloway
Anthony, thanks, I swapped vars back in and that works now. You must be right, I must have made some other change, but I can't see what I did. At any rate, this is working now, and I regret if I've wasted anyone's time. On Friday, March 6, 2015 at 3:32:36 PM UTC-5, Anthony wrote: If

[web2py] OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Joe Barnhart
I'm talking about the query optimizer here... I had been running my test site on Postgres for some time and getting pretty good performance. I switched to MySql because it is so much more ubiquitous among vendors who sell SAAS for web deployments. I can find tons of providers of MySql

[web2py] Re: Weird problems with scheduler on OSX

2015-03-06 Thread Joe Barnhart
HI Niphlod -- I'm only too happy to be your Mac tester on this. I'll figure out how to switch to GitHub and not crater my dev. environment. I've grown accustomed to keeping the entire web2py tree in my development branch so I can move forward or backward to try my code with any current or

[web2py] Re: represent how to send row id in args

2015-03-06 Thread Anthony
If vars=dict(i=r.id) works, then so will args=r.id. More specifically, if the latter generates an error saying the Row object has no attribute id, then the former would also generate the same error, as r is the same Row object in both cases. I suspect you made some other change that made it

[web2py] Re: fastest way to count - check for mere existence of any record

2015-03-06 Thread Alex Glaros
does this look okay? if not (db((db.VerifiedConnection.personID == personID.id) (db. VerifiedConnection.connectedTo == auth.user_id))).isempty(): -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: SQLFORM.factory adding dynamic form

2015-03-06 Thread Ramkrishan Bhatt
No Solution for one to many composite form ? -- 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 subscribed to the

[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Jim S
What version of MySQL? We had similar problems with 'IN'. Moving to 5.6 fixed it. However, on some platforms, 5.5 is still the standard for installs. Check out 5.6 if you have access to it to see if that helps. -Jim On Friday, March 6, 2015 at 3:17:09 PM UTC-6, Joe Barnhart wrote: I'm

[web2py] Re: digitally signed URLs

2015-03-06 Thread Annet
Hi Massimo, Thanks for your reply. if the user is logged-in you do not have to pass an hmac_key. It is automatically generated per-session. The user is not logged in, the router function is part of the public functions of my application. The URL contains three arguments that determine which

[web2py] Re: Weird problems with scheduler on OSX

2015-03-06 Thread Jack Kuan
Hi Joe, Oh I'm sure web2py still uses urllib somewhere. Have you tried just adding the lines to gluon/widget.py and see if that helps? Jack On Friday, March 6, 2015 at 11:35:46 PM UTC-5, Joe Barnhart wrote: Hi Jack -- I found that post and checked, but my web2py (v.2.9.12-stable) did not

[web2py] Re: OT: I'm stunned how bad MySql is after using Postgres

2015-03-06 Thread Joe Barnhart
Hi Jim -- Please, whatever you do, DO NOT ever try Postgres! You will be ruined for MySql... :-P -- Joe On Friday, March 6, 2015 at 3:00:22 PM UTC-8, Jim S wrote: Shoot, I was hoping that information would help you out. Certainly made drastic improvements in my case. Let the hatefest

[web2py] Re: Weird problems with scheduler on OSX

2015-03-06 Thread Joe Barnhart
Hi Jack -- I found that post and checked, but my web2py (v.2.9.12-stable) did not use urllib to begin with. Too bad, I thought I'd found a workaround! Now I'll have to do some heavy lifting and help Niphlod find the problem... -- Joe On Friday, March 6, 2015 at 6:12:30 PM UTC-8, Jack Kuan