[pylons-devel] Please reconsider deprecating --daemon from pserve
Hi folks, I wanted to weigh in on the decision to deprecate --daemon, as I think that's a bad idea. I agree that in production we should use "real monitor services", but during the development process I use --daemon routinely, and I doubt my workflow is that uncommon. I am constantly putting dev versions up on private ec2 instances for my remote team mates to poke at. It's really convenient to be able to get it up as fast as possible, and any additional steps for these demo apps are a pain. Right now it's dead easy for me to turn on with daemone and add three lines to the default apache config file to proxy to the server and I'm done. I would also argue that in the marketing sense, the last thing Pyramid needs is to be seen as even more 'roll your own' and inconvenient. I would vote for leaving it in and simply printing a warning. For me at least, it's going to be a headache and will prob mean for simple demos I pin to Pyramid 1.5 thanks for listening Iain -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at https://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout.
Re: [pylons-devel] Re: Ecommerce platform based on Pyramid/Pylons
I think you'll find fewer people releasing things like that on the Pyramid/SQLAlchemy stack because most people move to Pyramid+SQLA because they want to be able to do things *exactly their way*, so they are looking for tools to make their own custom deal. In my experience, E-Commerce is one of those things where some people just want to sell t-shirts on line and everything is *normal*, or the opposite is trure: it's the core of your business and getting it just right is worth a lot of money. If the latter is your case, then bending your business process to a product isn't very attractive anyway so you prob don't want someone else's decisions. My advice, if you're needs are simple or e-commerce is not a very important part of the business, stick to django, and if it's key to your business and you want it your way, do it in Pyramid+SQAlchemy. (I've done both over the years, FWIW.) iain On Sun, Aug 2, 2015 at 10:32 PM, Ecommerce Platform Architect pinak...@gmail.com wrote: Hi Steve, Thanks for the response and the info. Will look into the app development environment on Pyramid. Thanks, Pinakee On Friday, July 31, 2015 at 11:33:46 AM UTC+5:30, Steve Piercy wrote: There are none. There are probably many proprietary ecommerce apps written on top of Pyramid. There are many application development environments built on top of Pyramid which may facilitate the creation of an ecommerce app. http://docs.pylonsproject.org/en/latest/docs/pyramid.html#sample-pyramid-development-environments There are maybe a half-dozen FOSS ecommerce apps written in Python using Plone and Django. --steve On 7/30/15 at 10:25 PM, pina...@gmail.com (Ecommerce Platform Architect) pronounced: Would really appreciate if someone could give me any pointers. I tried searching on the net but couldn't find any open source ecommerce framework on pyramid/pylons. Thanks, Pinakee On Wednesday, July 29, 2015 at 2:09:47 PM UTC+5:30, Ecommerce Platform Architect wrote: Hi, I have been using Python based framework for quite sometime and have built social networking platform, CMS platform for Videos etc. using python frameworks. Right now I am evaluating a platform for Ecommerce which is our company's next target. Hence, I was wondering if there's any open-source ecommerce platform built on Pyramid. For example Django has Oscar, Saleor etc. We could build the platform ground up but time to market is of essence. Hence, was looking for some already available modules/framework. Would appreciate your help/response. Thanks. Steve Piercy, Soquel, CA -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/d/optout.
[pylons-devel] most mature/stable Pyramid ReST and messaging helpers?
Hi folks, I have a new contract position and have managed to advocate for Pyramid+SQLAlchemy as a much better platform than Django for what we're doing ( light performant ReST services that need to interact with a big hairy legacy db ). However, they're taking a chance on me and Pyramid, so I'd like to make sure that as much as possible the work is using 'standard packages'. My involvement with Pyramid dates back to before any helpers existed so I have previously just rolled my own. I'm hoping I can get some suggestions on what I might incorporate both for ReST scaffolds and for messaging solutions. Thanks Iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-devel] Re: most mature/stable Pyramid ReST and messaging helpers?
oops, wrong list, sorry! stupid gmail error. iain On Thu, Oct 10, 2013 at 10:49 AM, Iain Duncan iainduncanli...@gmail.comwrote: Hi folks, I have a new contract position and have managed to advocate for Pyramid+SQLAlchemy as a much better platform than Django for what we're doing ( light performant ReST services that need to interact with a big hairy legacy db ). However, they're taking a chance on me and Pyramid, so I'd like to make sure that as much as possible the work is using 'standard packages'. My involvement with Pyramid dates back to before any helpers existed so I have previously just rolled my own. I'm hoping I can get some suggestions on what I might incorporate both for ReST scaffolds and for messaging solutions. Thanks Iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out.
Re: Sites using Pyramid Pyramid Advocacy
What is the objective? To promote Pyramid or to promote third parties using Pyramid? If the former then having a well-curated list of showcase examples seems best. If the later then there may be an argument for opening it up to make it easy for people to submit their own sites. It's possible to do both but probably not in the same place. For me personally, the objective is to be able to show people and clients that Pyramid is used extensively in real world applications. In that sense, I agree some curation is probably necessary, as on the SQLAlchemy page. But I think it also helps just to have a really big list, much like Plone does. Iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: Sites using Pyramid Pyramid Advocacy
Thanks guys. I'm thinking what is necessary in the long run is for there to be some kind of app/page up that makes it super easy for someone to submit their site. Should this go to a pylons address, or do you guys want me to just stick something up that encourages people to email me the description and logo for now? thanks Iain On Wed, Oct 24, 2012 at 7:07 AM, Thomas G. Willis tom.wil...@gmail.comwrote: Cool. Just sent it to you. On Monday, October 22, 2012 7:58:04 PM UTC-4, Iain Duncan wrote: Right, well I'll start collecting them then. Can you send it to idun...@xornot.com? Chris, what's the easiest way for me to edit a page on the Pylons site to have a preamble and include my email address for people to send their links to? thanks Iain On Sat, Oct 20, 2012 at 5:27 AM, Thomas G. Willis tom.wil...@gmail.comwrote: I work for Batterii(http://batterii.com) we have a managed innovation solution written in pyramid and ember.js on top of google appengine. We actually have happy customers using it. I had sent someone our logo about a year ago for inclusion on the pylons site but it's still not up there. Ember.js on the other hand included the logo fairly quickly. On Friday, October 19, 2012 9:30:24 PM UTC-4, Blaise Laflamme wrote: I think this should be added to the new pylons project / pyramid sites refactoring. Noted. If you have anything collected please share. On Friday, 19 October 2012 17:33:15 UTC-4, Iain Duncan wrote: Hi everyone, I started a thread about this ages ago, and expressed interest in making something happen, and then life happened and I had not time. Now I'm in a position where this has become a higher priority again. It seems to me that one thing really lacking in the Pyramid docs is some advocacy and examples of high profile sites using Pyramid. I realize this is a bit non-sensical in that we're not talking about a CMS, but I'm sure I'm far from the only one who has had a client ask about that. Plone and SQLAlchemy have done a great job of it. So questions: - sites using Pyramid? is there a list anywhere? - If I want to help make one, what would be the recommended way of going about this? -- You received this message because you are subscribed to the Google Groups pylons-devel group. To view this discussion on the web visit https://groups.google.com/d/** msg/pylons-devel/-/**sUw3kubem4EJhttps://groups.google.com/d/msg/pylons-devel/-/sUw3kubem4EJ . To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscribe@* *googlegroups.com pylons-devel%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/pylons-devel?hl=enhttp://groups.google.com/group/pylons-devel?hl=en . -- You received this message because you are subscribed to the Google Groups pylons-devel group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-devel/-/inaxx9ZRzIYJ. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: Sites using Pyramid Pyramid Advocacy
Right, well I'll start collecting them then. Can you send it to idun...@xornot.com? Chris, what's the easiest way for me to edit a page on the Pylons site to have a preamble and include my email address for people to send their links to? thanks Iain On Sat, Oct 20, 2012 at 5:27 AM, Thomas G. Willis tom.wil...@gmail.comwrote: I work for Batterii(http://batterii.com) we have a managed innovation solution written in pyramid and ember.js on top of google appengine. We actually have happy customers using it. I had sent someone our logo about a year ago for inclusion on the pylons site but it's still not up there. Ember.js on the other hand included the logo fairly quickly. On Friday, October 19, 2012 9:30:24 PM UTC-4, Blaise Laflamme wrote: I think this should be added to the new pylons project / pyramid sites refactoring. Noted. If you have anything collected please share. On Friday, 19 October 2012 17:33:15 UTC-4, Iain Duncan wrote: Hi everyone, I started a thread about this ages ago, and expressed interest in making something happen, and then life happened and I had not time. Now I'm in a position where this has become a higher priority again. It seems to me that one thing really lacking in the Pyramid docs is some advocacy and examples of high profile sites using Pyramid. I realize this is a bit non-sensical in that we're not talking about a CMS, but I'm sure I'm far from the only one who has had a client ask about that. Plone and SQLAlchemy have done a great job of it. So questions: - sites using Pyramid? is there a list anywhere? - If I want to help make one, what would be the recommended way of going about this? -- You received this message because you are subscribed to the Google Groups pylons-devel group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-devel/-/sUw3kubem4EJ. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Sites using Pyramid Pyramid Advocacy
Hi everyone, I started a thread about this ages ago, and expressed interest in making something happen, and then life happened and I had not time. Now I'm in a position where this has become a higher priority again. It seems to me that one thing really lacking in the Pyramid docs is some advocacy and examples of high profile sites using Pyramid. I realize this is a bit non-sensical in that we're not talking about a CMS, but I'm sure I'm far from the only one who has had a client ask about that. Plone and SQLAlchemy have done a great job of it. So questions: - sites using Pyramid? is there a list anywhere? - If I want to help make one, what would be the recommended way of going about this? -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: Sites using Pyramid Pyramid Advocacy
I found the thread I started back in Feb, but the links are dead now for the old Pylons wiki ones. Anyone know what happened to those? Thanks Iain On Fri, Oct 19, 2012 at 2:33 PM, Iain Duncan iainduncanli...@gmail.comwrote: Hi everyone, I started a thread about this ages ago, and expressed interest in making something happen, and then life happened and I had not time. Now I'm in a position where this has become a higher priority again. It seems to me that one thing really lacking in the Pyramid docs is some advocacy and examples of high profile sites using Pyramid. I realize this is a bit non-sensical in that we're not talking about a CMS, but I'm sure I'm far from the only one who has had a client ask about that. Plone and SQLAlchemy have done a great job of it. So questions: - sites using Pyramid? is there a list anywhere? - If I want to help make one, what would be the recommended way of going about this? -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: Sites using Pyramid Pyramid Advocacy
SQLAlchemy has I think done a great job of it. I'd love to know which of these are also using Pyramid or Pylons under the hood: http://www.sqlalchemy.org/organizations.html Iain On Fri, Oct 19, 2012 at 2:36 PM, Iain Duncan iainduncanli...@gmail.comwrote: I found the thread I started back in Feb, but the links are dead now for the old Pylons wiki ones. Anyone know what happened to those? Thanks Iain On Fri, Oct 19, 2012 at 2:33 PM, Iain Duncan iainduncanli...@gmail.comwrote: Hi everyone, I started a thread about this ages ago, and expressed interest in making something happen, and then life happened and I had not time. Now I'm in a position where this has become a higher priority again. It seems to me that one thing really lacking in the Pyramid docs is some advocacy and examples of high profile sites using Pyramid. I realize this is a bit non-sensical in that we're not talking about a CMS, but I'm sure I'm far from the only one who has had a client ask about that. Plone and SQLAlchemy have done a great job of it. So questions: - sites using Pyramid? is there a list anywhere? - If I want to help make one, what would be the recommended way of going about this? -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: Pyramid 1.3 and zope.component question
On Mon, Aug 27, 2012 at 9:50 PM, Chris McDonough chr...@plope.com wrote: On 08/28/2012 12:23 AM, Iain Duncan wrote: Hey all (or maybe just Chris? ;), I see in the change log that pyramid 1.3 no longer depends on zope.component. I haven't switched to 1.3, but in my pyramid apps I'm using the zca registry pretty extensively. I'm wondering a few things: - is the pyramid registry still the zope registry, or has there been a re-implementation? Still same. The zope component registry code was moved to zope.interface, so nothing really changed, just where it was imported from. Ah, that explains it. Thanks for the quick reply! Iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: possible regression bug re includeOverrides in pyramid 1.2
Hi Chris, I tried it out with Pyramid 1.2 and pyramid_zcml 0.7. I get a different error, and again, switching the pyramid egg back to 1.1 makes it go away. I've posted the traceback here, and attached the two zcml files, the second of which is being included with includeOverrides I double checked that swapping the pyramid egg only triggers the issue and that the app runs fine with the attached routes.zcml files in the base xornot.cms package and the overriding test package. thanks Iain traceback: Traceback (most recent call last): File bin/paster, line 53, in module paste.script.command.run() File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py, line 104, in run invoke(command, command_name, options, args[1:]) File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py, line 143, in invoke exit_code = runner.run(args) File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py, line 238, in run result = self.command() File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/serve.py, line 284, in command relative_to=base, global_conf=vars) File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/serve.py, line 321, in loadapp **kw) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 247, in loadapp return loadobj(APP, uri, name=name, **kw) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 272, in loadobj return context.create() File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 710, in create return self.object_type.invoke(self) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 203, in invoke app = context.app_context.create() File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 710, in create return self.object_type.invoke(self) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 146, in invoke return fix_call(context.object, context.global_conf, **context.local_conf) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py, line 56, in fix_call val = callable(*args, **kw) File /home/cms_demos/Test/test/app.py, line 85, in app config.commit() File /home/cms_demos/Test/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/__init__.py, line 485, in commit self.action_state.execute_actions() File /home/cms_demos/Test/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/__init__.py, line 905, in execute_actions callable(*args, **kw) File /home/cms_demos/Test/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/views.py, line 928, in register route_name) pyramid.exceptions.ConfigurationExecutionError: class 'pyramid.exceptions.ConfigurationError': No route named content found for view registration in: File /home/xornot/framework_pyramid/src/xornot.cms/xornot/cms/routes.zcml, line 43.2-51.4 view for=xornot.dram.interfaces.IResourceContainer name= view=xornot.dram.views.ListAction permission=view wrapper=content_wrapper route_name=content renderer=xornot.cms:templates/resource_list.pt / On Fri, Oct 7, 2011 at 7:01 AM, Chris McDonough chr...@plope.com wrote: On Sep 28, 6:05 pm, Iain Duncan iainduncanli...@gmail.com wrote: Hey folks, I discovered that my zcml using includeOverrides chokes when I upgrade to Pyramid 1.2. I have tested that the issue goes away or reappears from doing nothing except switching my pyramid egg from 1.1 to 1.2 I've released a new version of pyramid_zcml (0.7) which I believe fixes this. Can you try it and see? -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. routes.zcml Description: Binary data routes.zcml Description: Binary data
Re: Best deployment method...
Mengu, it would be awesome if you could expand on this and put in the pyramid cookbook, I'd love to hear more. Thanks for sharing, Iain On Wed, Oct 5, 2011 at 2:52 PM, Mengu whalb...@gmail.com wrote: that is called learning from the experience, chris. yes, his server specifications may vary, his db of choice may vary but in the end this is all the same. @sam, proxying nginx to paster is not a good idea. been there, done that. do not do that if you are not going to get max 1K-5K daily unique traffic. in the cookbook it should say, this is how to do it, but don't do it. i'd recommend that only for intranet use for small sized company. if you are going to get good amount of traffic like 5K - 10K reqs/min, go with apache and mod_wsgi. apache is great and can handle that traffic smoothly. you can use 2 web servers if needed. if you are going to get great traffic that you need to handle more than 20K concurrent users, i'd suggest going with nginx + uwsgi. however in such deployments do not use one server. get min. 2 servers, 1 db. server and have a load balancer. in my next wsgi deployment, i will give nginx + gevent a try. and finally, i will recommend you watching this[1] django deployment workshop by jacob kaplan moss of django. it applies to every wsgi app. [1] http://blip.tv/pycon-us-videos-2009-2010-2011/django-deployment-workshop-3651591 On Oct 5, 4:15 pm, Chris McDonough chr...@plope.com wrote: On Wed, 2011-10-05 at 05:42 -0700, Sam wrote: I'm trying to decide between deploying using Nginx + paster + supervisord as described here: https://docs.pylonsproject.org/projects/pyramid_cookbook/dev/deployme. .. Or using apache + mod_wsgi as described here: https://docs.pylonsproject.org/projects/pyramid/1.0/tutorials/modwsgi. .. Is one of the ways significantly faster? more reliable? able to handle more load? Or is it pretty much a wash? It'll be more or less a wash for you if your traffic profile is such that you're willing to rely on input from folks here rather than benchmarking on your own systems. - C -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
possible regression bug re includeOverrides in pyramid 1.2
Hey folks, I discovered that my zcml using includeOverrides chokes when I upgrade to Pyramid 1.2. I have tested that the issue goes away or reappears from doing nothing except switching my pyramid egg from 1.1 to 1.2 I have some packages with zcml in them, I include some others that redefine routes, and I include the others like so: !-- application's routes -- includeOverrides file=routes.zcml / With 1.2, I get error messages about conflicting configuration actions, traceback included below I looked through what's new in Pyramid 1.2 and whats deprecated and couldn't see anything that made me think this would not work anymore, but maybe I missed something? thanks Iain Traceback (most recent call last): File bin/paster, line 53, in module paste.script.command.run() File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py, line 104, in run invoke(command, command_name, options, args[1:]) File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py, line 143, in invoke exit_code = runner.run(args) File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py, line 238, in run result = self.command() File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/serve.py, line 284, in command relative_to=base, global_conf=vars) File /home/cms_demos/Test/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/serve.py, line 321, in loadapp **kw) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 247, in loadapp return loadobj(APP, uri, name=name, **kw) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 272, in loadobj return context.create() File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 710, in create return self.object_type.invoke(self) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 203, in invoke app = context.app_context.create() File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 710, in create return self.object_type.invoke(self) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py, line 146, in invoke return fix_call(context.object, context.global_conf, **context.local_conf) File /home/stabil/Stabil/eggs/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/util.py, line 56, in fix_call val = callable(*args, **kw) File /home/cms_demos/Test/test/app.py, line 85, in app config.commit() File /home/cms_demos/Test/eggs/pyramid-1.2-py2.6.egg/pyramid/config/__init__.py, line 484, in commit self.action_state.execute_actions() File /home/cms_demos/Test/eggs/pyramid-1.2-py2.6.egg/pyramid/config/__init__.py, line 899, in execute_actions for action in resolveConflicts(self.actions): File /home/cms_demos/Test/eggs/pyramid-1.2-py2.6.egg/pyramid/config/__init__.py, line 1013, in resolveConflicts raise ConfigurationConflictError(conflicts) pyramid.exceptions.ConfigurationConflictError: Conflicting configuration actions For: ('view', class 'pyramid.httpexceptions.HTTPForbidden', '', None, InterfaceClass pyramid.interfaces.IView, None, None, None, None, None, False, None, None, None, None) File /home/cms_demos/Test/test/routes.zcml, line 18.2-23.4 view view=test.views.error_views.forbidden_view context=pyramid.exceptions.Forbidden renderer=test.templates:forbidden.pt wrapper=content_wrapper / File /home/xornot/framework_pyramid/src/xornot.auth/xornot/auth/configure.zcml, line 12.2-15.4 forbidden view=xornot.auth.views.forbidden renderer=xornot.auth.templates:forbidden.pt / iain@musicbox:/home/cms_demos/Test$ -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: how to open up our code, possible pyramid extension project
Thanks for the interest guys. I'm trying to figure out what to reasonably release first. I think the most sensible maybe a paster template to a very simple sample app that shows how we lay out the code and views, handle configuration via zcml, and take advantage of ZCA interfaces for big projects, mostly because that seems to be the secret weapon that is glossed over in the docs a bit in the ( understandable ) desire to not make the learning curve for pyramid any worse. But the thing is, ZCA interfaces and adapters are actually awesome for big extensible projects once you realize your project is big enough to warrant the extra typing. I've heard it likened to 'dependency injection on steroids'. =) I'm debating whether this first release ( which may be a while, depending on the vagaries of clients ) should be bound to SQLAlchemy or not. I'm leaning to yes, because on of the first things I did when learning BFG was look up how to initialize SQLAlchemy code better in such a way that I could easily re-use models in different apps. open to suggestions. iain On Fri, Jun 10, 2011 at 6:36 AM, Rocky Burt rocky.b...@gmail.com wrote: This is pretty awesome. I can't wait to see some code. - Rocky -- You received this message because you are subscribed to the Google Groups pylons-devel group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-devel/-/bvwKH3JRHMcJ. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: how to open up our code, possible pyramid extension project
BTW, if anyone has any recos on how to test paster script templates, I'd love to hear them. iain On Fri, Jun 10, 2011 at 11:52 AM, Iain Duncan iainduncanli...@gmail.comwrote: Thanks for the interest guys. I'm trying to figure out what to reasonably release first. I think the most sensible maybe a paster template to a very simple sample app that shows how we lay out the code and views, handle configuration via zcml, and take advantage of ZCA interfaces for big projects, mostly because that seems to be the secret weapon that is glossed over in the docs a bit in the ( understandable ) desire to not make the learning curve for pyramid any worse. But the thing is, ZCA interfaces and adapters are actually awesome for big extensible projects once you realize your project is big enough to warrant the extra typing. I've heard it likened to 'dependency injection on steroids'. =) I'm debating whether this first release ( which may be a while, depending on the vagaries of clients ) should be bound to SQLAlchemy or not. I'm leaning to yes, because on of the first things I did when learning BFG was look up how to initialize SQLAlchemy code better in such a way that I could easily re-use models in different apps. open to suggestions. iain On Fri, Jun 10, 2011 at 6:36 AM, Rocky Burt rocky.b...@gmail.com wrote: This is pretty awesome. I can't wait to see some code. - Rocky -- You received this message because you are subscribed to the Google Groups pylons-devel group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-devel/-/bvwKH3JRHMcJ. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
how to open up our code, possible pyramid extension project
Hey folks, so we ( xornot studios ) have been using BFG for a couple of years now, and ported all our work to pyramid. We have what I would say is quite an extensive and useful in house framework on top of pyramid that enables us to build db apps and resource oriented CMS/CRM type things really quickly. We have a lot of really useful tools done and have arrived at some great templates for large applications that need to extend our central app without touching code. We have focused on the the 'big-app' advantages of pyramid, we're using the registry and zope interfaces a lot, we're using zope 3 style views as classes for easy overriding by interface registration, that sort of thing. Templating is Chameleon zpt, and persistence is SQLAlchemy wrapped in an abstract model proxy to keep SA specific code out of anything other than the model for easy persistence swapping. We have a multi-view overridable widgeting system for building admin like user interfaces that is really slick, including almost autogenerated file upload handling, and the ability to make nested subforms almost automatically ( as automatically as we saw fit ) for handling associations and relations ( that's how the project started actually, it eats the Django admin for breakfast in my no-so-unbiased-and-humble-opinion). Dojo is used a lot for this. We have also made some RoR like scripts for creating new resources easily with code generation of views, ui and model files, mapper entries, zcml entries, etc. We are using ZCML for configuration, and buildout for building. We have it running on some pretty large client projects now, so we know it works. We use traversal and have managed to implement a zodb like security and permission scheme in SQLAlchemy with row level security and permission checking. ( I love pyramid's ACL handling, so slick! ) I think it's time for us as developers to take the big step of cleaning this up and starting to release parts of it, and I think it could be useful to the community as it seems like there is a lot of talk and demos out there on how Pyramid is great for minimal code, but less in the way of how the ZCA is great for big projects where the key is extensibility without modifying your main code base. I think we have that, but as a small shop of largely self taught python developers, some of it is really messy, underdocumented, and undertested. It's time for our company to grow big enough to take on subcontractors and I think releasing as open source could be a great forcing function for us to do the clean up that never seems to be highest priority when clients are paying for new features. ;-) I'm thinking I ought to: - find some other folks for whom this approach sounds interesting/useful who might want to team up with their similar stuff - see if parts of what we're doing can merge with similar efforts or compliment them - start to clean up and release bits of it, using this process to fully document and test the code I guess this is just a shout out to see if anyone is interested in this kind of thing and might like to join in mentoring/advising us on how to make sure this is up to snuff for releasability. (Mike Orr, I'm looking at you? it sounds like it might be a good cousin to your project? ) Some questions: - should I start a mailing list for it? discuss here or on pylons-user? - does anyone have a suggestion for what level of functionality one should bite off as a first release? Ultra minimal with full docs? more functional with docs and testing in progress? - can anyone comment on which of the above sound exciting? I think the admin app thing is the best feature, but it's also the hardest to get cleaned up, with some meta-class hackery in there that I'm somewhat frightened of figuring out how to test better - do you think we need 100% code coverage, or do we do something like multiple branches of release? (ie: covered vs upcoming vs stuff we use and you can use at your own risk?) - should we switch from SVN to git to do this? - should this be here or on pylons discuss? ;-) thanks! Iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: New project . Pylons or Pyramid
On Sun, Mar 13, 2011 at 12:32 AM, Eric Ongerth ericonge...@gmail.comwrote: +1. If I chose Pylons over Django and TurboGears (not to mention Rails) for its flexibility, light weight, and pluggability, Pyramid offers more of those qualities than Pylons and with better docs, plus built-in authorization/authentication support rather than the Pylons situation with that. Agreed, the default auth solution is a great addition. Much more flexible than other default auth systems I've used ( older Django and TG one's ) but a lot less overwhelming than rolling your own with repoze.who. iain On Mar 9, 8:56 pm, Iain Duncan iainduncanli...@gmail.com wrote: Another vote to start with Pyramid. I've been using 'it' since repoze.bfg 1.1 and am constantly being pleasantly surprised. Now that there is a bigger development community, even more docs, and more beginner friendly additions, I can't think of any reason not to use it right away. iain On Fri, Mar 4, 2011 at 4:42 PM, Mengu whalb...@gmail.com wrote: sure you can start with pyramid. pyramid 1.0 is already production ready with its awesome docs. On Mar 4, 5:10 am, Ravi ravi.gidw...@gmail.com wrote: Hi Group: I have started a new web based project and it is in its early stage. So with pylons merging with pyramids, I have two questions: 1) do you all suggest starting with Pyramids ? Or shall I wait for some more months ? 2) Are there any DO/DON'T that I should follow for make sure I have easy migration from pylons 1.0 to pyramid. -- About my web application: 1) Web based application. 2) Currently using Jinja2 template engine. 3) Will use session, cache. 4) Most of the data will be fetched using a REST based APIs which are not part of this application. 5) Will need to support a user base of atleast 100,000 users. 6) Will have usual registration/profile kind of forms and validations and may be few more forms. -- I have already seen the pylons FAQ ( http://docs.pylonsproject.org/faq/pyramid.html#should-i-port-my-pylon...), but will like hear from you all. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: pyramid, setting reponse status when using renderers?
Thanks guys. Chris, I think I would have found that if there had been a link to it from the docs page on customizing the 403 view with hooks. Would be great to have a mention of that there I think. thanks Iain On Tue, Mar 8, 2011 at 8:24 PM, Rob Miller r...@kalistra.com wrote: On 03/08/2011 07:36 PM, Iain Duncan wrote: I personally like using zcml to supply my renderer to my views so I can change templates from the zcml file. The only issue I'm having is that I don't know how I can set the response status when doing that. If my view is returning a dict, and the renderer is turning that into the reponse, is there some hook or way to influence the response? Specifically, I have made a custom forbidden view, and want it to still have status 403 for easy testing. I'm not 100% sure I understand the code path you're describing, but if it's from within custom renderer code that you want to be able to tweak the response, support for this is built in: http://docs.pylonsproject.org/projects/pyramid/1.0/narr/renderers.html#response-request-attrs -r -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: New project . Pylons or Pyramid
Another vote to start with Pyramid. I've been using 'it' since repoze.bfg 1.1 and am constantly being pleasantly surprised. Now that there is a bigger development community, even more docs, and more beginner friendly additions, I can't think of any reason not to use it right away. iain On Fri, Mar 4, 2011 at 4:42 PM, Mengu whalb...@gmail.com wrote: sure you can start with pyramid. pyramid 1.0 is already production ready with its awesome docs. On Mar 4, 5:10 am, Ravi ravi.gidw...@gmail.com wrote: Hi Group: I have started a new web based project and it is in its early stage. So with pylons merging with pyramids, I have two questions: 1) do you all suggest starting with Pyramids ? Or shall I wait for some more months ? 2) Are there any DO/DON'T that I should follow for make sure I have easy migration from pylons 1.0 to pyramid. -- About my web application: 1) Web based application. 2) Currently using Jinja2 template engine. 3) Will use session, cache. 4) Most of the data will be fetched using a REST based APIs which are not part of this application. 5) Will need to support a user base of atleast 100,000 users. 6) Will have usual registration/profile kind of forms and validations and may be few more forms. -- I have already seen the pylons FAQ ( http://docs.pylonsproject.org/faq/pyramid.html#should-i-port-my-pylon...), but will like hear from you all. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
pyramid, setting reponse status when using renderers?
I personally like using zcml to supply my renderer to my views so I can change templates from the zcml file. The only issue I'm having is that I don't know how I can set the response status when doing that. If my view is returning a dict, and the renderer is turning that into the reponse, is there some hook or way to influence the response? Specifically, I have made a custom forbidden view, and want it to still have status 403 for easy testing. thanks! Iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: Global variables
On Sat, Feb 19, 2011 at 12:09 AM, Chris Withers ch...@simplistix.co.ukwrote: A bit late in on this one, sorry: On 18/02/2011 23:15, Iain Duncan wrote: Some of us *do* write apps that expect to be extended / reconfigured via the ZCA registry, but Pyramid itself doesn't mandate that (or even document it all that well). If such an app uses the global ZCA APIs, Just to double check, you mean zope.component.getGlobalSiteManager, right? I assume zope.component.getSiteManager is still fair game and will pick up the correct segregated registry? safe. But people have their database connections and other things they'll have to put somewhere. mortar_rdb wraps this up in a way that felt like the way BFG was using the ZCA. I'm hoping it'll prove a good bridge for Pyramid too, as well as gently encouraging (but in no way forcing!) people to think about version control of their relational database schemas... Should I say to put them all in the registry? I would imagine this is the answer. However, setting them up is something I'm curious about. If I do: def app(global_settings, **settings): config = Configurator() config.registry.registerUtility(...) return config.make_wsgi_app() ...will that utility be available in app the threads that execute my application? If not, then what's the recommended way of achieving that? Also, similar question, if I do: from zope.component import getSiteManager def app(global_settings, **settings): config = Configurator() getSiteManager().registerUtility(...) return config.make_wsgi_app() ...will that utility be available in app the threads that execute my application? Will it behave identically to config.registry.registerUtility(...)? I hope the answer is yes, otherwise it means that libraries such as mortar_rdb, that don't target any particular framework other than the component architecture are in a bit of trouble. I'm interested in recommendations here... In my case, one possibility would be for mortar_rdb.registerSession to take a registry and if none was supplied, use getSiteManager(). That feels like a sledgehammer that will result in Pyramid users having to write boilerplate code (b!). However, even with that, on the consumption side, would getSiteManager().getUtility(...) get the utility from Pyramid's thread local registry, or would I need to egregiously pass in the registry to mortar_rdb.getSession? Hi Chris, I'm not sure about getSiteManager, but I can attest that if you use getGlobalSiteManager to get the registry in other threads or parts of your app, and you also use getGlobalSiteManager to get the registry that you pass in to your Configurator, then yes, you can share utilities between unrelated parts/threads/what have you by having everyone use the gsm. I'm doing that right now in that I have a model factory registered as a utility in my pyramid app callable ( where I set up my Configurator using the global site manager), and when I want a model, I get it as an adapter of request. ( In the main app, this happens only once per request by using the reify decorator in a custom request factory ). That way I can use the same model package in other parts of the wsgi stack, and safely get a different model with a different session each time, but the model gets its one-ring-to-rule-them-all goods from the model factory, with access to my settings from the pyramid apps ini file. This seems to work well for me as in the case of repoze.who plugins, the plugins are ahead of the main app in the wsig stack, but I want the main app to be where I set up settings used by the plugins. If any app wide thread-shared start up values need to be usable by everyone, I can stick them into the global registry on app startup. hth iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
make repoze.who respond to 403 Forbidden
I'm porting a bfg framework extension to pyramid, and auth was handled by repoze.who with a custom authentication plugin. I see from the release notes ( and my apps behaviour ) that I now need to make repoze.who react to 403's by presenting it's login challenge. However, I'm not at the point of thoroughly grokking the dark arts of repoze.who, and googling is turning up nothing so far, can anyone tell me what to do or point me at docs explaining how to configure repoze.who to react to '403 Forbidden'? thanks! iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: Raw MySQL with SQLAlchemy using Pyramid framework
One more vote that it's absolutely worth learning SA even if you're an sql whiz. It's a superb library, and let's you operate at multiple levels of abstraction. And great sql injection insurance! iain On Sun, Feb 20, 2011 at 8:39 AM, Ben Bangert b...@groovie.org wrote: On Feb 20, 2011, at 1:58 AM, AwaisMuzaffar wrote: Thanks for the reply guys it has been very informative. My main reason for using raw is that I have spent so much time learning MySQL, to me it seems counter productive to learn SQLALchemy methodologies from scratch. Ok, so maybe manually executing CREATE is not a great idea, but what about performing queries with pure MySQL, is that fine? The main utility I've found in SQLAlchemy is its connection pooling, automatic reconnection, and the fact that dynamically generating queries by concatenating raw SQL inside text strings is pretty horrendous. After using SQLAlchemy for awhile, I've finally gotten to the point where its actually easier for me to now write many SQLAlchemy queries than to use the raw SQL. Of course, as was mentioned, you do need to know the raw SQL to be able to tell SQLAlchemy how to do the right thing anyways. I'd say its worth the hassle of learning the abstraction purely for the ability to easily dynamically generate queries. Concatenating text strings of raw SQL is very error-prone. An example of dynamically generating an SQLAlchemy query in a model instance method: cases = meta.Session.query(cls) if court: cases = cases.filter_by(court_id=court) elif ecf: cases = cases.filter_by(ecf_abbreviation=ecf) cases = cases.filter(cls.filed_on=datetime(2000,1,1)) if judge: cases = cases.filter(cls.id.in_(judge_case_ids(judge))) It's quite easy to dynamically build up the filter conditions, dynamically include additional table joins as needed, etc. Cheers, Ben -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: make repoze.who respond to 403 Forbidden
On Tue, Feb 22, 2011 at 8:36 PM, Chris McDonough chr...@plope.com wrote: On Tue, 2011-02-22 at 20:29 -0800, Iain Duncan wrote: I'm porting a bfg framework extension to pyramid, and auth was handled by repoze.who with a custom authentication plugin. I see from the release notes ( and my apps behaviour ) that I now need to make repoze.who react to 403's by presenting it's login challenge. However, I'm not at the point of thoroughly grokking the dark arts of repoze.who, and googling is turning up nothing so far, can anyone tell me what to do or point me at docs explaining how to configure repoze.who to react to '403 Forbidden'? Does this help? http://docs.pylonsproject.org/projects/pyramid/1.0/whatsnew-1.0.html#backwards-incompatibilities Thanks Chris, I hadn't noticed that when I read the what's new ( or rather didn't remember it was there once I needed it..) That worked for me. Iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: simulating pylons 1 static handling in pyramid
On Thu, Feb 17, 2011 at 7:53 PM, Chris McDonough chr...@plope.com wrote: On Thu, 2011-02-17 at 19:36 -0800, Iain Duncan wrote: Thanks Jeff, I've made a custom predicate before, that should work. To the powers-that-be, is there the possibility of a more elegant way of doing that? Cool, makes sense that we can't replicate all behaviour of Pylons 1. =) iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: docs unclear re using zope global registry
Further, in case it's useful, if you do this in your app start up code. gsm = getGlobalSiteManager() config = Configurator( registry=gsm ) then whenever you use request.registry you're using the zope global registry, in case you have some special need for it to be so. thanks iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: simulating pylons 1 static handling in pyramid
Thanks Jeff, I've made a custom predicate before, that should work. To the powers-that-be, is there the possibility of a more elegant way of doing that? thanks Iain On Feb 12, 8:29 am, Jeff Dairiki dair...@dairiki.org wrote: On Fri, Feb 11, 2011 at 06:20:23PM -0800, Iain Duncan wrote: I want to have my Pyramid app look first for static html files when given a path like /foo.html I can make this happen by using the following static declaration, but that seems to hide other views as well: static name= path=nf.static:html / [...] Is there an easy way to accomplish this with static views that I'm missing? Pyramid-sqla provides a way to do this. See: https://bytebucket.org/sluggo/pyramid_sqla/wiki/html/non_database_fea... Behind the scenes, this adds a route with a custom predicate which keeps the route from matching unless the static resource exists: http://docs.pylonsproject.org/projects/pyramid/dev/narr/urldispatch.h... Jeff -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Strange registry setup issue in config, can't find utilities registered
Hey folks, not sure where this belongs, but it seems to be a fairly under-the-hood question, so I'll try here first. I have some utilities that get registered in various packages in zcml. The packages are included from the main apps configure.zml file with include package=xornot.model / and in that packages configure.zcml file I have: utility provides=xornot.model.interfaces.IResourceMappers component=xornot.model.mappers.model_mappers name=model_mappers/ The configure.zcml from xornot.model *is* definitely being parsed, putting garbage in there stops app start up. Here's what I can figure out, I have another a factory that looks up that utility from the registry. In my app.py file where I set up the registry using the Configurator object, I have the following code, *after* all configuration is done: # instantiate ModelFactory, does all the SQLA startup housekeeping model_factory = ModelFactory(registry=registry, **settings) # register model factory as generic adapter of request to provide model registry.registerAdapter(model_factory, (IRequest,), Interface, 'model') Now here's what's weird. The ModelFactory does not find that utility. Looking at ._registered_utilities of the registry during ModelFactory init shows no registration of my model mapper utility. But when I drop into the debugger from the root factory, I can find that utility in the registry. I want to set up the ModelFactory once and only once on start up ( it makes SQLA mappers, which I believe are shared between threads ). I can't figure out for the life of me why the utilities aren't in there, it must be some innards thing I don't grok. I thought all included zcml packages were loaded in during the config setup code. Any help much appreciated. I will include my app code for ref: thanks iain def app(global_config, **settings): return a wsgi app with a xornot ModelFactory in the registry from xornot.model.interfaces import IAbstractModel from xornot.model.factories import ModelFactory # allow ini file's to set the app package and configure.zcml file app_package = settings.get('app_package', None) zcml_file = settings.get('configure_zcml', 'configure.zcml') # we are using the zope global site manager registry = getGlobalSiteManager() config = Configurator( registry=registry ) config.include('pyramid_zcml') config.setup_registry(settings=settings, root_factory=DefaultRoot, request_factory=Request ) if app_package: config.load_zcml(%s:%s % (app_package, zcml_file) ) else: # load from current package config.load_zcml(zcml_file) # instantiate ModelFactory, does all the SQLA startup housekeeping # XXX: this guy is not finding utilities registered in included packages! model_factory = ModelFactory(registry=registry, **settings) # register model factory as generic adapter of request to provide model registry.registerAdapter(model_factory, (IRequest,), Interface, 'model') # get the base app and return it app = config.make_wsgi_app() return app -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: Strange registry setup issue in config, can't find utilities registered
In case anyone finds this in a search, I found the answer, I needed to do the following before expecting a completely setup registry: config.commit() hope that helps somebody! iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
simulating pylons 1 static handling in pyramid
Apologies for posting to both discuss and dev, not sure if this qualifies as a dev issue as it may require adding to the zcml lookup machinery: I want to have my Pyramid app look first for static html files when given a path like /foo.html I can make this happen by using the following static declaration, but that seems to hide other views as well: static name= path=nf.static:html / When I use the above, I seem to get any request at the root directory being interpreted as a request for a static document only. I get a resource not found error when asking for a view named 'test' for example, that is registered and working at the path '/test'. In Pylons 1, the expected behaviour is for the system to find the html file first, which is kinda handy. Is there an easy way to accomplish this with static views that I'm missing? thanks Iain -- You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.
Re: pylons future plans?
On Mon, 2009-06-22 at 11:31 -0700, Ben Bangert wrote: On Jun 21, 2009, at 12:40 PM, Iain Duncan wrote: I don't know what Ben has up his sleeve but I think the core is essentially done with 0.9.7. The main incremental changes are on the periphery: improve @validate, replace @beaker_cache, improve the dependency documentation. I had a second job which sucked up all my time, and I'm just now getting back into programming.I expect the other developers have likewise been working on other stuff. Yep, that and wipe out the legacy code, which is actually about 1/3rd of the Pylons 0.9.7 code-base. Thanks Mike. I think for marketing purposes, it's pretty important that this kind of stuff be kept up to date. A lot of people checking Pylons out are going to want to make sure it isn't just going to 'stop' even though the stability is also a huge selling point. Yes, it does become tricky on what to sell in the way of 'new' when the scope of the framework is complete, and its mature. One of the issues is that Pylons itself isn't very plugin-compatible, and even Django's methodology of plugin apps is having issues scaling with conflicting settings.py files and such. Mmm, I was following that on pypefitters and am disappointed that efforts to continue seem to be being abandoned. I sure hope those involved decide it's worthwhile after all. Oh, the effort is still continuing. We're kicking around a new and small little framework called Pypes at the moment, that is designed for pluggable apps, components, etc. from the get-go in a way that scales to large numbers of plug-ins and settings. I believe this would keep with the philosophy of being flexible, while allowing much better re-usability between websites like how the Django apps allow a manner of re-usability. I'll post updates as we make more progress. Thanks Ben, that is great to hear! Some form of blog on the pylons site about what's going in the future would be awesome if you have the time. Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~--~~~~--~~--~--~---
Re: pylons future plans?
On Sat, 2009-06-20 at 18:55 -0700, Mike Orr wrote: On Sat, Jun 20, 2009 at 4:36 PM, Iain Duncaniaindun...@telus.net wrote: Hey guys, wondering if I could request perhaps a bit more attention on the website to what the future plans current work on pylons is. (I realize of course that now is a bit of an unwind post 0.9.7/new website/book time. ) I'm in the process of picking my base framework for a long range tool suite, and knowing what direction pylons will be taking or what will be coming down the pipe in the future would be helpful. I think it would be useful as a marketing tool for pylons too. Thanks for all the work! Iain There is a roadmap but it has gotten out of date. http://wiki.pylonshq.com/display/pylonscommunity/Pylons+Roadmap+to+1.0 I don't know what Ben has up his sleeve but I think the core is essentially done with 0.9.7. The main incremental changes are on the periphery: improve @validate, replace @beaker_cache, improve the dependency documentation. I had a second job which sucked up all my time, and I'm just now getting back into programming.I expect the other developers have likewise been working on other stuff. Thanks Mike. I think for marketing purposes, it's pretty important that this kind of stuff be kept up to date. A lot of people checking Pylons out are going to want to make sure it isn't just going to 'stop' even though the stability is also a huge selling point. There was a lot of discussion at PyCon about WSGI 2 and a new framework. I don't think either of those have gotten anywhere. There were some ideas to make a Pylons-like framework on top of zope.component alongside repoze.bfg, but it seems like the main people who wanted to integrate them each had a different idea about what level should be integrated and why. Which means maybe it's just better to leave them as they are because they're working. Mmm, I was following that on pypefitters and am disappointed that efforts to continue seem to be being abandoned. I sure hope those involved decide it's worthwhile after all. Thanks for the update Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~--~~~~--~~--~--~---
pylons future plans?
Hey guys, wondering if I could request perhaps a bit more attention on the website to what the future plans current work on pylons is. (I realize of course that now is a bit of an unwind post 0.9.7/new website/book time. ) I'm in the process of picking my base framework for a long range tool suite, and knowing what direction pylons will be taking or what will be coming down the pipe in the future would be helpful. I think it would be useful as a marketing tool for pylons too. Thanks for all the work! Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~--~~~~--~~--~--~---
Re: A Letter to the Authors of Web Authentication Libraries
On Sun, 2009-05-10 at 11:28 -0700, Mike Orr wrote: On Sun, May 10, 2009 at 4:27 AM, Paul Johnston paul@gmail.com wrote: Ben, I was thinking that adding this to AuthKit is the obvious choice. Neither AuthKit nor repoze.who are intrinsically part of Pylons, so you want to direct your question to James Gardner, the AuthKit maintainer, whom I'm cc'ing. Chris McDonough maintains repoze.who, and he primarily uses another framework so he may not be on this list. The best way to suggest changes to repoze.who is via the development links on http://static.repoze.org/whodocs/ . I maintain WebHelpers but I'll defer to Ben about any new decorator-helper combo. (By the way, there will be a WebHelpers release in a week or so if something is ready by then.) Each maintainer has his own criteria for what gets accepted into the package. But what I'm mainly looking for is a developer consensus on the following: - Does this approach make sense security-wise? Others understand this more than I do so I'm just watching the messages. - Does some people want this feature mean a wide variety of people do, or mainly one person? So far I haven't heard anybody else say, Yes, I want to use it. Of course, there may be people on the user list who'd want it, who aren't subscribed to this list I think in this case you may safely assume that there others watching and thinking they might use it once it exists and is documented, but don't understand the issues well enough to pipe in for this sort of discussion. If it is secure and a good idea, I'd probably use it. But I sure don't know enough to argue the details! Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~--~~~~--~~--~--~---
Re: Google Summer of Code 2009
On Thu, 2009-01-08 at 15:16 -0600, Ian Bicking wrote: Iain Duncan wrote: Writing a series of recipes (that can be tested automatically, probably with buildbot) might be a good addition? Figuring out how to write testable recipes is tricky, but a doable tricky. This sounds like a very interesting project, I have been thinking of something like that for some time. But as you said it quickly becomes too large. If this gets narrowed down it could be a solid candidate. Something like a code-review system meets wiki meets sphinx. It's so useful that it could be used by other projects. In my initial search for this someone point me out to http://docs.scipy.org/doc/ I think the way to do that is with doc test code in sphinx. The fact that you can hide code that still runs means you can make a recipe bit by bit and still be able to test the whole shebang by using the doctest builder. But I expect everyone already knows this... ;-) I've tried that, and it's really hard to manage. A full application layout is hard to define in doctest. And just generally if you want to present the evolution of an application, it's hard to maintain generally (e.g., you detect an error in step 3 and you have to backport it to step 2 and 1). Also doctesting HTML output kind of sucks, even if you try to be really minimalistic in your output. Good to know, thanks for the tip. That'll save me trying to take that idea too far for my own project. Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-devel group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~--~~~~--~~--~--~---