[web2py] Re: Python3 lighttpd fcgi?

2018-11-20 Thread zxynax
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro 
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

This is a handler for lighttpd+fastcgi
This file has to be in the PYTHONPATH
Put something like this in the lighttpd.conf file:

server.port = 8000
server.bind = '127.0.0.1'
server.event-handler = 'freebsd-kqueue'
server.modules = ('mod_rewrite', 'mod_fastcgi')
server.error-handler-404 = '/test.fcgi'
server.document-root = '/somewhere/web2py'
server.errorlog  = '/tmp/error.log'
fastcgi.server = ('.fcgi' =>
('localhost' =>
('min-procs' => 1,
 'socket'=> '/tmp/fcgi.sock'
)
)
 )
"""

LOGGING = False
SOFTCRON = False

import sys
import os

path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
sys.path = [path] + [p for p in sys.path if not p == path]

import gluon.main
import gluon.contrib.gateways.fcgi as fcgi

if LOGGING:
application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
logfilename='httpserver.log',
profilerfilename=None)
else:
application = gluon.main.wsgibase

if SOFTCRON:
from gluon.settings import global_settings
global_settings.web2py_crontype = 'soft'

fcgi.WSGIServer(application).run()


Agreed, fcgihandler is not from contrib.  I have posted source from my 
fcgihandler.  As previously stated, I modified the bind address on the 
final line.

Notice that fcgi is imported from gluon.contrib.gateways and it is the file 
that chokes when the env is python3

This should function as I have 2 running instances of this right now.  And 
have in the past used this on many other projects.

On Tuesday, November 20, 2018 at 10:38:44 PM UTC-6, 黄祥 wrote:
>
> trying to investigate, but seems the configuration isn't work, step i took
> docker pull ubuntu
> docker run -it ubuntu /bin/bash
>
> apt update
> apt install -y lighttpd python python-fcgi unzip wget 
> mkdir /srv
> cd /srv
> wget -c http://web2py.com/examples/static/web2py_src.zip
> unzip -o web2py_src.zip
> #cp web2py/gluon/contrib/gateways/fcgi.py web2py/
> cp web2py/handlers/fcgihandler.py web2py/
> cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.ori
>
> #chmod 777 /srv/web2py/fcgi.py
> chmod 777 /srv/web2py/fcgihandler.py
>
> echo '' > /var/log/lighttpd/error.log
> cat << EOF > /etc/lighttpd/lighttpd.conf
> server.modules = (
> "mod_access",
> "mod_alias",
> "mod_compress",
> "mod_redirect",
> )
> server.modules += ("mod_fastcgi")
> server.document-root= "/srv/web2py/"
> server.errorlog = "/var/log/lighttpd/error.log"
> server.port = 80
> fastcgi.debug = 1
> \$HTTP["url"] !~ "^/static" {
> fastcgi.server = ( "" => ((
> "bin-path" => "/srv/web2py/fcgihandler.py",
> "check-local" => "disable",
> "socket" => "/tmp/web2py.sock",
> "max-procs" => 4
> )))
> }
> EOF
> service lighttpd restart
> cat /var/log/lighttpd/error.log
>
> fcgi handler is taken from web2py/handlers/ not from 
> web2py/gluon/contrib/gateways, server is run just a couple of second then 
> die. investigate using python2 first, then try python3 but python2 is can't 
> run
>
> best regards,
> stifan
>

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Python3 lighttpd fcgi?

2018-11-20 Thread 黄祥
trying to investigate, but seems the configuration isn't work, step i took
docker pull ubuntu
docker run -it ubuntu /bin/bash

apt update
apt install -y lighttpd python python-fcgi unzip wget 
mkdir /srv
cd /srv
wget -c http://web2py.com/examples/static/web2py_src.zip
unzip -o web2py_src.zip
#cp web2py/gluon/contrib/gateways/fcgi.py web2py/
cp web2py/handlers/fcgihandler.py web2py/
cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.ori

#chmod 777 /srv/web2py/fcgi.py
chmod 777 /srv/web2py/fcgihandler.py

echo '' > /var/log/lighttpd/error.log
cat << EOF > /etc/lighttpd/lighttpd.conf
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
)
server.modules += ("mod_fastcgi")
server.document-root= "/srv/web2py/"
server.errorlog = "/var/log/lighttpd/error.log"
server.port = 80
fastcgi.debug = 1
\$HTTP["url"] !~ "^/static" {
fastcgi.server = ( "" => ((
"bin-path" => "/srv/web2py/fcgihandler.py",
"check-local" => "disable",
"socket" => "/tmp/web2py.sock",
"max-procs" => 4
)))
}
EOF
service lighttpd restart
cat /var/log/lighttpd/error.log

fcgi handler is taken from web2py/handlers/ not from 
web2py/gluon/contrib/gateways, server is run just a couple of second then 
die. investigate using python2 first, then try python3 but python2 is can't 
run

best regards,
stifan

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Python3 lighttpd fcgi?

2018-11-20 Thread zxynax
Lightty config:

server.modules += ("mod_fastcgi")
fastcgi.debug = 1
$HTTP["url"] !~ "^/static" {
fastcgi.server = ( "" => ((

"bin-path" => "/srv/web2py/fcgihandler.py",

"check-local" => "disable",

"socket" => "/tmp/web2py.sock",
"max-procs" => 4
)))
}



The source of fcgihandler.py and gluon/contrib/gateways/fcgi.py is what it 
is from https://mdipierro.pythonanywhere.com/examples/static/web2py_src.zip 
link.
version when I downloaded it is: Version 
2.17.2-stable+timestamp.2018.10.06.18.54.02

I did remove the bindAddress='/tmp/fcgi.sock' from the fcgi.WSGIServer 
line.  But as I mention it works flawlessly when run against python 2.7

I don't have the errors handy but a quick glance through gateways/fcgi.py 
will quickly reveal a great many problems.  0L is no longer valid syntax in 
Python3 and is in several places.  Several of the imports are also not 
valid.
The errors that occur first are the invalid syntax with both the Long 
designation on numeric values and then in many exception lines.  I can 
setup the Python3 stuff and get the stack but I think it's not necessary.

Please advise.

On Tuesday, November 20, 2018 at 6:15:57 PM UTC-6, 黄祥 wrote:
>
> perhaps you can show the error logs and the configuration
>
> best regards,
> stifan
>

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Hierarchy (BOM) using closure table with triggers in DAL?

2018-11-20 Thread BigBaaadBob
Has anyone implemented a closure table with triggers 
 
approach 
to hierarchy (specifically for a Bill of Materials (BOM) pattern) in 
Web2Py's DAL?

I've seen Massimo's implementation of Preorder Traversal which doesn't work 
for BOM patterns where there are multiple roots. The Adjacency Table method 
is slow for large trees.

In a Bill of Materials situation 
,
 
there are multiple roots in the main table, like this:

db.define_table('item',
Field('name', type='string', length=128, label=T('Name')))

db.define_table('bill_of_materials',
Field('parent_item_id', type='reference item', notnull=True, 
label=T('Parent Item')),
Field('child_item_id', type='reference item', notnull=True, 
label=T('Child Item')),
Field('quantity', type='decimal(8,2)', default='1.0', 
label=T('Quantity')))


-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Hierarchy (BOM) using closure table with triggers in DAL?

2018-11-20 Thread BigBaaadBob
Has anyone implemented a closure table with triggers 
 
approach 
to hierarchy (specifically for a Bill of Materials (BOM) pattern) in 
Web2Py's DAL?

I've seen Massimo's implementation of Preorder Traversal which doesn't work 
for BOM patterns where there are multiple roots. The Adjacency Table method 
is slow for large trees.

In a Bill of Materials situation 
,
 
there are multiple roots in the main table, like this:

db.define_table('item',
Field('name', type='string', length=128, label=T('Name')))

db.define_table('bill_of_materials',
Field('parent_item_id', type='reference item', notnull=True, 
label=T('Parent Item')),
Field('child_item_id', type='reference item', notnull=True, 
label=T('Child Item')),
Field('quantity', type='decimal(8,2)', default='1.0', 
label=T('Quantity')))


-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Python3 lighttpd fcgi?

2018-11-20 Thread 黄祥
perhaps you can show the error logs and the configuration

best regards,
stifan

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Migrations

2018-11-20 Thread Dave S


On Tuesday, November 20, 2018 at 8:30:29 AM UTC-8, Ben Duncan wrote:
>
> Is it necessary to enable or even do migrations in the DAL (creating 
> database/ entries) if the database and the tables are already preexisting ? 
>
> Thanks ...
>
> *Ben Duncan*
> DBA / Chief Software Architect 
> Mississippi State Supreme Court
> Electronic Filing Division
>


Let's see if I get it right:

new table design: enable migrations
new field in existing design: enable migrations
new definition, backend has table:enable fake_migrations

/dps

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Python3 lighttpd fcgi?

2018-11-20 Thread zxynax
Have run web2py on lighttpd fcgi for years.  Finally decided to run it with 
Python3 rather than 2.  Fcgi.py from gluon/contrib throws many errors.

So is fcgi not recommended? If so what is the recommended method? 

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Future of web2py

2018-11-20 Thread Fernando Lucas
Did you think about the JS framework, https://aurelia.io/?
Thank's
Fernando Lucas

Em seg, 29 de mai de 2017 às 20:29, Massimo Di Pierro <
massimo.dipie...@gmail.com> escreveu:

> My plan is this
>
> It is based on bottle + gevent + gunicorn + rethinkdb + pydal + vue.js +
> some code ported from web2py (templates, helpers, validators,
> internationalization, scheduler)
>
> Unlike web2py it uses modules not execfile and this makes it 10x faster
> (this part is done) and code it no longer interpreted at every request.
> Only on change.
>
> Routes are declared using decorators like in bottle and flask.
>
> It will use rethinkdb for storing errors, sessions, and anything user
> defined. This allows to scale horizontally. Nothing gets stored on the file
> system any more. Ever. Unless you choose to use sqlite for your app.
>
> No more forms and grids generated server side. Possible and will probably
> backport SQLFrom and Gid but will discourage it. The default client will be
> in vue.js. The forms and grids will be generated client-side based on
> self-documenting APIs. This work must be done. It is not terribly hard just
> pedantic.
>
> It has a redesigned admin. Not necessarily better but leaner. This part is
> also done although it may need restyling.
>
> I am ditching a lot of the web2py auth logic. Nobody really uses groups
> and permissions and the way it is done may not be the best way for
> everybody. Instead I will default to auth0 integration.
>
> From a developer prospective the code will look very similar and I will be
> able to recycle 90% of the documentation.
>
> The problems are that web2py grew a bit bloated and typical programming
> patterns have shifted from postbacks to single page apps with form
> submission via API. Also web2py does not provide enough tools for scaling
> since uses filesystem by default. The new version will do less then current
> web2py but will remedy those issues and make it easier to make responsive
> and scalable apps.
>
> I am conflicted. I could use help to get this done quicker but I do not
> want to post something that is half done people are unhappy with. What I
> would like may not be what everybody likes but I am mostly building this in
> a way that would work well for myself and share in the hope it is useful to
> others. BSD license.
>
> If you are willing to help before the code is made public feel free to
> contact me personally.
>
> Massimo
>
>
>
>
>
>
> On Sunday, 28 May 2017 11:47:49 UTC-5, Oasis Agano wrote:
>>
>>
>> Is the new framework web3py if so when is the official launch?
>> On Sunday, May 28, 2017 at 2:32:01 AM UTC+2, Relsi Maron wrote:
>>>
>>>
>>> Hi Andrea,
>>>
>>> Yes, there will be a future for web2py!
>>>
>>> Web2py will remain being what it is. :)
>>>
>>> A new version, with support for Python 3, is about to come. Even though
>>> Massimo is developing a new framework, Web2py will continue to exist - with
>>> the same purpose for which it was created: to teach development.
>>>
>>> Cheers.
>>>
>>>
>>> Em sábado, 27 de maio de 2017 04:11:02 UTC-3, Andrea Fae' escreveu:

 Hello guys,
 I'd like to know if there will be future of web2py? Any information
 about it?
 Thanks

>>> --
> 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 Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Migrations

2018-11-20 Thread Ben Duncan
Is it necessary to enable or even do migrations in the DAL (creating
database/ entries) if the database and the tables are already preexisting ?

Thanks ...

*Ben Duncan*
DBA / Chief Software Architect
Mississippi State Supreme Court
Electronic Filing Division

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Problem with wsgihandler.py Apache/Python3

2018-11-20 Thread Peter
Check if you have in your application in file appadmin.py code:
try:
  ...
except Exception, e:
  ...

except Exception, e: is python 2 and should be changed to:

except Exception as e:


On Sunday, November 18, 2018 at 7:46:35 PM UTC+1, Dave wrote:
>
> I'm having the same troubles after upgrading to python3 using Apache 
> with libapache2-mod-wsgi-py3 4.5.17-1 on Ubuntu.
>
> I did delete all session files, and I am using fresh source code of web2py 
> (R-2.17.2).
>
> I'm running several applications in web2py, and when i restart Apache they 
> work for a while. Then at some point later, and I haven't figured out what 
> initiates the problem, I am getting:
>
> Traceback (most recent call last):
>   File "/home/ubuntu/mnt/web2py/gluon/main.py", line 445, in wsgibase
> serve_controller(request, response, session)
>   File "/home/ubuntu/mnt/web2py/gluon/main.py", line 207, in 
> serve_controller
> raise HTTP(response.status, page, **response.headers)
> gluon.http.HTTP: 200 OK
>  
> During handling of the above exception, another exception occurred:
>  
> Traceback (most recent call last):
>   File "/home/ubuntu/mnt/web2py/gluon/main.py", line 472, in wsgibase
> BaseAdapter.close_all_instances('commit')
>   File "/home/ubuntu/mnt/web2py/gluon/packages/dal/pydal/connection.py", 
> line 121, in close_all_instances
> db._adapter.close(action)
>   File "/home/ubuntu/mnt/web2py/gluon/packages/dal/pydal/connection.py", 
> line 98, in close
> if len(pool) < self.pool_size:
> TypeError: '<' not supported between instances of 'int' and 'str'
>
>
> In my apache error log I see this:
>
> [Thu Nov 15 04:02:26.546712 2018] [wsgi:error] [pid 9117] [client 
> XXX.XXX.XXX.AA:56599] Timeout when reading response headers from daemon 
> process 'web2pydefault': /home/ubuntu/mnt/web2py/wsgihandler.py
> [Thu Nov 15 04:08:52.161152 2018] [wsgi:error] [pid 9111] [client 
> XXX.XXX.XXX.AB:40713] Timeout when reading response headers from daemon 
> process 'web2pydefault': /home/ubuntu/mnt/web2py/wsgihandler.py
> [Thu Nov 15 04:26:51.746340 2018] [wsgi:error] [pid 8081] [client 
> XXX.XXX.XXX.AC:2960] Timeout when reading response headers from daemon 
> process 'web2pydefault': /home/ubuntu/mnt/web2py/wsgihandler.py
> [Thu Nov 15 04:38:41.429260 2018] [wsgi:error] [pid 8081] [client 
> XXX.XXX.XXX.AD:48360] Timeout when reading response headers from daemon 
> process 'web2pydefault': /home/ubuntu/mnt/web2py/wsgihandler.py
> [Thu Nov 15 04:44:56.502509 2018] [wsgi:error] [pid 7466] [remote 
> XXX.XXX.XXX.AE:7339] mod_wsgi (pid=7466): Exception occurred processing 
> WSGI script '/home/ubuntu/mnt/web2py/wsgihandler.py'.
> [Thu Nov 15 04:44:56.502575 2018] [wsgi:error] [pid 7466] [remote 
> XXX.XXX.XXX.AE:7339] TypeError: sequence of byte string values expected, 
> value of type str found
> [Thu Nov 15 04:50:20.030220 2018] [wsgi:error] [pid 8081] [client 
> XXX.XXX.XXX.AF:33766] Timeout when reading response headers from daemon 
> process 'web2pydefault': /home/ubuntu/mnt/web2py/wsgihandler.py
> [Thu Nov 15 05:00:40.384970 2018] [ssl:warn] [pid 9665] AH01909: 
> XXX.XXX.XXX.AG:443:0 server certificate does NOT include an ID which 
> matches the server name
> [Thu Nov 15 05:00:40.407686 2018] [ssl:warn] [pid 9667] AH01909: 
> XXX.XXX.XXX.AG:443:0 server certificate does NOT include an ID which 
> matches the server name
> [Thu Nov 15 05:03:10.875058 2018] [wsgi:error] [pid 9668] [remote 
> XXX.XXX.XXX.AF:34126] 
> /home/ubuntu/mnt/web2py/gluon/contrib/pymysql/cursors.py:166: Warning: 
> (3090, "Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be 
> removed in a future release.")
> [Thu Nov 15 05:03:10.875093 2018] [wsgi:error] [pid 9668] [remote 
> XXX.XXX.XXX.AF:34126]   result = self._query(query)
>
> Is it possibly related to this?:
>
> stackoverflow: TypeError: sequence of byte string values expected, value 
> of type str found 
> 
>
>
>
> On Saturday, 8 September 2018 12:22:49 UTC-7, Peter wrote:
>>
>> Try to remove all session files. I think that problem is in pickle which 
>> is different in python 2 and python 3 (data type is not same in python 2 
>> and python 3).
>>
>> Use fresh source code of web2py with your application. Don't start web2py 
>> with python 3 after use with python 2. 
>>
>

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Location of SQLFORM.grid pagination code for "count (*)" ?

2018-11-20 Thread Thomas Klopf
Hi Anthony, great thanks a lot for the info!  I'll post a bug report as 
well. 

On Monday, November 19, 2018 at 4:05:30 PM UTC+1, Anthony wrote:
>
> The code used by the grid to generate the DAL query is at 
> https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2351. 
> Notice you can do:
>
> SQLFORM.grid (..., cache_count=my_custom_count_function)
>
> where my_custom_count_function takes the DAL Set object used by the grid 
> to generate the query for the grid as well as request.vars and returns the 
> count. So, you can work around whatever the grid/DAL are doing by writing 
> custom code to calculate the count. Note, although the argument is called 
> cache_count, the function does not actually have to cache the count value 
> -- it can simply fetch the count every time called.
>
> To see how the DAL generates SQL for Oracle, look at 
> https://github.com/web2py/pydal/blob/master/pydal/dialects/oracle.py for 
> Oracle specific syntax as well as 
> https://github.com/web2py/pydal/blob/master/pydal/dialects/base.py#L35 
> for the common dialect from which Oracle inherits.
>
> Finally, after an HTTP request, you can inspect db._timings for a list of 
> all DAL queries made during the request (and the time they took to execute) 
> in order to see the exact SQL generated by the grid to determine the count 
> (db._timings is included in response.toolbar(), which you can temporarily 
> include in your grid view via {{=response.toolbar()}}).
>
> Anthony
>
> On Monday, November 19, 2018 at 8:04:42 AM UTC-5, Thomas Klopf wrote:
>>
>> Hi everyone,
>>   Please could someone point out how/where the pagination works with 
>> SQLFORM.grid?   I found a bug with the Oracle driver, where queries will 
>> fail if you're trying to filter columns that aren't displayed in the 
>> 'fields' list passed to SQLFORM.grid().  Basically I need to get to the 
>> code that generates the 'select count(*)' SQL for finding how to limit the 
>> query for paging.  Oracle is complaining with 'ora-00904 invalid 
>> identifier' with columns that aren't given in the fields argument, when 
>> pagination is needed. 
>>
>>   Anyway I'm doing my best to reverse-engineer the DAL code but I'm lost 
>> now.. 
>>
>> Thanks!
>> -Tom
>>
>>
>>

-- 
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 Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.