Re: [pylons-devel] Re: Deployment with supervisor + ZEO

2015-12-16 Thread Chris McDonough
On 12/16/2015 11:09 AM, Jonathan Vanasco wrote: > > > On Wednesday, December 16, 2015 at 3:00:08 AM UTC-5, Robin Harms > Oredsson wrote: > > OK thanks, I'll try to increase logging verbosity some way. The > permission part is something I've managed to rule out :/ > > > Just to be sure.

Re: [pylons-devel] "Knob" for ACLAuthorizationPolicy?

2015-06-11 Thread Chris McDonough
Id like to hear other people speak up who have needed the same knob. If this is something a few people have needed, I'd ask them if their life would be much better with a knob on aclauthorizationpolicy instead of a custom policy given that they would also need to document it and justify it in

Re: [pylons-devel] No waitress in requirements

2014-11-21 Thread Chris McDonough
On 11/21/2014 05:37 AM, Piotr Dobrogost wrote: Hi, In HISTORY.txt file there's this information: 1.3a4 (2012-01-05) (...) - Use the ``waitress`` WSGI server instead of ``wsgiref`` in scaffolding. However there's no dependency on 'waitress' in the setup.py. If scaffolding is to be treated as an

Re: [pylons-devel] Using lighter workers for waitress

2014-08-11 Thread Chris McDonough
On 08/11/2014 06:56 PM, Ram Rachum wrote: Hi, Does Waitress support using workers lighter than Python threads? No. - C Thanks, Ram. -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To unsubscribe from this group and stop receiving emails

Re: [pylons-devel] Probelms with wairtress in Python 2.7.7

2014-06-05 Thread Chris McDonough
On 06/05/2014 01:07 PM, Michael Merickel wrote: On Thu, Jun 5, 2014 at 11:40 AM, Chris McDonough mailto:chr...@plope.com>> wrote: On 06/05/2014 11:49 AM, Bert JW Regeer wrote: https://github.com/Pylons/__webob/pull/150 <https://github.com/Pylons/webob/pull/150>

Re: [pylons-devel] Probelms with wairtress in Python 2.7.7

2014-06-05 Thread Chris McDonough
Bert On Jun 5, 2014, at 08:26 , Chris McDonough wrote: On 06/05/2014 05:39 AM, Christoph Zwerschke wrote: Am 04.06.2014 12:58, schrieb Tjelvar: Yesterday we encountered a problem with Waitress when using the newly released Python 2.7.7 (on windows). I can confirm this issue on Python 2.7.7. It

Re: [pylons-devel] Probelms with wairtress in Python 2.7.7

2014-06-05 Thread Chris McDonough
On 06/05/2014 05:39 AM, Christoph Zwerschke wrote: Am 04.06.2014 12:58, schrieb Tjelvar: Yesterday we encountered a problem with Waitress when using the newly released Python 2.7.7 (on windows). I can confirm this issue on Python 2.7.7. It is obviously caused by the patch for http://bugs.pytho

Re: [pylons-devel] Re: Broken PDF link for 1.5 docs

2014-05-17 Thread Chris McDonough
On 05/17/2014 10:28 PM, JohnWShipman wrote: Still 404. Anybody? Bueller? Please use http://media.readthedocs.org/pdf/pyramid/1.5-branch/pyramid.pdf . ReadTheDocs doesn't much want to do what we tell it to do, so the "latest" PDF has been moving in and out of existence, AFAICT. - C On Tu

Re: invalid http://docs.pylonsproject.org/projects/pyramid/dev/objects.inv

2013-08-06 Thread Chris McDonough
On Tue, 2013-08-06 at 14:01 +0200, Hans-Peter Jansen wrote: > On Montag, 5. August 2013 22:50:52 Hans-Peter Jansen wrote: > > Hi, > > > > on a crusade to provide a full pyramid stack for openSUSE, I stumbled across > > an doc generation issue: > > > > intersphinx tries to download > > http://docs

Re: choice of documentation license

2013-03-22 Thread Chris McDonough
On Fri, 2013-03-22 at 22:07 +0200, Tshepang Lekhonkhobe wrote: > Why choose a non-commercial license[1]? This has the disadvantage of > disallowing, for example, Debian to distribute it[2], which would be > nice. > > [1]: http://creativecommons.org/licenses/by-nc-sa/3.0/ > [2]: http://bugs.debian.

Re: GSoC 2013

2013-03-03 Thread Chris McDonough
On Sat, 2013-02-16 at 22:12 -0800, Anirudha Bose wrote: > Sir/Ma'am, > > > I am interested in participating in the GSoC 2013 for the project > "some kind of interactive shell for pyramid kinda like > http://try.redis-db.com/";. I would like to know how to start working > on this. Thanks for the

Re: Why is there a separate pyramid_chameleon repository?

2013-01-20 Thread Chris McDonough
On Sun, 2013-01-20 at 00:32 -0800, Tshepang Lekhonkhobe wrote: > When I saw https://github.com/Pylons/pyramid_chameleon, I thought it's > a dependency of Pyramid, only to find that it's been integrated into > Pyramid itself. Why is it there? It was created at a sprint with the idea that we were g

Re: Return media files (such as jpg, png) in Response body other than String

2012-12-30 Thread Chris McDonough
On Sun, 2012-12-30 at 18:13 -0800, Shu Lin wrote: > Hi, > > > If I have other objects other than String, which is holding a jpg or > png file, I like to return it as Response body, how can I do? > > > I tried a piece of code like this: > > > mimetype = image/png > body = fs.open(acces

Re: can we have a new waitress release?

2012-11-14 Thread Chris McDonough
On 11/14/2012 01:58 PM, Lorenzo Gil Sanchez wrote: Hi, it's been 9 months since the 0.8.1 release and I'd like to have a new release because of the small issue it had with the test suite. At your request, 0.8.2 released: http://pypi.python.org/pypi/waitress/0.8.2 My short-term goal is to p

Re: Fail to correctly route with view_config decorator and GAE

2012-11-07 Thread Chris McDonough
view_config(route_name='test', renderer='json') def testMe(request): return{'result': 'hello'} Move testMe function above the "application = make_app()" line. This is just garden-variety Python behavior. - c On Wed

Re: Fail to correctly route with view_config decorator and GAE

2012-11-07 Thread Chris McDonough
On 11/07/2012 03:36 PM, tankerdude wrote: This will work... def working_view(request): return{'result': 'ok'} def make_app(): config.add_route('a', '/a', request_method='GET') config.add_view(working_view, route_name='a', renderer='json') That will go to /a with the method but no

Re: Make daemonize() Functionality Available to All Commands

2012-10-31 Thread Chris McDonough
On 10/31/2012 06:50 PM, Dave Mankoff wrote: Let me first say that pyramid has made writing cli scripts a breeze with pyramid.paster.bootstrap(). I love it! I am looking to turn some of my scripts into daemon processes. I went to look at how pserve does this, and I noticed that it is not a trivia

Re: Suggestion for Request namespace provisioning

2012-10-30 Thread Chris McDonough
On 10/30/2012 04:49 PM, Michael Merickel wrote: On Tue, Oct 30, 2012 at 3:34 PM, Jonathan Vanasco wrote: That pattern / functionality is great. I'm just talking about proactively saying "this name space is reserved for plugins, this namespace for projects - you can rest assured that as Pyramid

Re: Sites using Pyramid & Pyramid Advocacy

2012-10-22 Thread Chris McDonough
On 10/22/2012 07:58 PM, 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 the

Re: Sites using Pyramid & Pyramid Advocacy

2012-10-22 Thread Chris McDonough
On 10/22/2012 07:58 PM, 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 the

Re: AuthTktAuthenticationPolicy using MD5

2012-09-23 Thread Chris McDonough
On Sun, 2012-09-23 at 06:54 -0700, Florian Rüchel wrote: > > > On Sunday, September 23, 2012 3:11:51 PM UTC+2, Chris McDonough wrote: > On Sun, 2012-09-23 at 05:54 -0700, Florian Rüchel wrote: > > > > How about a script that

Re: AuthTktAuthenticationPolicy using MD5

2012-09-23 Thread Chris McDonough
On Sun, 2012-09-23 at 05:54 -0700, Florian Rüchel wrote: > > How about a script that's part of the framework itself? We > have pserve, > pcreate... how about > > pkeygen [-w ] > > or > > pyramid-keygen [-w ] > > I li

Re: AuthTktAuthenticationPolicy using MD5

2012-09-14 Thread Chris McDonough
On 09/14/2012 03:37 PM, Florian Rüchel wrote: Hi Domen, I would agree with you if it would really complicate things much, but I can't see why it would. All those cases are really simple to implement and I don't see any security risks either as the configuration of the hash algorithm is under ful

Re: AuthTktAuthenticationPolicy using MD5

2012-09-09 Thread Chris McDonough
On Sun, 2012-09-09 at 12:25 -0700, Florian Rüchel wrote: > > > On Sunday, September 9, 2012 8:23:45 PM UTC+2, Domen Kožar wrote: > Florian: do you plan to provide a patch? > > I am willing to provide a patch but I am new to pyramid and would > definitely need someone to double check whic

Re: AuthTktAuthenticationPolicy using MD5

2012-09-09 Thread Chris McDonough
> > Relevant: https://bitbucket.org/ianb/paste/changeset/7f90a96378ed\ Cool. We should do something similar I guess. > > On Sun, Sep 9, 2012 at 4:56 PM, Chris McDonough > wrote: > On Sun, 2012-09-09 at 06:55 -0700, Florian Rüchel wrote: > > I was getting interested in

Re: AuthTktAuthenticationPolicy using MD5

2012-09-09 Thread Chris McDonough
On Sun, 2012-09-09 at 06:55 -0700, Florian Rüchel wrote: > I was getting interested in how Pyramid's authentication works and > looked through the commonly used AuthTktAuthenticationPolicy code. I > found out it uses MD5 and the only thing keeping the cookie from being > forged is the secret. > >

Re: Pyramid 1.3 and zope.component question

2012-08-27 Thread Chris McDonough
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 pyrami

Re: proposal to decouple colander from translationstring

2012-06-27 Thread Chris McDonough
On 06/27/2012 02:01 PM, Alexey Luchko wrote: On 27.06.2012 19:39, Chris McDonough wrote: On 06/27/2012 12:34 PM, Alexey Luchko wrote: I've found colander translates error messages of exceptions :) It is cool and rather surprising, but is not always required. I'd like to use col

Re: proposal to decouple colander from translationstring

2012-06-27 Thread Chris McDonough
On 06/27/2012 12:34 PM, Alexey Luchko wrote: Hi! I've found colander translates error messages of exceptions :) It is cool and rather surprising, but is not always required. I'd like to use colander, but translationstring adds one extra dependency, that is useless for me. Please, could you re

Re: Small change proposal to pyramid.config.routes

2012-06-27 Thread Chris McDonough
On 06/27/2012 05:26 AM, abrinner wrote: Hello, I propose the following changes to pyramid/config/routes.py: 372c372,375 < pattern = self.route_prefix.rstrip('/') + '/' + pattern.lstrip('/') --- > if pattern: > pattern = self.route_prefix.rstrip('/') + '/

Re: Help needed: EuroPython poster session

2012-06-15 Thread Chris McDonough
On 06/15/2012 10:33 AM, Arndt Droullier wrote: So, here is a poster (even two). It's more or less the website in poster format. Any comments or spotted mistakes? http://demo.poolyx.net/website/root/europython_poster/45/file/poster1.jpg http://demo.poolyx.net/website/root/europython_poster/46/fil

Re: Help needed: EuroPython poster session

2012-06-14 Thread Chris McDonough
On 06/14/2012 07:07 AM, Arndt Droullier wrote: Hi, do you still need help? I will attend the EuroPython and could help out with the poster session (by the way there two poster sessions). Or if someone else took over I could offer some support. Though I'm not a designer I can layout and/or create

Re: SQLAlchemy + URL Dispatch Wiki Tutorial

2012-04-19 Thread Chris McDonough
On 04/19/2012 07:41 AM, Ian McLoughlin wrote: I've tried simply to create an alchemy scaffold app, only changing the development.ini file to use a MySQL database. I've created the database already, but it's empty - no tables. Running pserve then i get an error because the database hasn't been se

Re: wildcard domain for "sibling" domains

2012-03-27 Thread Chris McDonough
On Tue, 2012-03-27 at 12:18 -0700, Jason wrote: > I would like the auth ticket authentication policy to also set the > wild card domain for domains one level up from the current domain. For > example: An application running on the domain x.y.foo.com would have > ".y.foo.com" set as the domain for o

Re: [Feature Suggest] Consider dropping a python package and paster ini file approach as default.

2012-03-10 Thread Chris McDonough
On Fri, 2012-03-09 at 22:43 -0800, Cosmia Luna wrote: > As a freshman in python, it made me very confused once what does a > package mean and the weird file such like *.egg-info, > entry_points.txt, setup.cfg ... I can't understand very well even > today. And the paster like ini file, plain python

Re: Per view authentication policy

2012-03-02 Thread Chris McDonough
On Fri, 2012-03-02 at 14:29 +0100, David Libault wrote: > Hi there, > > I am looking for a clean way of implementing two or more different > authentication policies inside a pyramid application, and select the > policy a per view basis, maybe with an overload of the view_config > decorator. > > >

Re: Nested adaptation using Pyramid's registry

2012-03-01 Thread Chris McDonough
On Thu, 2012-03-01 at 23:03 +0700, Jonathan Ballet wrote: > On Thu, Mar 01, 2012 at 10:48:02AM -0500, Chris McDonough wrote: > > > > Yes, I read the document you mentioned, but I actually want to know if > > > there is a way and how to do *without* using the global registr

Re: Nested adaptation using Pyramid's registry

2012-03-01 Thread Chris McDonough
On Thu, 2012-03-01 at 22:36 +0700, Jonathan Ballet wrote: > On Thu, Mar 01, 2012 at 10:29:29AM -0500, Chris McDonough wrote: > > On Thu, 2012-03-01 at 20:26 +0700, Jonathan Ballet wrote: > > > Hello, > > > > > > I have some code which looks like thi

Re: Nested adaptation using Pyramid's registry

2012-03-01 Thread Chris McDonough
On Thu, 2012-03-01 at 20:26 +0700, Jonathan Ballet wrote: > Hello, > > I have some code which looks like this: > > @adapter(IFolder) > @implementer(IImage) > def thumbnail_of_folder(folder): > return IImage(folder[0]) > > I want this to adapt and recurse into the subfolders u

Re: Can't return JSON using 1.3b1

2012-02-28 Thread Chris McDonough
On Tue, 2012-02-28 at 10:03 -0800, Ben Sizer wrote: > On Feb 28, 5:41 pm, Chris McDonough wrote: > > > > You can't mic view_config with add_view. Instead use view_config with a > > scan: > > > > from wsgiref.simple_server import make_server > > from

Re: Can't return JSON using 1.3b1

2012-02-28 Thread Chris McDonough
On Tue, 2012-02-28 at 09:25 -0800, Ben Sizer wrote: > Here's my code (JSON function copied from > http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/renderers.html, > and the rest from the Hello World): > > > from wsgiref.simple_server import make_server > from pyramid.config i

Re: Question: How can I response a JSON with render='json',and set the header

2012-02-20 Thread Chris McDonough
On Mon, 2012-02-20 at 07:34 -0800, Zane wrote: > Thanks @Chris > > Yes.This is what I want, but now I receive a string > "{'succeed':True}", and before I add header in response is a object > {'succeed':True} ( I using Ajax) > I guess this cause the view_config(renderer='json') > > But How can I a

Re: Question: How can I response a JSON with render='json',and set the header

2012-02-20 Thread Chris McDonough
On Mon, 2012-02-20 at 06:55 -0800, Zane wrote: > Sample: > @view_config(permission = 'view',route_name='addUser', > renderer='json', custom_predicates=(allowed_methods('POST'),)) > def add(request): > post_data = request.json_body > email = post_data['email'] > headers = remember(req

Re: Illegal character in URL - possible bug in pyramid 1.3a7

2012-02-11 Thread Chris McDonough
On Sat, 2012-02-11 at 10:32 -0800, Zoltan Benedek wrote: > Illegal character in URL -> "Internal system error", > "UnicodeDecodeError" > > The error can be reproduced. Might be the bug is in WebOb, but I > cannot investigate deeper. May be there is a solution to avoid the > system break. > > When

Re: Template by name 'pyramid_zodb' not found

2012-02-09 Thread Chris McDonough
On Thu, 2012-02-09 at 14:16 -0800, ap wrote: > Hi, I am new to python and pyramid > and unable to prepare project with 'bin/paster create -t pyramid_zodb > tutorial' (as described in "ZODB + Traversal Wiki Tutorial"). > Error message: "Template by name 'pyramid_zodb' not found". > I have installed

Re: file upload

2012-02-08 Thread Chris McDonough
On Wed, 2012-02-08 at 12:40 -0800, Craig Swank wrote: > I made an app with pcreate -t starter and pasted your app's view stuff > in and it worked there as well, started it with pserve and both > uploads worked there as well. > > > On Feb 8, 1:32 pm, Craig Swank wrote: > > Your app also works in

Re: file upload

2012-02-08 Thread Chris McDonough
Can't replicate. This app tries to do so but using either "/broken" or "/works", it returns the same result (a repr of the FieldStorage) on Pyramid 1.3a7: from waitress import serve from pyramid.config import Configurator from pyramid.response import Response from pyramid.view import view_config

Re: How can I manage arguments of view_config automatically?

2012-02-02 Thread Chris McDonough
On Thu, 2012-02-02 at 06:03 -0800, Cosmia Luna wrote: > Since the 1.3-branch is in alpha status now, I have little confidence > using it. > I tried simply copying the code from 1.3a6 but it failed to work. > It seems that I have to wait before 1.3-branch is stable. It's up to you, but the alpha de

Re: How can I manage arguments of view_config automatically?

2012-02-01 Thread Chris McDonough
On Wed, 2012-02-01 at 20:11 -0800, Cosmia Luna wrote: > I'm a beginner in both python and pyramid, sorry if my question is > silly. > I'm using class-based view-callable in pyramid. > > > In package.views.someview, I usually write: > > > # -*- coding: utf-8 -*- > from pyramid.view import view_c

Re: pyramid should explicitly require pastescript

2012-01-31 Thread Chris McDonough
On Tue, 2012-01-31 at 09:37 -0800, Jonathan Vanasco wrote: > i'm not too familiar with "paster create" - do you think it would be > possible to make an entry point that warned people to use pcreate? Not really, because they also might have PasteScript installed, and the two entry points would comp

Re: pyramid should explicitly require pastescript

2012-01-30 Thread Chris McDonough
On Jan 30, 4:38 pm, Jonathan Vanasco wrote: > and playing around a bit, i see that the newest version of pyramid > moved to pcreate from paster create... so perhaps the above is not > needed. That's true... http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/whatsnew-1.3.html#python-3-c

Re: Feature proposal: includeme feature for classes (not only modules)

2011-12-23 Thread Chris McDonough
On Fri, 2011-12-23 at 21:43 -0800, Ahmed wrote: > Hello all and merry Christmas > > The documentation now says that the includeme callable for > config.include is only to be used if you are including modules. > > But consider this case: > > class MyView(object): > @classmethod > def in

Re: pyramidtut

2011-11-16 Thread Chris McDonough
On Wed, 2011-11-16 at 05:39 -0800, czam wrote: > Hi list, I got a strange error starting with the wiki tutorial at > http://docs.pylonsproject.org/projects/pyramid/dev/tutorials/wiki2/installation.html > Seems to be a problem in the webob egg... > Just 2 days before I got the tutorial working on an

Re: pyramid tutorials and source code

2011-11-01 Thread Chris McDonough
Thank you! I've put an issue to be fixed later into https://github.com/Pylons/pyramid/issues/334 - C On Tue, 2011-11-01 at 15:21 -0700, Adrien wrote: > Hi, > > Maybe it's me but the pyramid 1.2 tutorial documentation found here: > > http://docs.pylonsproject.org/projects/pyramid/1.2/tutorial

Re: Pyramid debug toolbar and non-ascii errors

2011-10-25 Thread Chris McDonough
On Tue, 2011-10-25 at 22:31 +0200, Christoph Zwerschke wrote: > My solution was to wrap exceptions and tracebacks in text_() calls, e.g. > in render_summary, render_full and generate_plaintext_traceback. > > This avoids the crashes, but utf-8 messages will look odd because > text_() assumes lati

Re: Logging configuration

2011-10-21 Thread Chris McDonough
On Fri, 2011-10-21 at 02:50 -0700, Mattias wrote: > I am setting up a little test application using pylons and pyramids, I > am currently using mod_wsgi under apache2 as the server. So far > everything works perfectly except my logging. I have tried to change > the > > On the page > http://docs.p

Re: possible regression bug re includeOverrides in pyramid 1.2

2011-10-07 Thread Chris McDonough
/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: 'pyramid.exceptions.

Re: possible regression bug re includeOverrides in pyramid 1.2

2011-10-07 Thread Chris McDonough
On Sep 28, 6:05 pm, Iain Duncan 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 pyra

Re: Best deployment method...

2011-10-05 Thread Chris McDonough
ill 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 > > O

Re: Best deployment method...

2011-10-05 Thread Chris McDonough
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/deployment/nginx.html > > Or using apache + mod_wsgi as described here: > https://docs.pylon

Re: A little sqla help?

2011-09-26 Thread Chris McDonough
On Mon, 2011-09-26 at 20:12 -0400, Chris McDonough wrote: > SQLAlchemy people with a heart: I could use some help porting > zope.sqlalchemy to Python 3... this is the package that integrates a > transaction manager with SQLAlchemy: > http://pypi.python.org/pypi/zope.sqlalchemy/0.6.1

A little sqla help?

2011-09-26 Thread Chris McDonough
SQLAlchemy people with a heart: I could use some help porting zope.sqlalchemy to Python 3... this is the package that integrates a transaction manager with SQLAlchemy: http://pypi.python.org/pypi/zope.sqlalchemy/0.6.1 I have made most of its tests pass on Python 3, but two fail. To reproduce: ht

Pyramid on Python 3.2

2011-09-25 Thread Chris McDonough
Hi folks, I've been busy doing a stupid amount of work trying to make Pyramid work on Python 3.2. The good news is that it's getting there. The core of the current Pyramid master branch at https://github.com/organizations/Pylons now runs and all of its unit tests pass under Python 3.2. Many lim

Re: Insert jsonp on zcml

2011-09-12 Thread Chris McDonough
On Mon, 2011-09-12 at 14:19 -0400, Chris McDonough wrote: > The JSONP renderer cannot be used via ZCMLm, sorry. I should say that the above is not entirely true, it just requires extra effort: # in module named myapp.renderers from pyramid.renderers import JSONP jsonp = JSONP('callback

Re: Insert jsonp on zcml

2011-09-12 Thread Chris McDonough
The JSONP renderer cannot be used via ZCMLm, sorry. - C On Mon, 2011-09-12 at 09:58 -0700, Jamil Atta Junior wrote: > Hi people, > > I try to use the zcml with jsonp, and I receiving this error message: > > result = renderer(value, system_values) > TypeError: __call__() takes exactly 2 argument

Re: Instance level authorization in Pyramid

2011-09-05 Thread Chris McDonough
On Mon, 2011-09-05 at 15:50 -0500, Michael Merickel wrote: > Brian, I just want to clarify some points from your original email. > > > Specifying the ``factory`` on the route is telling the traversal > system how to get the root of your resource tree for that specific > route. Thus in your exampl

Re: Instance level authorization in Pyramid

2011-09-05 Thread Chris McDonough
On Mon, 2011-09-05 at 12:44 -0700, Brian wrote: > Chris, > > Thanks for the reply. One more question... > > Is it acceptable for __acl__ to be a callable associated with an > instance? > > def __acl__(self): > return [ > (Allow, 'user:%s' % self.owner, 'edit'), > ] No, it must be an at

Re: Pyramid & Nginx - help!

2011-09-05 Thread Chris McDonough
On Mon, 2011-09-05 at 08:26 -0700, Sascha Boch wrote: > Hi there, > > I followed the example on the following page to deploy my app using > nginx: > > https://docs.pylonsproject.org/projects/pyramid_cookbook/dev/deployment.html#nginx-paster-supervisord > > The problem is that I need to use a dif

Re: Instance level authorization in Pyramid

2011-09-05 Thread Chris McDonough
On Thu, 2011-09-01 at 06:30 -0700, Brian wrote: > I'm in the early stages of designing a my first Pyramid app and I was > hoping for some verification on my approach to instance level > authorization. Most of the stock documentation discusses global ACLs > which apply to an entire class, not indivi

Re: problem running helloworld

2011-09-01 Thread Chris McDonough
On Thu, 2011-09-01 at 13:11 -0700, Siddhartha Kasivajhula wrote: > Thanks guys, I was able to get it running using those instructions. > > > Though, while working through those I realized that I'd never > "activated" my virtualenv during my initial install attempt -- are > the instructions missi

Re: problem running helloworld

2011-08-31 Thread Chris McDonough
://docs.pylonshq.com > Best match: pyramid 1.2a3 > > > > > Not sure if that's the right version I should be using? Is there a way > off the top of your head that I can get it to use 1.1 instead? It should not matter. > > > Thanks, > -Sid > >

Re: problem running helloworld

2011-08-31 Thread Chris McDonough
On Wed, 2011-08-31 at 11:41 -0700, Siddhartha Kasivajhula wrote: > Hi all, > I'm new to Pyramid, and let me say first that it looks really cool and > I've been meaning to try it for a while :). > I was going through the documentation on installation and the hello > world app, and I ran into this er

Re: Full and relative URL.

2011-08-07 Thread Chris McDonough
On Mon, 2011-08-08 at 07:04 +0200, Eric Lemoine wrote: > On Mon, Aug 8, 2011 at 6:49 AM, Chris McDonough wrote: > > On Mon, 2011-08-08 at 06:38 +0200, Eric Lemoine wrote: > >> >> Right. I'd rather apply this: "don't generate fully-qualified URLs in > &g

Re: Full and relative URL.

2011-08-07 Thread Chris McDonough
On Mon, 2011-08-08 at 06:38 +0200, Eric Lemoine wrote: > >> Right. I'd rather apply this: "don't generate fully-qualified URLs in > >> your web apps, or you may have trouble running them behind proxies". > > > > You're eventually going to run into situations with middleware that > > unconditionally

Re: JSON-RPC support

2011-08-07 Thread Chris McDonough
On Sun, 2011-08-07 at 08:29 -0400, Jim Washington wrote: > Hello, > > Can I expect JSON-RPC support to land in the near future? > > I am working with John Boik on a tutorial extending the SQLAlchemy + URL > Dispatch Pyramid tutorial. We are adding a Pyjamas + PureMVC client that > will do some aj

Re: Full and relative URL.

2011-08-07 Thread Chris McDonough
On Sun, 2011-08-07 at 14:35 +0200, Eric Lemoine wrote: > > > > ServerName www.example.com > > RewriteEngine On > > RewriteRule ^/(.*) http://appserver:6543/$1 [L,P] > > ProxyPreserveHost on > > > > > > The above configuration will pass the request off to > > http://appse

Re: Full and relative URL.

2011-08-07 Thread Chris McDonough
On Sun, 2011-08-07 at 09:49 +0200, Eric Lemoine wrote: > > There's no reason for the Host header to *not* be passed > > to the backend server, especially if one of the main purposes in life of > > the Apache server is to be a frontend for the application being proxied > > to. Having it Off is a p

Re: Full and relative URL.

2011-08-06 Thread Chris McDonough
On Sat, 2011-08-06 at 22:56 +0200, Eric Lemoine wrote: > > > > In what configuration would it be sane to have any proxy set the > Host > > header to anything except what the client user agent says the Host > > header is? > > Here's what the Apache doc says about the ProxyPreserveHost directive: >

Re: Full and relative URL.

2011-08-04 Thread Chris McDonough
On Thu, 2011-08-04 at 17:40 +0200, Eric Lemoine wrote: > >> Shouldn't Pyramid be able to generate paths, as opposed to URLs, for > >> static resources? Fowarding the Host header doesn't sound like a good > >> solution, as you'll run into issues if you have (Apache) virtual hosts > >> on the backend

Re: Full and relative URL.

2011-08-04 Thread Chris McDonough
On Thu, 2011-08-04 at 10:45 +0200, Eric Lemoine wrote: > On Mon, Jan 24, 2011 at 6:22 AM, Chris McDonough wrote: > > Have nginx pass through the Host header to Pyramid. The right URLs will > > be generated. > > Chris, > > Shouldn't Pyramid be able to generat

Re: Sub-optimal top paragraph on pylonsproject.org

2011-07-20 Thread Chris McDonough
On Wed, 2011-07-20 at 01:52 -0700, Eric Ongerth wrote: > Quote from the current http://pylonsproject.org : > > "The Pylons Project was founded by the people behind the Pylons web > framework to develop web application framework technology in Python. > Rather than focusing on a single web framework

Re: permission on view for Forbidden context

2011-07-13 Thread Chris McDonough
On Wed, 2011-07-13 at 21:20 +0200, Pierre GIRAUD wrote: > It looks like I cannot set a permission to a view added for the > Forbidden context. > > config.add_view('tutorial.login.login', > renderer='tutorial:templates/login.pt', > context='pyramid.ex

feature requests before beta.

2011-07-03 Thread Chris McDonough
I'm going to issue the first beta of Pyramid 1.1 soon. "Beta" really just means "no new features". Speak now or forever hold your peace on feature requests for 1.1, as they will have to wait for 1.2 upon the first beta of 1.1. - C -- You received this message because you are subscribed to the

Re: Async web apps with pyramid

2011-06-16 Thread Chris McDonough
On Fri, 2011-06-17 at 00:25 +0530, Raviteja wrote: > Hi everyone, > > > How can we invoke multiple threads of processing from the view > handler, so that the threads run independently and provide results, > which will be returned by the view handler? The threads described > above will invoke requ

Re: Adding "abort" and "redirect" to Pyramid

2011-06-03 Thread Chris McDonough
On Fri, 2011-06-03 at 02:51 -0500, Michael Merickel wrote: > +1 to the "raise abort(..)" or "raise redirect(..)" options. > > I'm torn on the ability to raise arbitrary Response objects. > Also I'm curious about what the deal is with conditional responses... > I'm not very familiar with them but I

Re: Adding "abort" and "redirect" to Pyramid

2011-06-01 Thread Chris McDonough
ve my 2 cent straight > > away (and if it was already addressed, reply "already addressed", and > > I will dig into the thread's archives): > > > > 2011/5/15 Chris McDonough : > >>def aview(request): > >>abort(401) > >>

Re: Adding "abort" and "redirect" to Pyramid

2011-05-31 Thread Chris McDonough
On Tue, 2011-05-31 at 16:44 -0700, Philip Jenvey wrote: > On May 31, 2011, at 12:55 PM, Chris McDonough wrote: > > > On May 16, 2:27 am, Chris McDonough wrote: > >> I've created a branch named "httpexception-utils" on GitHub which > >> contains an

Re: Adding "abort" and "redirect" to Pyramid

2011-05-31 Thread Chris McDonough
Sorry, my last response got sent too soo. On Tue, 2011-05-31 at 14:47 -0700, Mike Orr wrote: > On Tue, May 31, 2011 at 12:55 PM, Chris McDonough wrote: > > - We will disuse the classes from webob.exc because, although they > > advertise themselves as Response objects, they re

Re: Adding "abort" and "redirect" to Pyramid

2011-05-31 Thread Chris McDonough
On Tue, 2011-05-31 at 14:47 -0700, Mike Orr wrote: > On Tue, May 31, 2011 at 12:55 PM, Chris McDonough wrote: > > - We will disuse the classes from webob.exc because, although they > > advertise themselves as Response objects, they really very badly > > want to be used

Re: Adding "abort" and "redirect" to Pyramid

2011-05-31 Thread Chris McDonough
On May 16, 2:27 am, Chris McDonough wrote: > I've created a branch named "httpexception-utils" on GitHub which > contains an implementation of "redirect" and "abort" for Pyramid that > act like their Pylons brethren. Here's what I've decid

Re: Interaction of webob.Response, conditional responses and pyramid.router

2011-05-31 Thread Chris McDonough
On Tue, 2011-05-31 at 17:01 +0900, Ceri Storey wrote: > Hi there. > > > I'm just doing some work to add conditional responses to a small web > gallery project I'm writing, and I noticed that in pyramid.router, the > response's __call__ method itself is not invoked itself, meaning that > even if w

Re: route_url _query None value behavior

2011-05-26 Thread Chris McDonough
None values to ''. Having None convert > > to "None" is almost never useful in query parameters, while having > > integers and other types converted to strings is useful. So that all > > argues for trapping None and either converting it to '' or delet

Re: Adding "abort" and "redirect" to Pyramid

2011-05-25 Thread Chris McDonough
On Mon, 2011-05-16 at 02:27 -0400, Chris McDonough wrote: > I've created a branch named "httpexception-utils" on GitHub which > contains an implementation of "redirect" and "abort" for Pyramid that > act like their Pylons brethren. Thanks a lot for ev

Re: route_url _query None value behavior

2011-05-21 Thread Chris McDonough
Don't think this is really right if you consider the desire to be able to pass integers (like 0), which others have requested before. What precedent is there to passing the value None being converted to empty string? - C On Sat, 2011-05-21 at 18:35 -0700, Jerry wrote: > Google group messes with

Re: odd test problem

2011-05-18 Thread Chris McDonough
On Wed, 2011-05-18 at 17:35 +0200, Wichert Akkerman wrote: > I think I finally found the state leakage problem. What appears to be > happening is this: > > First test A runs, and creates a Configuration() instance and does some > work on it, including calling config.scan(). This instance is garb

Re: Adding "abort" and "redirect" to Pyramid

2011-05-16 Thread Chris McDonough
On Mon, 2011-05-16 at 11:42 -0500, Michael Merickel wrote: > Is there any support for integrating "abort(404)" with "raise > NotFound" such that my 404 is rendered properly? Same with > "abort(403)" and Forbidden. No, except in the docs I explain the difference between NotFound and HTTPNotFound an

Adding "abort" and "redirect" to Pyramid

2011-05-15 Thread Chris McDonough
I've created a branch named "httpexception-utils" on GitHub which contains an implementation of "redirect" and "abort" for Pyramid that act like their Pylons brethren. In short, the abort feature is used like this: from pryamid.httpexceptions import abort def aview(request): abor

Re: [deform] limit number of entries in a SequenceSchema

2011-05-03 Thread Chris McDonough
On Tue, 2011-05-03 at 17:31 +0100, Chris Withers wrote: > Hi All, > > What's the correct way to limit the number of entries in a > SequenceSchema node? > > The requirements is something like "each job must have at least one > requirement line, but no more than 5" Not sure if you mean UI or val

Re: unit test to check if for a given path a correct context will be returned

2011-04-16 Thread Chris McDonough
On Sat, 2011-04-16 at 08:30 -0700, mdob wrote: > Hi Chris, > > > Thanks for answering. > > > Lets assume the following: > > > model = {'book':{'title':"Ender's Game", pages: 270, > author:{'name':'Orson Scott Card', nationality:'American', > 'genre':'sci-fi'}}} > > > The root for traversal

Re: unit test to check if for a given path a correct context will be returned

2011-04-15 Thread Chris McDonough
On Fri, 2011-04-15 at 15:39 -0700, mdob wrote: > Just like in the title. I have a model and I can test in manually in a > browser. I enter url in a browser and receive a result form one of the > views. Thing is unittest should be doing that. Functional test isn't > exactly what is needed. Because I

  1   2   3   >