Re: [Repoze-dev] Keeping pages out of deliverance's hands
On Apr 13, 2008, at 8:01 PM, Chris McDonough wrote: i see. but in the repoze-podcast you (or tres?) alluded to some such functionality being developed in a separate branch, which i've read here on the list somewhere that that has been merged into the trunk. is there any information on that? perhaps even just a revision number with a commit message? any help would be appreciated, thanks. I *think* this branch was merged back to the trunk: http://codespeak.net/svn/z3/deliverance/branches/urienv/ But if I'm not mistaken it's something that requires that an envvar be set during ingress rather than egress for the middleware to know. I believe this is what you're referring to: http://www.openplans.org/projects/deliverance/lists/deliverance-discussion/archive/2008/02/1203562424829/forum_view I'm pretty sure it is egress. You put a middleware step into the chain just before Deliverance. It then acts as a traffic cop directing Deliverance: - Choose one theme versus another - Choose to not apply a theme (by appending ¬heme to the URL) --Paul___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
Tom Lazar wrote: > On Apr 13, 2008, at 6:20 PM, Chris McDonough wrote: >> Tom Lazar wrote: >>> On 2008-04-13 01:10:08 +0200, Chris McDonough <[EMAIL PROTECTED]> said: Tom Lazar wrote: > On 2008-04-12 22:42:22 +0200, Martin Aspeli > <[EMAIL PROTECTED]> said: > >> Reinout van Rees wrote: >>> Hi all, >>> >>> One thing that's not clear to me: how to keep certain pages out of >>> deliverance's hands? The zmi pages (/manage, /manage_main, etc.) >>> are the >>> ones I'm most interested in at the moment. >>> >>> If I tickle my brain I come up with some irc messages and some >>> emails, >>> but I'm missing the bigger picture, especially after the latest >>> changes. >>> >>> Can someone give me a quick pointer? >> I use a paste composite app where / is a pipeline with deliverance >> in it >> and /admin is a pipeline with plain repoze. It's not perfect for >> all use >> cases, but pretty easy to set up. >> >> I'd like the repoze app to be on /, but have some declarative >> configuration to say e.g. >> >> deliverance.ignore = /manage/.* >> deliverance.ignore = /foo.* >> >> i.e. a regular expression based thing where deliverance would be >> told to >> ignore certain incoming url patterns. > that sounds like something i'd like to have in the webserver config, > i.e. apache or nginx where i would set some sort of headers (just like > in the vhm example) > > i'm new to this, but my gut feeling would be to keep all this sort of > fancy, regex-based rewriting stuff in one place (i.e. the webserver > config) and to use 'straightforward' tests for defined flags or > headers > within the wsgi pipeline. I think the only sane way to do this is to let the application (Plone, or Zope) choose the theme on the way out rather than allowing anything to choose the theme on the way in, as the regexes will get absolutely crazy if you need to do the choosing this way. IOW, there would be no theme specified in middleware or in the webserver config, but Zope would return a header for each response that should be themed a certain way. >>> sounds good. now which header would that be? or IOW which fine >>> manual[tm] should i read? >> >> None yet, I don't think the capability exists. > > i see. but in the repoze-podcast you (or tres?) alluded to some such > functionality being developed in a separate branch, which i've read here > on the list somewhere that that has been merged into the trunk. is there > any information on that? perhaps even just a revision number with a > commit message? any help would be appreciated, thanks. I *think* this branch was merged back to the trunk: http://codespeak.net/svn/z3/deliverance/branches/urienv/ But if I'm not mistaken it's something that requires that an envvar be set during ingress rather than egress for the middleware to know. - C > >> >> >> - C >> >> > ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
Tom Lazar wrote: > On 2008-04-13 01:10:08 +0200, Chris McDonough > <[EMAIL PROTECTED]> said: > >> Tom Lazar wrote: >>> On 2008-04-12 22:42:22 +0200, Martin Aspeli >>> <[EMAIL PROTECTED]> said: >>> Reinout van Rees wrote: > Hi all, > > One thing that's not clear to me: how to keep certain pages out of > deliverance's hands? The zmi pages (/manage, /manage_main, etc.) are the > ones I'm most interested in at the moment. > > If I tickle my brain I come up with some irc messages and some emails, > but I'm missing the bigger picture, especially after the latest changes. > > Can someone give me a quick pointer? I use a paste composite app where / is a pipeline with deliverance in it and /admin is a pipeline with plain repoze. It's not perfect for all use cases, but pretty easy to set up. I'd like the repoze app to be on /, but have some declarative configuration to say e.g. deliverance.ignore = /manage/.* deliverance.ignore = /foo.* i.e. a regular expression based thing where deliverance would be told to ignore certain incoming url patterns. >>> that sounds like something i'd like to have in the webserver config, >>> i.e. apache or nginx where i would set some sort of headers (just like >>> in the vhm example) >>> >>> i'm new to this, but my gut feeling would be to keep all this sort of >>> fancy, regex-based rewriting stuff in one place (i.e. the webserver >>> config) and to use 'straightforward' tests for defined flags or headers >>> within the wsgi pipeline. >> I think the only sane way to do this is to let the application (Plone, or >> Zope) >> choose the theme on the way out rather than allowing anything to choose the >> theme on the way in, as the regexes will get absolutely crazy if you need to >> do >> the choosing this way. IOW, there would be no theme specified in middleware >> or >> in the webserver config, but Zope would return a header for each response >> that >> should be themed a certain way. > > sounds good. now which header would that be? or IOW which fine > manual[tm] should i read? None yet, I don't think the capability exists. - C ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
On Apr 12, 2008, at 7:10 PM, Chris McDonough wrote: Tom Lazar wrote: On 2008-04-12 22:42:22 +0200, Martin Aspeli <[EMAIL PROTECTED]> said: Reinout van Rees wrote: Hi all, One thing that's not clear to me: how to keep certain pages out of deliverance's hands? The zmi pages (/manage, /manage_main, etc.) are the ones I'm most interested in at the moment. If I tickle my brain I come up with some irc messages and some emails, but I'm missing the bigger picture, especially after the latest changes. Can someone give me a quick pointer? I use a paste composite app where / is a pipeline with deliverance in it and /admin is a pipeline with plain repoze. It's not perfect for all use cases, but pretty easy to set up. I'd like the repoze app to be on /, but have some declarative configuration to say e.g. deliverance.ignore = /manage/.* deliverance.ignore = /foo.* i.e. a regular expression based thing where deliverance would be told to ignore certain incoming url patterns. that sounds like something i'd like to have in the webserver config, i.e. apache or nginx where i would set some sort of headers (just like in the vhm example) i'm new to this, but my gut feeling would be to keep all this sort of fancy, regex-based rewriting stuff in one place (i.e. the webserver config) and to use 'straightforward' tests for defined flags or headers within the wsgi pipeline. I think the only sane way to do this is to let the application (Plone, or Zope) choose the theme on the way out rather than allowing anything to choose the theme on the way in, as the regexes will get absolutely crazy if you need to do the choosing this way. IOW, there would be no theme specified in middleware or in the webserver config, but Zope would return a header for each response that should be themed a certain way. I don't think it has to be binary. I can think of plenty of cases where, as you've described, putting that decision in the hands of the application would be great. I can also think of many cases (from personal usage) where there is (or could be) plenty enough information in the response to let the themer make a decision. I like the latter, as don't want to rely on convincing all interesting WSGI apps to embrace Deliverance theme support. The task that we're signed up for from the Plone summit, though, does as you've said -- change Plone to embrace the idea of choosing multiple (or no) "sitethemes". Note that I don't think what's being asked for is to "choose the theme on the way in". I think it is to choose the theme on the way out, based on information available in the environment, including the HTML. --Paul ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
On 2008-04-13 01:10:08 +0200, Chris McDonough <[EMAIL PROTECTED]> said: > Tom Lazar wrote: >> On 2008-04-12 22:42:22 +0200, Martin Aspeli >> <[EMAIL PROTECTED]> said: >> >>> Reinout van Rees wrote: Hi all, One thing that's not clear to me: how to keep certain pages out of deliverance's hands? The zmi pages (/manage, /manage_main, etc.) are the ones I'm most interested in at the moment. If I tickle my brain I come up with some irc messages and some emails, but I'm missing the bigger picture, especially after the latest changes. Can someone give me a quick pointer? >>> I use a paste composite app where / is a pipeline with deliverance in it >>> and /admin is a pipeline with plain repoze. It's not perfect for all use >>> cases, but pretty easy to set up. >>> >>> I'd like the repoze app to be on /, but have some declarative >>> configuration to say e.g. >>> >>> deliverance.ignore = /manage/.* >>> deliverance.ignore = /foo.* >>> >>> i.e. a regular expression based thing where deliverance would be told to >>> ignore certain incoming url patterns. >> >> that sounds like something i'd like to have in the webserver config, >> i.e. apache or nginx where i would set some sort of headers (just like >> in the vhm example) >> >> i'm new to this, but my gut feeling would be to keep all this sort of >> fancy, regex-based rewriting stuff in one place (i.e. the webserver >> config) and to use 'straightforward' tests for defined flags or headers >> within the wsgi pipeline. > > I think the only sane way to do this is to let the application (Plone, or > Zope) > choose the theme on the way out rather than allowing anything to choose the > theme on the way in, as the regexes will get absolutely crazy if you need to > do > the choosing this way. IOW, there would be no theme specified in middleware > or > in the webserver config, but Zope would return a header for each response that > should be themed a certain way. sounds good. now which header would that be? or IOW which fine manual[tm] should i read? thanks, tom > > - C -- Tom Lazar http://tomster.org ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
Tom Lazar wrote: > On 2008-04-12 22:42:22 +0200, Martin Aspeli > <[EMAIL PROTECTED]> said: > >> Reinout van Rees wrote: >>> Hi all, >>> >>> One thing that's not clear to me: how to keep certain pages out of >>> deliverance's hands? The zmi pages (/manage, /manage_main, etc.) are the >>> ones I'm most interested in at the moment. >>> >>> If I tickle my brain I come up with some irc messages and some emails, >>> but I'm missing the bigger picture, especially after the latest changes. >>> >>> Can someone give me a quick pointer? >> I use a paste composite app where / is a pipeline with deliverance in it >> and /admin is a pipeline with plain repoze. It's not perfect for all use >> cases, but pretty easy to set up. >> >> I'd like the repoze app to be on /, but have some declarative >> configuration to say e.g. >> >> deliverance.ignore = /manage/.* >> deliverance.ignore = /foo.* >> >> i.e. a regular expression based thing where deliverance would be told to >> ignore certain incoming url patterns. > > that sounds like something i'd like to have in the webserver config, > i.e. apache or nginx where i would set some sort of headers (just like > in the vhm example) > > i'm new to this, but my gut feeling would be to keep all this sort of > fancy, regex-based rewriting stuff in one place (i.e. the webserver > config) and to use 'straightforward' tests for defined flags or headers > within the wsgi pipeline. I think the only sane way to do this is to let the application (Plone, or Zope) choose the theme on the way out rather than allowing anything to choose the theme on the way in, as the regexes will get absolutely crazy if you need to do the choosing this way. IOW, there would be no theme specified in middleware or in the webserver config, but Zope would return a header for each response that should be themed a certain way. - C ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
On 2008-04-12 22:42:22 +0200, Martin Aspeli <[EMAIL PROTECTED]> said: > Reinout van Rees wrote: >> Hi all, >> >> One thing that's not clear to me: how to keep certain pages out of >> deliverance's hands? The zmi pages (/manage, /manage_main, etc.) are the >> ones I'm most interested in at the moment. >> >> If I tickle my brain I come up with some irc messages and some emails, >> but I'm missing the bigger picture, especially after the latest changes. >> >> Can someone give me a quick pointer? > > I use a paste composite app where / is a pipeline with deliverance in it > and /admin is a pipeline with plain repoze. It's not perfect for all use > cases, but pretty easy to set up. > > I'd like the repoze app to be on /, but have some declarative > configuration to say e.g. > > deliverance.ignore = /manage/.* > deliverance.ignore = /foo.* > > i.e. a regular expression based thing where deliverance would be told to > ignore certain incoming url patterns. that sounds like something i'd like to have in the webserver config, i.e. apache or nginx where i would set some sort of headers (just like in the vhm example) i'm new to this, but my gut feeling would be to keep all this sort of fancy, regex-based rewriting stuff in one place (i.e. the webserver config) and to use 'straightforward' tests for defined flags or headers within the wsgi pipeline. just my $0.02, tom > > Martin -- Tom Lazar http://tomster.org ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
On 2008-04-12 22:29:04 +0200, Paul Everitt <[EMAIL PROTECTED]> said: > Tom Lazar wrote: >> On 2008-03-12 14:58:14 +0100, Tres Seaver >> <[EMAIL PROTECTED]> said: >> >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> Reinout van Rees wrote: Paul Everitt schreef: > Tres made a "urienv" branch for Deliverance that allows you to put a > middleware step in front of Deliverance to control which theme gets set. That is the one that is now merged back to trunk, right? >>> Yes. >>> > However, what you want is simpler: you can write a middleware step that > sets the "notheme" flag on the query string. Hey, neat. Didn't know that one :-) Works like a charm in the browser at least. For making a middleware step: does anyone know a paster skeleton for that? Googling for paster skeletons for creating stuff that is to be used by paster is a bit hard :-) >>> Nope, we've just started for existing examples. >> >> does anybody have a working example of this? i would a) need the >> functionality and b) it sounds like an excellent starting point to >> write simple middleware. > > Does "this" == paster skeletons, or the Deliverance keep-your-hands-off > thing? ah, good question (as i now realize) i meant the keep-your-hands-off thing[tm] ;-) thanks for asking, tom > > -Paul -- Tom Lazar http://tomster.org ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
Reinout van Rees wrote: > Hi all, > > One thing that's not clear to me: how to keep certain pages out of > deliverance's hands? The zmi pages (/manage, /manage_main, etc.) are the > ones I'm most interested in at the moment. > > If I tickle my brain I come up with some irc messages and some emails, > but I'm missing the bigger picture, especially after the latest changes. > > Can someone give me a quick pointer? I use a paste composite app where / is a pipeline with deliverance in it and /admin is a pipeline with plain repoze. It's not perfect for all use cases, but pretty easy to set up. I'd like the repoze app to be on /, but have some declarative configuration to say e.g. deliverance.ignore = /manage/.* deliverance.ignore = /foo.* i.e. a regular expression based thing where deliverance would be told to ignore certain incoming url patterns. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
Tom Lazar wrote: > On 2008-03-12 14:58:14 +0100, Tres Seaver > <[EMAIL PROTECTED]> said: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Reinout van Rees wrote: >>> Paul Everitt schreef: Tres made a "urienv" branch for Deliverance that allows you to put a middleware step in front of Deliverance to control which theme gets set. >>> That is the one that is now merged back to trunk, right? >> Yes. >> However, what you want is simpler: you can write a middleware step that sets the "notheme" flag on the query string. >>> Hey, neat. Didn't know that one :-) Works like a charm in the browser at >>> least. >>> >>> >>> For making a middleware step: does anyone know a paster skeleton for >>> that? Googling for paster skeletons for creating stuff that is to be >>> used by paster is a bit hard :-) >> Nope, we've just started for existing examples. > > does anybody have a working example of this? i would a) need the > functionality and b) it sounds like an excellent starting point to > write simple middleware. Does "this" == paster skeletons, or the Deliverance keep-your-hands-off thing? -Paul ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
On 2008-03-12 14:58:14 +0100, Tres Seaver <[EMAIL PROTECTED]> said: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Reinout van Rees wrote: >> Paul Everitt schreef: >>> Tres made a "urienv" branch for Deliverance that allows you to put a >>> middleware step in front of Deliverance to control which theme gets set. >> >> That is the one that is now merged back to trunk, right? > > Yes. > >>> However, what you want is simpler: you can write a middleware step that >>> sets the "notheme" flag on the query string. >> >> Hey, neat. Didn't know that one :-) Works like a charm in the browser at >> least. >> >> >> For making a middleware step: does anyone know a paster skeleton for >> that? Googling for paster skeletons for creating stuff that is to be >> used by paster is a bit hard :-) > > Nope, we've just started for existing examples. does anybody have a working example of this? i would a) need the functionality and b) it sounds like an excellent starting point to write simple middleware. > > > > Tres. > - -- > === > Tres Seaver +1 540-429-0999 > [EMAIL PROTECTED] > Palladion Software "Excellence by Design"http://palladion.com > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFH1+F2+gerLs4ltQ4RAhasAKCvlWOuGeitUz25cbaRHsh+7QHaPQCcCy7J > pQuLOcyGEC8MewEDqNF5oIE= > =6q3+ > -END PGP SIGNATURE- -- Tom Lazar http://tomster.org ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Reinout van Rees wrote: > Paul Everitt schreef: >> Tres made a "urienv" branch for Deliverance that allows you to put a >> middleware step in front of Deliverance to control which theme gets set. > > That is the one that is now merged back to trunk, right? Yes. >> However, what you want is simpler: you can write a middleware step that >> sets the "notheme" flag on the query string. > > Hey, neat. Didn't know that one :-) Works like a charm in the browser at > least. > > > For making a middleware step: does anyone know a paster skeleton for > that? Googling for paster skeletons for creating stuff that is to be > used by paster is a bit hard :-) Nope, we've just started for existing examples. Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH1+F2+gerLs4ltQ4RAhasAKCvlWOuGeitUz25cbaRHsh+7QHaPQCcCy7J pQuLOcyGEC8MewEDqNF5oIE= =6q3+ -END PGP SIGNATURE- ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
Paul Everitt schreef: > > Tres made a "urienv" branch for Deliverance that allows you to put a > middleware step in front of Deliverance to control which theme gets set. That is the one that is now merged back to trunk, right? > However, what you want is simpler: you can write a middleware step that > sets the "notheme" flag on the query string. Hey, neat. Didn't know that one :-) Works like a charm in the browser at least. For making a middleware step: does anyone know a paster skeleton for that? Googling for paster skeletons for creating stuff that is to be used by paster is a bit hard :-) Reinout -- Reinout van Rees Blog: http://vanrees.org/weblog/ [EMAIL PROTECTED] Work: http://zestsoftware.nl/ http://vanrees.org Video: http://reinout.blip.tv/ ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] Keeping pages out of deliverance's hands
Tres made a "urienv" branch for Deliverance that allows you to put a middleware step in front of Deliverance to control which theme gets set. However, what you want is simpler: you can write a middleware step that sets the "notheme" flag on the query string. On the Deliverance list we started talking about points such as finding a way to make theme switching part of configuration. We're open to ideas. --Paul On Mar 11, 2008, at 7:25 AM, Reinout van Rees wrote: Hi all, One thing that's not clear to me: how to keep certain pages out of deliverance's hands? The zmi pages (/manage, /manage_main, etc.) are the ones I'm most interested in at the moment. If I tickle my brain I come up with some irc messages and some emails, but I'm missing the bigger picture, especially after the latest changes. Can someone give me a quick pointer? Reinout -- Reinout van Rees Blog: http://vanrees.org/weblog/ [EMAIL PROTECTED] Work: http://zestsoftware.nl/ http://vanrees.org Video: http://reinout.blip.tv/ ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev