Re: issue to deploy pylons application under mod_wsgi

2011-06-11 Thread Haulyn Jason
I am just trying to solve problem, no matter the line application = ErrorMiddleware(application, debug=True) existed or not, the issue always here. Thanks. Regards, Haulyn Jason Founder, http://domix.in Rm. 807, Qilu Software Tower, Qilu Software Park 1 Shunhua Rd., High-Tech Development Zone Ji

Re: pyramid python setup install does not install data directory

2011-06-11 Thread Chris McDonough
On Sun, 2011-06-12 at 02:26 +0200, Vincenzo Ampolo wrote: > Hi, > > I'm trying to deploy a python app which must contain a data directory > inside the egg package. To do so i modified the MANIFEST.in content as > follows: > > include *.txt *.ini *.cfg *.rst > recursive-include whisperer *.ico *.p

Re: ZCA objectEventNotify + Pyramid Subscribers

2011-06-11 Thread Chris McDonough
On Sat, 2011-06-11 at 17:50 -0700, Tim Hoffman wrote: > Hi > > You will find that by default zope.event is using an alternate > registry so the pyramid subscriber events won't match. > I am using objectEventNotify on appengine with pyramid, and as the > post from Danny points out > you will need t

Re: ZCA objectEventNotify + Pyramid Subscribers

2011-06-11 Thread Tim Hoffman
Hi You will find that by default zope.event is using an alternate registry so the pyramid subscriber events won't match. I am using objectEventNotify on appengine with pyramid, and as the post from Danny points out you will need to ensure that zope.event and the pyramid registries are the same

pyramid python setup install does not install data directory

2011-06-11 Thread Vincenzo Ampolo
Hi, I'm trying to deploy a python app which must contain a data directory inside the egg package. To do so i modified the MANIFEST.in content as follows: include *.txt *.ini *.cfg *.rst recursive-include whisperer *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml recursive-i

Re: Pyramid, traversal, and file-extensions -- not possible?

2011-06-11 Thread Michael Merickel
On Jun 11, 3:02 pm, Matt Feifarek wrote: > Sure, but we're not using traversal anymore now... we're hand-poking all of > this stuff. I like your solution, in a non-traversal situation. Sorry, I gave this example because it's a better solution to the SO solution that you linked to, so I figured yo

Re: Pyramid and access to basic useful objects outside of view callables

2011-06-11 Thread Mike Orr
On Sat, Jun 11, 2011 at 1:58 PM, Matt Feifarek wrote: > On Sat, Jun 11, 2011 at 3:36 PM, Danny Navarro wrote: >> >> I see Pyramid as just an application (a WSGI app) that just takes >> requests and returns responses. The rest of Pyramid functionality is >> to configure the application in the way

Re: Pyramid and access to basic useful objects outside of view callables

2011-06-11 Thread Thomas G. Willis
Assuming that "application.ini" defines all your settings for your pyramid app... one way that could work for you is this from paste.deploy import loadapp import os here = os.getcwd() app = loadapp("config:application.ini", relative_to=here) at this point any initialization

Re: issue to deploy pylons application under mod_wsgi

2011-06-11 Thread Raoul Snyman
On 9 June 2011 09:49, Haulyn Jason wrote: > application = loadapp('config:/var/www/domix.us/development.ini') > application = ErrorMiddleware(application, debug=True) Why are you adding in the error middleware? Pylons already has error middleware built in. -- Raoul Snyman B.Tech Information Tech

Re: Pyramid and access to basic useful objects outside of view callables

2011-06-11 Thread Danny Navarro
On Sat, Jun 11, 2011 at 10:58 PM, Matt Feifarek wrote: > On Sat, Jun 11, 2011 at 3:36 PM, Danny Navarro wrote: >> >> I see Pyramid as just an application (a WSGI app) that just takes >> requests and returns responses. The rest of Pyramid functionality is >> to configure the application in the way

Re: Pyramid and access to basic useful objects outside of view callables

2011-06-11 Thread Matt Feifarek
On Sat, Jun 11, 2011 at 3:36 PM, Danny Navarro wrote: > I see Pyramid as just an application (a WSGI app) that just takes > requests and returns responses. The rest of Pyramid functionality is > to configure the application in the way it processes the requests and > returns the responses. Yes,

Re: Pyramid and access to basic useful objects outside of view callables

2011-06-11 Thread Danny Navarro
Hi Matt, I'm not an expert in Pyramid, if I'm wrong I hope someone in the list corrects me, so take my advice as an opinion from someone who uses Pyramid sporadically. I see Pyramid as just an application (a WSGI app) that just takes requests and returns responses. The rest of Pyramid functionali

Re: Pyramid, traversal, and file-extensions -- not possible?

2011-06-11 Thread Matt Feifarek
Thanks. This helps; some follow-ups below. On Sat, Jun 11, 2011 at 1:52 PM, Michael Merickel wrote: > Using traversal you'll need to define your own __getitem__ on your > context objects that is capable of discriminating your leaf nodes. > Sure, that makes sense, but then the view / render code

Re: Pyramid, traversal, and file-extensions -- not possible?

2011-06-11 Thread Michael Merickel
Using traversal you'll need to define your own __getitem__ on your context objects that is capable of discriminating your leaf nodes. With regards to the SO question, the pyramid way of dealing with this is much more flexible than the pylons mechanism of an "if" within the view code. For example y

Re: issue to deploy pylons application under mod_wsgi

2011-06-11 Thread Michael Merickel
I don't use mod_wsgi but the pyramid documentation for it is almost an identical setup to pylons, perhaps it can help you out. http://docs.pylonsproject.org/projects/pyramid/1.0/tutorials/modwsgi/index.html Michael -- You received this message because you are subscribed to the Google Groups "p

Pyramid and access to basic useful objects outside of view callables

2011-06-11 Thread Matt Feifarek
Hi there. I'm a relatively long-time Pylons user, starting to work with Pyramid. I like what I see, but am suffering a bit on where to find things. I'm using traversal and a resource tree in my app (zodb template) and am enjoying this pattern... but I can't seem to find ways to hook onto basic ob

Pyramid, traversal, and file-extensions -- not possible?

2011-06-11 Thread Matt Feifarek
I'm interested in making an API for a resource-tree, and in having the URLs qualified in part by file extension (xxx.json). The docs mention discriminating based on XHR and mimetype, which I grok, but it's much easier to debug and view sent data by simply changing the URL. There is some chatter ab

Re: issue to deploy pylons application under mod_wsgi

2011-06-11 Thread Haulyn Jason
nobody met this issue? or, any reference, analysis all welcome. Didn't solve the problem. Regards, Haulyn Jason Founder, http://domix.in Rm. 807, Qilu Software Tower, Qilu Software Park 1 Shunhua Rd., High-Tech Development Zone Jinan, Shandong 250101, P. R. China Tel: +86 158 5410 3759 Website: