[Repoze-dev] recursive macro problem with Chameleon zpt, bug? implementation issue?

2011-04-24 Thread Iain Duncan
Apologies for the cross post ( and direct post), not sure whether this should be in Pylons discuss or Repoze these days. I'm trying to use a recursive metal macro in a zpt template in a pyramid app, from what I can tell, the following should work, but I don't know what' wrong:

Re: [Repoze-dev] bfg chameleon unicode crash with wrapper views

2010-12-16 Thread Iain Duncan
On Thu, Dec 16, 2010 at 12:47 PM, Chris McDonough wrote: > On Thu, 2010-12-16 at 12:42 -0800, Iain Duncan wrote: > > Oops I copied a traceback from one of my attempts at fixing it. > > > > > > > > Tres, that worked, thanks. I'm curious why it's nec

Re: [Repoze-dev] bfg chameleon unicode crash with wrapper views

2010-12-16 Thread Iain Duncan
bled on Plone, for instance. > > \malthe > > On 16 December 2010 14:47, Tres Seaver wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On 12/15/2010 10:18 PM, Iain Duncan wrote: > >> Not sure where I'm supposed to ask this no

[Repoze-dev] bfg chameleon unicode crash with wrapper views

2010-12-15 Thread Iain Duncan
Not sure where I'm supposed to ask this now, here? Pyramid list? I have view with a chameleon template that contains utf-8 unicode special chars. It renders fine when rendered on it's own from a view. As soon as I wrap that view with a wrapper view, I get errors with the wrapper choking on the un

[Repoze-dev] making a new zcml directive in repoze.bfg

2010-11-19 Thread Iain Duncan
Hi, I'm trying to make a new directive to simplify some repetitive stuff in my app/framework thing built on bfg. I could have sworn I read something on this topic at some point but am having problems finding it. I have found docs on doing it in zope 3 but wanted to check whether there is anything d

Re: [Repoze-dev] entry points vs ZCA registrations

2010-11-15 Thread Iain Duncan
>> On 11/14/10 05:32 , Shane Hathaway wrote: >> > On 11/12/2010 03:17 PM, Iain Duncan wrote: >> >> Reading some of the diaolgue on the pylons/bfg merger has me curious >> >> about the following, wondering if any experts care to share opinions >> and &g

[Repoze-dev] entry points vs ZCA registrations

2010-11-12 Thread Iain Duncan
Reading some of the diaolgue on the pylons/bfg merger has me curious about the following, wondering if any experts care to share opinions and war stories: - what is the best use case for extending through entry points? - why/when would you use entry points and entires in an ini file vs registering

Re: [Repoze-dev] anyone know a good editor for BFG book?

2010-11-09 Thread Iain Duncan
I would. I don't have any formal qualifications but have worked in the book business, taught, and can write very well. I also have experience with Django, Zope 3, Pylons, TG, and repoze.bfg, and have read the major books on most of them so I might be good for perspective. Won't be at all offended i

Re: [Repoze-dev] repoze.bfg is now Pyramid

2010-11-09 Thread Iain Duncan
This just totally made my day! Way to go guys. Iain On Sat, Nov 6, 2010 at 6:39 AM, Luciano Ramalho wrote: > On Fri, Nov 5, 2010 at 6:16 PM, Martin Aspeli > > > wrote: > > Can I just say this is an almost unheard of degree of maturity and > > pragmatism for a framework author to display. I'm v

Re: [Repoze-dev] repoze.bfg random intermittent server errors fetching static resources

2010-08-20 Thread Iain Duncan
have them served by Apache. thanks iain On Thu, Aug 19, 2010 at 5:16 AM, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Iain Duncan wrote: > > On Wed, Aug 18, 2010 at 4:28 PM, Chris Withers >wrote: > > > >> Iain Duncan wrote: >

Re: [Repoze-dev] bfg concurrency problem with SqlAlchemy, SOLVED

2010-08-18 Thread Iain Duncan
f you make a call to clear_mappers in one thread you kill them in another concurrently requesting threadl. I need to make a utility that globally makes my mappers at server startup and leave them alone. hope that helps someone sometime. Iain On Wed, Aug 18, 2010 at 9:19 PM, Iain Duncan wrote: >

[Repoze-dev] bfg concurrency problem with SqlAlchemy, uh-oh

2010-08-18 Thread Iain Duncan
I'm sure this is my fault, but hoping someone has helpful suggestions. have figured out that my weird issue happens when two requests hit the paster server serving my app too quickly. When I put a breakpoint in my javascript debugger, and manually separate the ajax requests in time, I don't have a

Re: [Repoze-dev] repoze.bfg random intermittent server errors fetching static resources

2010-08-18 Thread Iain Duncan
On Wed, Aug 18, 2010 at 4:28 PM, Chris Withers wrote: > Iain Duncan wrote: > >> FWIW, I can sit there and hit reload, and get totally different responses >> randomly, sometimes my bfg methods return what they are supposed to, and >> others I get the 500s. >> Could th

Re: [Repoze-dev] repoze.bfg random intermittent server errors fetching static resources

2010-08-18 Thread Iain Duncan
On Wed, Aug 18, 2010 at 4:26 PM, Iain Duncan wrote: > Maybe some of this well help, I'm serving with paster serve --reload ( > though removing reload doesn't seem to help ). > > It definitely seems like paster and/or bfg are not keeping up for some > reason ( could be me!

Re: [Repoze-dev] repoze.bfg random intermittent server errors fetching static resources

2010-08-18 Thread Iain Duncan
Maybe some of this well help, I'm serving with paster serve --reload ( though removing reload doesn't seem to help ). It definitely seems like paster and/or bfg are not keeping up for some reason ( could be me! ). In my calendar app, a ton of static requests are made very quickly to get all the bi

[Repoze-dev] repoze.bfg random intermittent server errors fetching static resources

2010-08-18 Thread Iain Duncan
Hi everyone, I have an app that I have set up to use the bfg resources facility for serving static files. I'm pretty sure I've done it right, because most of the time everything works. However, a lot of the time, seemingly random static request just get served up an internal server error 500 by bf

[Repoze-dev] strange error with repoze.bfg route_url and chameleon

2010-06-13 Thread Iain Duncan
Hi folks, I'm getting a really weird error wondering if anyone might have experienced anything like it. I made a view url building helper, url_for. It uses the route name, and builds the correct url for the resource, where this route is a hybrid route with traversal. My helper works fine, when I l

Re: [Repoze-dev] url dispatch, args, matchdicts

2010-06-02 Thread Iain Duncan
> > > > Hmm, what about adding another optional param to route tags? something > like > > use_global_views, but as a flag for the passing in named args > > automatically? I would think a lot of people coming to bfg from other > > frameworks and using it as a micro-framework would really like that.

Re: [Repoze-dev] url dispatch, args, matchdicts

2010-06-02 Thread Iain Duncan
> > Iain Duncan wrote: > > Hi bfg folks, one feature I miss from pylons is having elements from the > > route parsing be automatically passed to controller methods as named > args. I > > expect this got some thought and was decided against, I'm curious why? It >

[Repoze-dev] url dispatch, args, matchdicts

2010-06-02 Thread Iain Duncan
Hi bfg folks, one feature I miss from pylons is having elements from the route parsing be automatically passed to controller methods as named args. I expect this got some thought and was decided against, I'm curious why? It seems to me it would be nice if this route: would automatically pass baz

Re: [Repoze-dev] mysterious repoze.who problem (SOLVED)

2010-06-01 Thread Iain Duncan
On Tue, Jun 1, 2010 at 10:50 PM, Iain Duncan wrote: > I know this is not enough info for a real diagnosis, but thought maybe > someone would be able to say where I might look for issues from a > description. > > I wrote a bfg app using repoze.who, and it uses a custom authenticati

[Repoze-dev] mysterious repoze.who problem

2010-06-01 Thread Iain Duncan
I know this is not enough info for a real diagnosis, but thought maybe someone would be able to say where I might look for issues from a description. I wrote a bfg app using repoze.who, and it uses a custom authentication plugin. In the apps zcml I'm using My authentication plugin is working fi

[Repoze-dev] BFG, override configurator settings after Config construction

2010-04-24 Thread Iain Duncan
Hi folks, I'm wondering if it's possible to change configurator settings after the constructor has fired and a zcml file has been parsed. Specifically I'd like to be able to use my regular zcml file but then turn off the authentication and authorization policy, something like this ( which didn't wo

[Repoze-dev] wrapped views and http redirects

2010-04-23 Thread Iain Duncan
I got my wrapped views working well, but I noticed that if the wrappee issues returns a 302 Found, instead of it being followed, now the wrapper just acts like all is normal but the wrapped body is empty. Can anyone shed some light on how one can handle redirects properly when using wrapped views?

Re: [Repoze-dev] wrapped views for routes?

2010-04-23 Thread Iain Duncan
awesome, thanks! On Wed, Apr 21, 2010 at 2:32 AM, Wichert Akkerman wrote: > On 4/21/10 11:23 , Chris McDonough wrote: > > The spelling: > > > > > > > > Is syntactic candy that can also be spelled like this: > > > > > > > > > > So you can probably do this: > > > > > > > >

Re: [Repoze-dev] Want to contribute an application developed using Repoze.BFG

2010-04-23 Thread Iain Duncan
But definitely more sample apps would be awesome to have. BFG is so flexible that I have found looking at the sample apps an excellent way to learn how to structure my project(s). Iain On Sun, Apr 18, 2010 at 6:44 AM, Chris McDonough wrote: > On 4/18/10 6:09 AM, Srikanth T wrote: > > > > Dear C

[Repoze-dev] wrapped views for routes?

2010-04-20 Thread Iain Duncan
Is there any chance of having wrapped views work on views declared with ? ( IE declare a wrapper predicate on a route in zcml ) Seems like it would be handy to be able to do so. thanks Iain ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://

[Repoze-dev] INewRequest subscriber DBSession question

2010-04-20 Thread Iain Duncan
Hi folks, I noticed that in the new version of the BFGAlchemy sample app, the transaction manager is used to clear out the session after the transaction is done. I'm wondering whether there is anything wrong with cleaning the session by call Session.remove() in the INewRequest subscriber directly (

Re: [Repoze-dev] GAE or other 'cloud' choices for bfg apps?

2010-04-14 Thread Iain Duncan
Also curious about the economics of cloud deployment vs renting servers, input welcome. Iain On Wed, Apr 14, 2010 at 4:46 PM, Iain Duncan wrote: > Hey all, I have an app that eventually is intended to be used as a > subscriber service. I'm totally new to the cloud thing, w

[Repoze-dev] GAE or other 'cloud' choices for bfg apps?

2010-04-14 Thread Iain Duncan
Hey all, I have an app that eventually is intended to be used as a subscriber service. I'm totally new to the cloud thing, wondering if experienced bfg'ers would like to weigh in with their experiences - what is your preferred cloud deployment for bfg apps? - what persistence mechanism gets used?

Re: [Repoze-dev] ZCA registry confusion

2010-04-13 Thread Iain Duncan
On Tue, Apr 13, 2010 at 7:10 PM, Chris McDonough wrote: > On 4/13/10 9:22 PM, Iain Duncan wrote: > >> >> Ok, I think a better way to phrase mine is: >> >> - is it safe and/or reasonable to use the repoze.bfg configurator to >> setup up the global ZCA registr

Re: [Repoze-dev] ZCA registry confusion

2010-04-13 Thread Iain Duncan
On Tue, Apr 13, 2010 at 5:27 PM, Chris McDonough wrote: > On 4/13/10 7:20 PM, Iain Duncan wrote: > >> Thanks Chris. So am I safe in assuming that if I use the bfg >> Configurator, I can use that global registry just fine in non-bfg >> components/modules/middleware as i

[Repoze-dev] ZCA registry confusion

2010-04-13 Thread Iain Duncan
Hi, I have some custom middleware that is intended to use the same ZCA registry as my bfg app. I've altered the run.py in the bfg app to tell it to use the global site manager, and the middleware looks up utilities by doing self.gsm = getGlobalSiteManager() self.gsm.queryUtility etc This is all w

Re: [Repoze-dev] passing root_factory to a route in a hybrid BFG app?

2010-04-12 Thread Iain Duncan
ctory" (see > http://docs.repoze.org/bfg/1.2/zcml/route.html#attributes). If you > remember, > can you point out where you got "root_factory" from so I can fix it in that > spot? > > On 4/12/10 4:02 PM, Iain Duncan wrote: > > Haven't heard anything back from my '

[Repoze-dev] passing root_factory to a route in a hybrid BFG app?

2010-04-12 Thread Iain Duncan
Haven't heard anything back from my 'maybe a bug' email, so I'm wondering if anyone is successfully passing alternate root_factory arguments to routes in zcml in hybrid bfg apps with BFG 1.2? Ie, is this a user error? thanks! Iain ___ Repoze-dev mailing

Re: [Repoze-dev] recommended way to do session variables in a bfg app?

2010-04-11 Thread Iain Duncan
s/zodbsessions/index.html > > Carlos de la Guardia > > On Sun, Apr 11, 2010 at 2:10 PM, Iain Duncan > wrote: > > Wondering about using session variables in a bfg app. I didn't find any > > mention of it in the docs, so I assume it's something handled outside of &g

[Repoze-dev] possibly a bug, can't pass root_factory to in 1.2

2010-04-11 Thread Iain Duncan
Don't know if I'm missing something, the docs are out of sync with the code, or there is a bug, but this in my zcml for a 1.2 app: is getting me the following traceback on startup: Traceback (most recent call last): File "/home/iain/www/bfgenv/bin/paster", line 8, in load_entry_point('P

[Repoze-dev] recommended way to do session variables in a bfg app?

2010-04-11 Thread Iain Duncan
Wondering about using session variables in a bfg app. I didn't find any mention of it in the docs, so I assume it's something handled outside of bfg. Is the crustimony proceedcake just to add Beaker to the middleware stack and use it directly? thanks Iain __

Re: [Repoze-dev] getting at the ZCAS registry used by a bfg app

2010-04-09 Thread Iain Duncan
> > > My standard answer about sharing registries: if your middleware requires > ZCA access to the same ZCA registry (or any other configuration that doesn't > come in the environ) as your application does to work, it is not middleware > and probably shouldn't be written *as* middleware or a plugin

[Repoze-dev] possible error in http://docs.repoze.org/bfg/1.2/narr/zca.html

2010-04-09 Thread Iain Duncan
Hey Chris ( et al ), when I copied the example in http://docs.repoze.org/bfg/1.2/narr/zca.html with this: def app(global_settings, **settings): globalreg = getGlobalSiteManager() config = Configurator(registry=globalreg) config.setup_registry(settings=settings) config.hook_zca()

Re: [Repoze-dev] getting at the ZCAS registry used by a bfg app

2010-04-09 Thread Iain Duncan
Hmm, now I don't know which method to use though. Perhaps a good addition to that page would be some brief insight on when one would use the global site manager vs the current site manager. I'm not clear whether I should tell bfg to use the global site manager and use that in the cousin code, or h

Re: [Repoze-dev] getting at the ZCAS registry used by a bfg app

2010-04-09 Thread Iain Duncan
On Fri, Apr 9, 2010 at 2:58 PM, Chris McDonough wrote: > Can you read http://docs.repoze.org/bfg/1.2/narr/zca.html to see if it > answers your question? It does, thanks, I guess I had not followed that link yet in the docs. And these new features make me very happy, my inter-framework app int

Re: [Repoze-dev] getting at the ZCAS registry used by a bfg app

2010-04-09 Thread Iain Duncan
typo in subject line, that should say ZCA not ZCAS (duh) ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev

[Repoze-dev] getting at the ZCAS registry used by a bfg app

2010-04-09 Thread Iain Duncan
Hi everyone, I remember asking this a while back and at that point there was no easy solution but it seems like BFG has many new features since then. Is there a straightforward way to get at registry populated on startup, from python code? For example, I hoped this would work, but it does not: g

Re: [Repoze-dev] repoze.who API question

2010-04-09 Thread Iain Duncan
If you do that ( make a convenience method ) maybe one for 'forget' could be done at the same time? I'm loving repoze.who now that I'm finally getting my head around it. Iain On Fri, Mar 12, 2010 at 8:55 PM, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Chris Grindst

[Repoze-dev] repoze.who form plugin configuration question

2010-04-09 Thread Iain Duncan
Hi folks, I'm working my way through the repoze.who configuration that is in the cluegun sample app. I would like to supply my own formcallable for generating a custom login form, so I tried the adding the following in who.ini formcallable = authexamp.auth_views.login_form form_callable = authexa

Re: [Repoze-dev] deprecation of zcml for?

2010-04-08 Thread Iain Duncan
docs, they are excellent and super clear, but I feel like it's harder to make the connection with the under-the-hood Zope based principals than it could be. Thanks for all your work on the excellent documentation. Iain On Thu, Apr 8, 2010 at 8:31 AM, Chris McDonough wrote: > On 4/8/

Re: [Repoze-dev] repoze.who in the cluegun sample app

2010-04-07 Thread Iain Duncan
thanks, that did it. On Wed, Apr 7, 2010 at 2:15 PM, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Iain Duncan wrote: > > I think I must be missing something really obvious, help appreciated. I > > downloaded and installed the cluegun sample ap

Re: [Repoze-dev] deprecation of zcml for?

2010-04-07 Thread Iain Duncan
sed a totally Zope like layout, with for="ISomeInterface". thanks for listening Iain On Wed, Apr 7, 2010 at 9:47 PM, Chris McDonough wrote: > On 4/8/10 12:18 AM, Iain Duncan wrote: > >> Further to this, I just noticed that the cluegun sample app uses 'for', >>

Re: [Repoze-dev] deprecation of zcml for?

2010-04-07 Thread Iain Duncan
Further to this, I just noticed that the cluegun sample app uses 'for', so maybe it would also help people checking out the sample apps and the 1.2 docs if 'for' where mentioned. thanks iain On Wed, Apr 7, 2010 at 12:15 PM, Iain Duncan wrote: > > On Wed, Apr 7, 2010 a

[Repoze-dev] repoze.who in the cluegun sample app

2010-04-07 Thread Iain Duncan
I think I must be missing something really obvious, help appreciated. I downloaded and installed the cluegun sample app to look at the 'simple repoze.who integration'. I see the who.ini file, and it looks to my untutored eye like who is being included in the pipeline, but when I start the app with

Re: [Repoze-dev] deprecation of zcml for?

2010-04-07 Thread Iain Duncan
On Wed, Apr 7, 2010 at 6:52 AM, Chris McDonough wrote: > On 4/7/10 9:47 AM, Charlie Clark wrote: > > Am 07.04.2010, 15:41 Uhr, schrieb Chris McDonough: > > > >>> I noticed in the 1.2 docs that view configuration in zcml uses the > >>> 'context' predicate instead of the zope 'for' predicate. Just

[Repoze-dev] deprecation of zcml for?

2010-04-06 Thread Iain Duncan
I noticed in the 1.2 docs that view configuration in zcml uses the 'context' predicate instead of the zope 'for' predicate. Just wanted to know if I can still safely use 'for' or whether new code should switch all those. The 1.2 improvements look great btw! thanks iain ___

[Repoze-dev] Chameleon Genshi and match templates?

2010-02-12 Thread Iain Duncan
Been out of the loop for a bit, did Chameleon Genshi get match template support yet? I know Malte mentioned it was a possibility about six months ago or so. thanks Iain ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listi

Re: [Repoze-dev] repoze.bfg 1.2 released...

2010-02-12 Thread Iain Duncan
Hey, that's great news about the book. Do you know if it will be available as an e-book at all? Not sure how long that publisher would take to get things out of country and all. It is also quite expensive, but having formerly worked in the book industry I understand the many factors influencing pri

Re: [Repoze-dev] doc question

2009-11-23 Thread Iain Duncan
On Mon, 2009-11-23 at 09:37 -0500, Chris Rossi wrote: > > > On Sun, Nov 22, 2009 at 9:08 PM, Chris McDonough > wrote: > Iain Duncan wrote: > > Am I missing something terribly obvious, or is that not just > a regular > > instance

[Repoze-dev] using the pylons/weberror interfactive debugger in bfg apps?

2009-11-22 Thread Iain Duncan
Hey all, one thing I miss in Pylons is the out of the box integration with the interactive debugger in your browser. I'll confess ignorance as to how this is hooked up, but it's *really* helpful to people learning pylons. Wondering if it would be a good plan to put this 'in the box' for bfg or mayb

[Repoze-dev] starter request

2009-11-22 Thread Iain Duncan
Wondering if it would be possible to add a paster starter template for bgf_routes ( no sqlalchemy )? Seems to be a missing piece. Thanks! Iain ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev

[Repoze-dev] doc question

2009-11-22 Thread Iain Duncan
Hey folks, in the what's new for 1.1 I found this: In repoze.bfg 1.0, the @bfg_view decorator could not be used on class methods. In 1.1, the @bfg_view decorator can be used against a class method: 1 2 3 4 5 6 7 8 9 10 11 from webob import Response from repoze.bfg.view import bfg_view

[Repoze-dev] mailing list split?

2009-11-22 Thread Iain Duncan
Hey folks, just floating the idea of splitting the issue tracker mailouts on to their own mailing list? In my experience on this and other lists, it's a lot more pleasant to read the mailing list without having to scroll through the issue tracking comments. Just a thought. Iain __

[Repoze-dev] repoze.bfg future plans?

2009-11-22 Thread Iain Duncan
Hey Chris et. al, I'm seriously considering switching my main platform for our inhouse framework to mostly repoze.bfg with auxillary pylons bits from the other way around, but have a few concerns that mostly relate to making sure that clients buy into our platform of choice and feel like they aren'

Re: [Repoze-dev] zope.schema, zope.formlib in bfg? or help a newb understand zca coolness

2009-10-03 Thread Iain Duncan
> > Hey Martin, > I was kind of expecting that the book would have some gaps as far as > bfg goes. I was hoping that going through the exercise of struggling > through those gaps would help me arrive at a better understanding of > all things zope(a lofty goal I'm sure). > > > thanks so much

[Repoze-dev] match templates in chameleon.genshi?

2009-10-03 Thread Iain Duncan
Hey folks ( or rather Malte! ), wondering whether there are plans to include full match template support in chameleon.genshi? Is such a thing possible while still retaining speed? Are there other decent ways of doing template inheritance using chameleon.genshi that remove the need for it? thanks

Re: [Repoze-dev] repoze.bfg and repoze.what

2009-09-29 Thread Iain Duncan
On Tue, 2009-09-29 at 16:49 -0400, Thomas G. Willis wrote: > On Tue, Sep 29, 2009 at 3:32 PM, Rob Miller wrote: > > Thomas G. Willis wrote: > >> > >> Thanks for the response Chris, > >> > >> This makes perfect sense. And honestly I'm not married to repoze.who > >> or repoze.what, To me it was th

Re: [Repoze-dev] repoze.bfg and repoze.what

2009-09-26 Thread Iain Duncan
On Sat, 2009-09-26 at 11:58 -0400, Thomas G. Willis wrote: > Hello, I'm a newb at this, and I tried my best to do the research but > I'm still confused. > > I was wondering if anyone is aware of an example that shows how to > link repoze.what to an aclauthorzationpolicy . > > I have some who/what

Re: [Repoze-dev] bfg site manager question ( another one )

2009-09-25 Thread Iain Duncan
> > > > Hmm, I agree, but I feel like there is a smell either way. ;-) > > > > It seems to me I can either: > > > > A) - create a duplicate of the the same registry in my abstract model > > middleware by using zope.configuration.xmlconfig( same_file_as_bfg ) and > > then know that any utility/ad

Re: [Repoze-dev] bfg site manager question ( another one )

2009-09-25 Thread Iain Duncan
On Sat, 2009-09-26 at 01:42 -0400, Chris McDonough wrote: > Iain Duncan wrote: > >>> If I could get the 'one-registry-to-rule-them-all' loaded in middelware > >>> on ingress, is there at least a reasonable way of forcing the bgf app to > >>> use tha

Re: [Repoze-dev] bfg site manager question ( another one )

2009-09-25 Thread Iain Duncan
> > If I could get the 'one-registry-to-rule-them-all' loaded in middelware > > on ingress, is there at least a reasonable way of forcing the bgf app to > > use that registry as it's site manager? > > Nope. BFG hooks this "hookable" thing when it loads a ZCML file to put it in > its own regist

Re: [Repoze-dev] bfg site manager question ( another one )

2009-09-25 Thread Iain Duncan
On Sat, 2009-09-26 at 01:04 -0400, Chris McDonough wrote: > Iain Duncan wrote: > > Ok, so I figured out that if I get the zope.component.globalSiteManager > > in my model middleware on ingress, that in bfg I can indeed query it for > > registered adapaters and get at that. Bu

[Repoze-dev] bfg site manager question ( another one )

2009-09-25 Thread Iain Duncan
Ok, so I figured out that if I get the zope.component.globalSiteManager in my model middleware on ingress, that in bfg I can indeed query it for registered adapaters and get at that. But in the bfg app, the global site manager is empty and the siteManager has the stuff from my zcml file. So, I thi

Re: [Repoze-dev] getting at the bfg registry programmatically?

2009-09-25 Thread Iain Duncan
On Fri, 2009-09-25 at 20:51 -0700, Iain Duncan wrote: > Hi folks, I'm working on breaking out a project into bits, including > some in bfg, some in pylons, and an abstract model that lives in it's > own middleware. What I want to have happen is for all parts to share one >

[Repoze-dev] getting at the bfg registry programmatically?

2009-09-25 Thread Iain Duncan
Hi folks, I'm working on breaking out a project into bits, including some in bfg, some in pylons, and an abstract model that lives in it's own middleware. What I want to have happen is for all parts to share one zca registry, but my experiments so far are turning up naught. Some questions: - how w

[Repoze-dev] unescaping html in chameleon.genshi

2009-09-25 Thread Iain Duncan
Sorry if this is the wrong place to ask this, if it is, please let me know where I should. Wondering if anyone can tell me what is necessary to display html coming from template variables with chameleon.genshi? IE what would have been ${HTML(var_with_html)} in genshi. thanks! Iain ___

Re: [Repoze-dev] repoze.what-pylons question

2009-09-16 Thread Iain Duncan
On Wed, 2009-09-16 at 10:55 +0200, Douglas Mayle wrote: > I'm not exactly sure, but I've done some similar things which have > worked, so I might be able to help out. First of all, instead of > using default, you should probably be using __call__, like in: > http://projects.mayle.org/hg/DVDev/

[Repoze-dev] repoze.what-pylons question

2009-09-16 Thread Iain Duncan
Hi folks, not sure if this should be on pylons or here. I'm using the repoze.what pylons quickstart code, and I'm having problems with the fact that when @protect_action fails, it tries to call the login action *for the current controller*. This is causing me pain when my controller is a wsgi wrapp

Re: [Repoze-dev] page directive sci-fi

2009-09-15 Thread Iain Duncan
On Mon, 2009-09-14 at 01:08 -0400, Chris McDonough wrote: > Tim Hoffman wrote: > > Hi Chris > > > > You are correct, I just didn't want to see the "view" directive just > > disappear and be left with a "page" implementation ;-). > > I just baked all this behavior into the "view" directive on the

Re: [Repoze-dev] accessing middleware or request from bgf models during traversal?

2009-09-03 Thread Iain Duncan
On Thu, 2009-09-03 at 18:15 -0400, Chris McDonough wrote: > On 9/3/09 3:40 PM, Iain Duncan wrote: > > Hey folks, I have some stuff in middleware that I need my models in a > > bfg traversal graph to be able to get at. > > Using request parameters in model code is technical

[Repoze-dev] accessing middleware or request from bgf models during traversal?

2009-09-03 Thread Iain Duncan
Hey folks, I have some stuff in middleware that I need my models in a bfg traversal graph to be able to get at. But I'm not sure what the correct way for those to get at the environ is. I could tack the environ onto all objects starting at default_get_root but that seems kind of clunky. I was alter

Re: [Repoze-dev] using bfg app as wsgi callable in other frameworks?

2009-08-28 Thread Iain Duncan
docs.repoze.org/bfg/current/narr/extending.html for more > conceptual info about this sort of thing. Thanks so much for the help Chris, that oughta keep me going. I hope this thing I'm cooking up can eventually be useful to the repoze community. The more zope I learn the more I love bfg! =)

Re: [Repoze-dev] using bfg app as wsgi callable in other frameworks?

2009-08-28 Thread Iain Duncan
file('configure.zcml', package=my_pkg) Thought I'm not sure where this should be done. Once at the top project level? thanks Iain > > - C > > > On 8/28/09 12:59 PM, Iain Duncan wrote: > > ( apologies if this is a duplicate, it doesn't seem to have m

[Repoze-dev] using bfg app as wsgi callable in other frameworks?

2009-08-28 Thread Iain Duncan
( apologies if this is a duplicate, it doesn't seem to have made it to me through the list so resending ) Hi folks, I have a bfg app that makes a crud controller, where objects from the model package get attached through configure.zcml. This achieves my purpose of having the application completely

[Repoze-dev] using bfg app as wsgi callable in a different environment?

2009-08-27 Thread Iain Duncan
Hi folks, I have a bfg app that makes a crud controller, where objects from the model package get attached through configure.zcml. This achieves my purpose of having the application completely unaware of the model. I want to use this app as a wsgi callable in another app ( a pylons project ), but I

[Repoze-dev] bfg registry question

2009-08-20 Thread Iain Duncan
in a bfg app, is there a way to find all the objects that implement and interface? I know we can do it the other way around ( get the interfaces provided by an object ), but not sure how to programmatically find the factory for making objects that provide an interface. thanks Iain __

Re: [Repoze-dev] [issue94] Can't start shell in bfg_alchemy or bfg_routesalchemy projects

2009-08-20 Thread Iain Duncan
On Thu, 2009-08-20 at 23:29 +, Chris McDonough wrote: > Chris McDonough added the comment: > > Please use: > > For the alchemy template: > > ./bin/paster --plugin=repoze.bfg bfgshell MyProject.ini alchemy > > For the routesalchemy template: > > ./bin/paster --plugin=repoze.bfg bfgshell My

[Repoze-dev] repoze.bfg from within plone?

2009-08-05 Thread Iain Duncan
Just wondering if anyone manages to run bfg apps from within plone, and if so, do they have any examples up online? I'd love to be able to pass traversal from the plone-zope publisher to the repoze publisher, but I'm very new to this whole zope thing so maybe I'm smoking crack. Any suggestions on i

Re: [Repoze-dev] flashing messages with bfg

2009-07-10 Thread Iain Duncan
On Wed, 2009-07-08 at 03:28 -0400, Chris McDonough wrote: > On 7/8/09 2:54 AM, Iain Duncan wrote: > > On Wed, 2009-07-08 at 02:36 -0400, Chris McDonough wrote: > >> We don't have a convention for "flash". I've been remiss in seeing how the > >>

Re: [Repoze-dev] flashing messages with bfg

2009-07-07 Thread Iain Duncan
On Wed, 2009-07-08 at 02:36 -0400, Chris McDonough wrote: > We don't have a convention for "flash". I've been remiss in seeing how the > other frameworks implement this, but I *think* something like this would be > closest: > > return render_template_to_response('some/template.pt', message='Upd

[Repoze-dev] flashing messages with bfg

2009-07-07 Thread Iain Duncan
Hey folks, wondering what the conventional way of flashing a message after a model update when using HTTPFound for redirects. Is this something that people roll-their-own for, or is there a standard to follow? I'd like to make sure my crud app is as bfg'ish as possible so it can be useful to others

[Repoze-dev] metaclass question

2009-07-05 Thread Iain Duncan
Sorry if this isn't the right place to ask, but figured someone might be able to help! I am making a meta class to build schemas, the api for declaring a schema will look something like this: class MySchema(ViewFieldSchema): age = TextField.reg(label='Age') name = TextField.reg(label=

Re: [Repoze-dev] repoze.component and repoze.configuration

2009-07-02 Thread Iain Duncan
On Thu, 2009-07-02 at 16:12 -0400, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Malthe Borch wrote: > > 2009/7/2 Tim Hoffman : > >> I think you woul lose that capability with just name based registrations. > > > > Yes, but perhaps for the better; it was always problema

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-30 Thread Iain Duncan
On Tue, 2009-06-30 at 15:59 -0400, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Iain Duncan wrote: > > On Tue, 2009-06-30 at 15:30 -0400, Tres Seaver wrote: > >> -BEGIN PGP SIGNED MESSAGE- > >> Hash: SHA1 > >> >

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-30 Thread Iain Duncan
On Tue, 2009-06-30 at 15:30 -0400, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Iain Duncan wrote: > > > Thanks for the clarification, that's what I tried last night, ( called > > the top one PetContextFactory ). The problem I hit was t

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-30 Thread Iain Duncan
On Tue, 2009-06-30 at 06:19 -0400, Chris McDonough wrote: > On 6/30/09 1:39 AM, Iain Duncan wrote: > >> Let's imagine a view "pets": > >> > >> from webob import Response > >> > >> def pets(context, request): > >> retu

Re: [Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-29 Thread Iain Duncan
> Let's imagine a view "pets": > > from webob import Response > > def pets(context, request): > return Response ('OK') > > when a URL comes in that is for a paricular pet: > > from webob import Response > > > def pets(context, request): > if request.subpath: > petnum = requ

[Repoze-dev] traversal vs url dispatch for rest'ish applications

2009-06-29 Thread Iain Duncan
I'm wondering what the conventional wisdom is for doing bfg apps to handle crud operations with urls like /pet -> list pets /pet/1 -> view pet model, id 1 /pet/1/view /pet/1/edit -> edit pet model, id 1 Is this something that can be handled well with both traversal and url dispatch? Are there a

[Repoze-dev] bfg form generation

2009-06-27 Thread Iain Duncan
what are folks using to make forms and validation schemas with bfg? I am a big fan of formencode, but not sure how best to use it in the bfg context. I'm curious whether one can use zope form generation easily with formencode? thanks iain ___ Repoze-dev

[Repoze-dev] bfg redirects

2009-06-27 Thread Iain Duncan
Hi folks, might be thinking about this all wrong, question re bgf In the case of a post updating a model from a form, and the update is done, I want to redirect to my 'view' view so as to prevent multiple submissions. In the docs I can see how to do a redirect with a specied url, but it seems like

Re: [Repoze-dev] repoze app standalone-ness

2009-06-25 Thread Iain Duncan
On Thu, 2009-06-25 at 18:39 -0400, Tres Seaver wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Iain Duncan wrote: > > I'm new to zope/repoze etc. I'm working on something where I want > > ultimately to be able to drop it into any wsgi aware environm

[Repoze-dev] repoze app standalone-ness

2009-06-25 Thread Iain Duncan
I'm new to zope/repoze etc. I'm working on something where I want ultimately to be able to drop it into any wsgi aware environment and have it *just work*. I plan on this project being a stupidly well document stand alone admin interface scaffold for cases where explicit is better than auto-generat

Re: [Repoze-dev] bfg docs

2009-06-25 Thread Iain Duncan
On Thu, 2009-06-25 at 03:43 -0400, Chris McDonough wrote: > On 6/25/09 3:34 AM, Iain Duncan wrote: > > First off, I am super impressed by the effort put into the bfg docs. The > > ratio of docs to code is fantastic and IMHO bodes very well for > > adoption. =) > > &

  1   2   >