What is more efficient on relational DB (for ex., postgre): join(..) or
group_by_val(..)
rows = db(db.person).select().join(db.thing.owner, name="owns", fields=[
db.thing.id, db.thing.name])
vs
rows = db(db.person).select( db.person.All, db.thing.id, db.thing.name,
join=[
On Thursday, March 9, 2017 at 4:59:03 AM UTC-8, Maurice Waka wrote:
>
> Sorry. I discovered that my database was corrupted
>
>
That's too bad, but if the data is backed up it's at least a relatively
straightforward recovery. Good luck!
/dps
> On Mar 6, 2017 23:20, "Jordan Myers"
On Tuesday, March 7, 2017 at 6:10:01 PM UTC-8, Marcelo Huerta wrote:
>
> Running 2.14.6-stable+timestamp.2016.05.10.00.21.47 on Ubuntu and Windows
> 7, python 2.7
>
> When I try to generate a CSV or TSV from a grid with a Virtual Field, I
> get a ticket with a KeyError.
>
>
Can you show us
Will your example provide both field name and field value?
am reveiving error
CONTROLLER: supRows = db(db.Organization.id == 1).select() {{#returns
locals}}
VIEW:
{{for record in supRows:}}
{{=record.field}}
{{pass}}
Error ticket for "ES3"Ticket ID
That is possible.
Jim
On Mar 9, 2017 6:39 PM, "Anthony" wrote:
> On Thursday, March 9, 2017 at 5:08:56 PM UTC-5, Jim S wrote:
>>
>> queries = [db.auth_user.id > 0]
>> queries.append("%s LIKE '%%%s%%'" % (db._adapter.CONCAT('first_name', '
>> ', 'last_name'), searchText)
On Thursday, March 9, 2017 at 4:09:46 PM UTC-8, Alex Glaros wrote:
>
> I'd like to display column names and values vertically
>
> is there any way to write as expressed in this psudo code?
>
> {{for f in db.someTableRecord:}}
> {{=f}} {{=value_of_the_field}}
> {{pass}}
>
> (To save
also, is there a way to
1. leave out the table name and just display field name
2. use the field label name instead of the raw/real field name?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
On Thursday, March 9, 2017 at 5:08:56 PM UTC-5, Jim S wrote:
>
> queries = [db.auth_user.id > 0]
> queries.append("%s LIKE '%%%s%%'" % (db._adapter.CONCAT('first_name', ' ',
> 'last_name'), searchText)
>
I guess you must have pulled a more recent version version of web2py from
Github (i.e.,
I'd like to display column names and values vertically
is there any way to write as expressed in this psudo code?
{{for f in db.someTableRecord:}}
{{=f}} {{=value_of_the_field}}
{{pass}}
thanks
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Jim:
In the next expression
query = db((db.auth_user == name) or (db.auth_user == lastname)).select()
Replace "or" by "|" (pipe)
query = db((db.auth_user == name) | (db.auth_user == lastname)).select()
Regards.
El miércoles, 8 de marzo de 2017, 1:00:04 (UTC-3), Jim S escribió:
>
> Hi
>
> I
queries = [db.auth_user.id > 0]
queries.append("%s LIKE '%%%s%%'" % (db._adapter.CONCAT('first_name', ' ',
'last_name'), searchText)
query = reduce(lambda a, b: (a & b), queries)
-Jim
On Thu, Mar 9, 2017 at 4:03 PM, Anthony wrote:
> I meant what was the code that produced
I meant what was the code that produced that CONCAT exception?
--
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
You may need also to make some cleansing for multiple white spaces with
replace before your final split and add some logic for middle name and add
further where clause condition...
where_clauses = []
where_clauses.append((db[request.args(0)].fieldname <=
request.vars.input_entry))
query =
single_input_first_last_name.split(' ')[0]
single_input_first_last_name.split(' ')[1] can workin case your user input
first and last name in a proper order or you search both first and last
name 4 times if you don't know in which order you get them with OR ('|')
you will get everythings out you
Here is my version info:
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2017
Version 2.14.6-stable+timestamp.2016.05.09.19.18.48
Database drivers available: pymysql, imaplib, MySQLdb, sqlite3, pg8000,
pyodbc
Code used to be:
queries = [db.auth_user.id > 0]
What did your code look like, and are you using an older version of web2py?
On Thursday, March 9, 2017 at 12:08:10 PM UTC-5, Jim S wrote:
>
> Holy Cow! I got it working.
>
> Not exactly what you specified Anthony, but got me on the right track
>
> With your method I got this traceback:
>
>
I'm using a modal bootstrap to show a form from a table, this is the
funntion called from JS webcomponent
$.web2py.component("{{=URL('default', 'nuovo_evento.load')}}"+ "?titolo=" +
title +"=" + risorsa + "=" +start + "=" +
end,"modulo-evento");
Function of the controller:
def
One more feature:
- I want to get result of select() .compact=False by default
On Thu, Mar 9, 2017 at 8:33 PM, Jurgis Pralgauskis <
jurgis.pralgaus...@gmail.com> wrote:
> Hi,
>
> I want to have extra features for select(..)
> And the codebase is already quite big -- imo best would be to
port=636,
secure=True,
self_signed_certificate=True,
You should look at auth_ldap code if they all apply depends of your LDAP
server... Things is I don't recall if I contribute all the change I made
over my own auth_ldap, but the code is your source of truth...
:)
Richard
On Thu, Mar 9, 2017
Associate parameters :
On Thu, Mar 9, 2017 at 1:32 PM, Richard Vézina
wrote:
> You may try the SSL port 636 (http://www.openldap.org/faq/
> data/cache/185.html)
>
>
> You may realise that it actually available...
>
> Richard
>
> On Thu, Mar 9, 2017 at 12:53 PM,
Hi,
I want to have extra features for select(..)
And the codebase is already quite big -- imo best would be to implement the
features transparently...
I guess I could make derivative of Set class
and override __call__ and select (and maybe _select) If I need this only
for reading information?
You may try the SSL port 636 (
http://www.openldap.org/faq/data/cache/185.html)
You may realise that it actually available...
Richard
On Thu, Mar 9, 2017 at 12:53 PM, Carlos Cesar Caballero Díaz <
carlos.caball...@cfg.jovenclub.cu> wrote:
> I completely agree, and I have warned to the
I completely agree, and I have warned to the sysadmin, but is not my
network, so...
Greetings.
El 09/03/17 a las 12:26, Richard Vézina escribió:
Hello Carlos,
auth_ldap is difficult to put in place because as you mention it
doesn't provide proper feedback when something goes wrong...
Hello Carlos,
auth_ldap is difficult to put in place because as you mention it doesn't
provide proper feedback when something goes wrong...
Note: If you access localhost instance of LDAP it may be ok to not use SSL
protected service, but other than that you want to use 636 port (if I
recall) and
Holy Cow! I got it working.
Not exactly what you specified Anthony, but got me on the right track
With your method I got this traceback:
Traceback (most recent call last):
File "C:\dev\web2py\gluon\restricted.py", line 216, in restricted
exec(ccode, environment)
File
Hi Richard,
I am connecting against an OpenLDAP server, and here is a lot of
services running against it (proxy, email, nextcloud, dolibarr, a few
dozen of Ubuntu PCs and others).
After a more accurate debugging I release that simple_bind_s() was
throwing an invalid credentials error (will
I haven't tried it, but maybe something like this:
def search(sfields, keywords):
keywords = keywords.strip().replace("'", "''")
return "CONCAT(first_name, ' ', last_name) LIKE '%%%s%%'" % keywords
grid = SQLFORM.grid(db.mytable, searchable=search)
Actually, although not
On Thursday, March 9, 2017 at 9:05:27 AM UTC-5, Áureo Dias Neto wrote:
>
> you can use the 'like' condition in w2p, something like this:
>
>
> query = ((db.auth_user.like('%s%' form.var.name) or (db.auth_user.like('%s%'
> form.var.name
>
You cannot build a query from the table object alone
That doesn't work because if I put in 'Tom Jones' into my search it doesn't
match either first name or last name. Only matches if I concatenate the
first and last name fields together.
-Jim
On Thursday, March 9, 2017 at 8:05:27 AM UTC-6, Áureo Dias Neto wrote:
>
> you can use the 'like'
you can use the 'like' condition in w2p, something like this:
query = ((db.auth_user.like('%s%' form.var.name) or (db.auth_user.like('%s%'
form.var.name
2017-03-09 10:52 GMT-03:00 Jim S :
> That will work, but I'm only wanting 1 form field. Basically want to
> implement a
That will work, but I'm only wanting 1 form field. Basically want to
implement a CONCAT function like in the sample SQL Statement I mentioned
above.
-Jim
On Thursday, March 9, 2017 at 7:47:16 AM UTC-6, Áureo Dias Neto wrote:
>
> or this:
>
> name = form.vars.name
> lastname =
or this:
name = form.vars.name
lastname = form.vars.lastname
query = ((db.auth_user == name) or (db.auth_user == lastname))
form = SQLFORM.grid(query)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
name = form.vars.name
lastname = form.vars.lastname
query = db((db.auth_user == name) or (db.auth_user == lastname)).select()
form = SQLFORM.grid(query)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Bump - didn't get any takers the first time. Wondering if anyone has any
ideas...
-Jim
On Tuesday, March 7, 2017 at 10:00:04 PM UTC-6, Jim S wrote:
>
> Hi
>
> I have a search form where the user types in generic search text. I want
> to be able to return to them a list of matching users.
>
Sorry. I discovered that my database was corrupted
On Mar 6, 2017 23:20, "Jordan Myers" wrote:
> It would help if you gave us some more context. Where does this error
> occur? What are you trying to do? The error seems to be when you are
> creating tables in the file
35 matches
Mail list logo