Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev
REQUEST vs. request
 

Index | Next | Previous | View Flat


do3ccqrv at googlemail

Jun 16, 2009, 1:35 PM


Views: 615
Permalink
REQUEST vs. request

Hello,

I am a bit confused about self.request and self.REQUEST.
Can anybody point me to an explanation of the different tasks that both
have?
Googling for request vs REQUEST is not helpful...

Here is the reason why I am wondering:

Context is a small product to be used in plone.

A testcase in my code fails, and after a lot of digging, I am finding that
the reason are wrong results from the catalog. The catalog returns bad
results because he caches the results in the request.
My test consists of a number of steps, for multiple times I do a
getMultiAdapter, always with fresh TestRequests. Still it seems, that the
catalog always use some other, rotten REQUEST.

When stepping through, I see this happening:
1. my BrowserView calls something like self.context.portal_catalog(kw)
There is no request as an argument
2. The method I call wants that as a positional argument, but has None as
the default value
That None value gets passed on.
3. In Products.ZCatalog.Catalog:searchResults the code checks whether the
REQUEST
variable is None, and if so, retrieves self.REQUEST. self.REQUEST ist
the rotten
REQUEST, self.request would still be available
4. Total chaos is ensured

I can imagine more than one way to fix it, but I don't understand the
difference and reasoning sufficiently to decide, what would be the right(tm)
way to fix it.

Any points will be really appreciated!

Best regards,

Patrick

Subject User Time
REQUEST vs. request do3ccqrv at googlemail Jun 16, 2009, 1:35 PM
    Re: REQUEST vs. request optilude+lists at gmail Jun 16, 2009, 5:50 PM
        Re: REQUEST vs. request aclark at aclark Jun 17, 2009, 5:38 AM
            Re: REQUEST vs. request hanno at hannosch Jun 17, 2009, 5:47 AM
            Re: REQUEST vs. request hanno at hannosch Jun 17, 2009, 5:47 AM
    Re: REQUEST vs. request reinout at vanrees Jun 22, 2009, 1:40 AM
    Re: REQUEST vs. request hanno at hannosch Jun 22, 2009, 3:18 AM
    Re: REQUEST vs. request do3ccqrv at googlemail Jun 22, 2009, 3:47 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.