On Fri, 2008-11-14 at 00:39 -0800, ershadul wrote:
> Dear Steve Holden,
> Please consider the following block i wrote:
>
> def process_request(self, request):
> request.db_session = session()
> request.db_session.time_stamp = str(datetime.datetime.now())
> print
Dear Steve Holden,
Please consider the following block i wrote:
def process_request(self, request):
request.db_session = session()
request.db_session.time_stamp = str(datetime.datetime.now())
print 'process_request', request.db_session.time_stamp
def
ershadul wrote:
> Dear ,
> I dont know whether my process_request() is being called or not?
> Can you inform me please, how can i verify that my middleware's
> process_request() is called ?
>
> On Nov 12, 4:42 am, Steve Holden <[EMAIL PROTECTED]> wrote:
>> ershadul wrote:
>>> Dear all,
>>>
Dear ,
I dont know whether my process_request() is being called or not?
Can you inform me please, how can i verify that my middleware's
process_request() is called ?
On Nov 12, 4:42 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> ershadul wrote:
> > Dear all,
> > please consider the following
I also wrote middleware for SQLAlchemy--I'd post it, but it depends on
other libraries that I wrote that I can't really share. What I found
is that, at least while using the dev server, the process_response
method would get called when serving media files, even if the
process_request hadn't.
ershadul wrote:
> Dear all,
> please consider the following code-block:
>
> class SQLAlchemySessionMiddleware(object):
> """
> This class instantiates a sqlalchemy session and destroys
> """
> def process_request(self, request):
> request.db_session = session()
>
Dear all,
please consider the following code-block:
class SQLAlchemySessionMiddleware(object):
"""
This class instantiates a sqlalchemy session and destroys
"""
def process_request(self, request):
request.db_session = session()
return None
def
7 matches
Mail list logo