hi,

i've tested it using coalesce but the result is not my expected (only print 
sub category).
*coalesce in controller*
    categories=db((db.category.is_active==True) & 
                  
(db.category.parent.coalesce(db.category.category))).select(
                                                      
orderby=db.category.category, 
                                                      cache=(cache.ram, 10))

*the other is :*
*in controller*
def left_sidebar():
    
categories=db(db.category.is_active==True).select(orderby=db.category.category, 
                                                      cache=(cache.ram, 10))
    return dict(categories=categories)

*in view*
{{for i,category in enumerate(categories):}}
    {{=DIV(category.category)}}
    {{for parent in 
db(category.parent==category.category).select(orderby=category.category):}}
        {{=DIV(UL(LI(parent.parent)))}}
{{pass}}

and got an error :
TRACEBACK

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.

Traceback (most recent call last):
  File "/host/Downloads/web2py/gluon/rocket.py", line 1337, in run
    self.run_app(conn)
  File "/host/Downloads/web2py/gluon/rocket.py", line 1830, in run_app
    self.environ = environ = self.build_environ(sock_file, conn)
  File "/host/Downloads/web2py/gluon/rocket.py", line 1650, in build_environ
    request = self.read_request_line(sock_file)
  File "/host/Downloads/web2py/gluon/rocket.py", line 1401, in read_request_line
    raise SocketTimeout('Socket timed out before request.')
SocketTimeout: Socket timed out before request.

any idea or solution how to solve this?

thank you very much

-- 

--- 
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/groups/opt_out.


Reply via email to