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] 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
Bert On Jun 5, 2014, at 08:26 , Chris McDonough chr...@plope.com 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

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

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]:

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 offer.

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

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(access_path,

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

Re: Fail to correctly route with view_config decorator and GAE

2012-11-07 Thread Chris McDonough
. - c On Wednesday, November 7, 2012 12:48:21 PM UTC-8, Chris McDonough wrote: 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

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

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 jonat...@findmeon.com 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

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 mailto: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

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 filename] or pyramid-keygen [-w filename]

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. I see

Re: AuthTktAuthenticationPolicy using MD5

2012-09-09 Thread Chris McDonough
/paste/changeset/7f90a96378ed\ Cool. We should do something similar I guess. On Sun, Sep 9, 2012 at 4:56 PM, Chris McDonough chr...@plope.com wrote: On Sun, 2012-09-09 at 06:55 -0700, Florian Rüchel wrote: I was getting interested in how Pyramid's authentication works

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 which

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

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: 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: 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

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: 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 one of

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: 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 until it

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 this: @adapter(IFolder) @implementer(IImage

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 registry or accessing the thread

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 import

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 chr...@plope.com 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 pyramid.config import Configurator from

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(request,

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 add header

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 I type the

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: 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 craigsw...@gmail.com wrote: Your app

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

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_config

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 compete

Re: pyramid should explicitly require pastescript

2012-01-30 Thread Chris McDonough
On Jan 30, 4:38 pm, Jonathan Vanasco jonat...@findmeon.com 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...

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

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

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 latin-1

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

Re: possible regression bug re includeOverrides in pyramid 1.2

2011-10-07 Thread Chris McDonough
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

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:

Re: Best deployment method...

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

Re: A little sqla help?

2011-09-27 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 I have made

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:

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

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 arguments (3

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: 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

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 attribute,

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 missing that

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 error

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 poor

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 generates

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: When

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 server.

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, the

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: 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 get

Re: Adding abort and redirect to Pyramid

2011-06-02 Thread Chris McDonough
(and if it was already addressed, reply already addressed, and I will dig into the thread's archives): 2011/5/15 Chris McDonough chr...@plope.com: def aview(request): abort(401) def aview(request): redirect('http://example.com') What I *really* didn't like

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 we

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 chr...@plope.com 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 as WSGI

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 chr...@plope.com wrote: I've created a branch named httpexception-utils on GitHub which contains an implementation of redirect and abort

Re: route_url _query None value behavior

2011-05-26 Thread Chris McDonough
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 deleting the parameter. On Sat, May 21, 2011 at 7:39 PM, Chris McDonough chr...@plope.com wrote

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 garbage

Adding abort and redirect to Pyramid

2011-05-16 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):

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 and

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 validation,

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

Re: Resolving relative asset spec of renderer

2011-04-13 Thread Chris McDonough
On Wed, 2011-04-13 at 06:30 -0700, Dmitry Vakhrushev wrote: Hi All. I develop CMS using pyramid. CMS consist of core and some plugins. Application which use CMS looks like: from pyramid.config import Configurator def main(global, **settings): config = Configurator(settings=settings)

Re: GSoC, Python 3 dependencies, Paste

2011-04-05 Thread Chris McDonough
On Tue, 2011-04-05 at 23:16 +0200, Juliusz Gonera wrote: Chris McDonough wrote: I think asking a single student to port everything is too much. At this point, I think there's an opportunity to get two students working on the porting effort. I see. I didn't know that. I thought

Re: GSoC, Python 3 dependencies, Paste

2011-04-04 Thread Chris McDonough
On Mon, 2011-04-04 at 10:52 -0700, Alice Bevan–McGregor wrote: Regarding Paste and comments on https://github.com/Pylons/pyramid/wiki/Pyramid-2-Brainstorm: 1. YAML vs INI - is there any decision? There isn't any particular reason not to go with both, INI for backwards compatibility

Re: GSoC, Python 3 dependencies, Paste

2011-04-04 Thread Chris McDonough
On Mon, 2011-04-04 at 18:05 +0200, Juliusz Gonera wrote: Hi, I thought that it will be easier if I just post here instead of trying to catch someone on IRC. I have quite a few questions regarding GSoC. First of all, I'm not quite sure if I should propose the specific project or it

Re: requests and transactions

2011-03-31 Thread Chris McDonough
On Thu, 2011-03-31 at 16:49 +0100, Chris Withers wrote: On 31/03/2011 16:09, Chris Withers wrote: What's the preferred way of working with transactions now, be they just SQLAlchemy transactions or, more likely, a bunch of things tied together by a transaction from the 'transaction' package?

Re: how can I iterate dict instance in a chameleon template

2011-03-30 Thread Chris McDonough
On Wed, 2011-03-30 at 21:59 +0900, Ha Nyung Chung wrote: Can I iterate all values in dict object in a chameleon template? I made view callable return dict object named params, which contains all parameter key/value pairs and chose to use chameleon template as a renderer. I wanted to iterate

Re: Terminology Change - Template to Skeleton

2011-03-21 Thread Chris McDonough
On Mon, 2011-03-21 at 13:32 -0500, Joe Dallago wrote: Yah the term 'scaffold' is used in a number of rails-like php frameworks as well. I think it would be more easily recognized than skeleton. -1 skeleton. +1 scaffold. Also fine by me. -- You received this message because you are

Re: Terminology Change - Template to Skeleton

2011-03-21 Thread Chris McDonough
On Mon, 2011-03-21 at 21:53 -0500, Joe Dallago wrote: Haha Daniel, I honestly didn't realize this would become such a big topic of conversation, seeing as it isn't really that important of an issue. http://en.wikipedia.org/wiki/Parkinson's_Law_of_Triviality I just wanted to make sure that

Re: Terminology Change - Template to Skeleton

2011-03-20 Thread Chris McDonough
Fine by me. - C On Sun, 2011-03-20 at 22:12 -0500, Joe Dallago wrote: This issue has been previously discussed, I just wanted to make sure that everyone agrees. At the moment the docs refer to paster templates and renderered templates(mako, chameleon, jinja) using the same name. I propose

Re: webob.acceptparse __radd__

2011-03-16 Thread Chris McDonough
On Wed, 2011-03-16 at 10:18 -0700, Alexandre Conrad wrote: Ok, I figured it out: __radd__ function is only called if the left operand does not support the corresponding operation and the operands are of different types. For instance, to evaluate the expression x - y, where y is an instance

Re: pyramid start example (4.1) does not run on my machine

2011-03-10 Thread Chris McDonough
My only guess is that you're not using the virtualenv paster or python when you're trying to start the application. On Wed, 2011-03-09 at 00:16 -0800, armen wrote: Dear community, I am new to pyramid, I followed the installation steps as described in pyramid 1.0 documentation, but when I

Re: Questions for Pyramid talk at PyCon

2011-03-10 Thread Chris McDonough
Might be nice to talk about Akhet (nee pylons_sqla) for ex-Pylons folks. It's not released but hopefully shortly. On Wed, 2011-03-09 at 11:03 -0600, Carlos de la Guardia wrote: Hi, I'll be doing a talk about frequently asked questions about Pyramid. I'd like to cover technical questions,

Re: How do I combine paster templates?

2011-03-05 Thread Chris McDonough
You can't combine them but you can start out using paster create -t pyramid_routesalchemy myproject then change the result to use Jinja2 using the docs from pyramid_jinja2 at http://docs.pylonsproject.org/projects/pyramid_jinja2/dev/ - C On Sat, 2011-03-05 at 12:34 -0800, Sasker wrote: Hi I

Re: Some thoughts about Pyramid

2011-03-04 Thread Chris McDonough
On Thu, 2011-03-03 at 23:42 -0800, Peter Alexis wrote: I mentioned unless there are new magical docs, because I think 99% of the problems with pyramid right now are the docs. They're hard to sift through (rather dense) and easy to miss things in. Meanwhile, docs for projects like Django

Re: Some thoughts about Pyramid

2011-03-04 Thread Chris McDonough
, Chris McDonough chr...@plope.com wrote: On Thu, 2011-03-03 at 17:57 -0600, Joe Dallago wrote: So the thing we can carry away from this discussion is that we should improve Pyramid's new user experience, with tutorials and perhaps some defaults for basic functionality. We hold these truths

Re: Some thoughts about Pyramid

2011-03-04 Thread Chris McDonough
For the record, Bottle takes this tact. It's full feature set actually depends on many, many packages (many more than Pyramid does). But it ships as a single file with no dependencies. I'm not a huge fan of this. Maybe it's a successful marketing gimmick but it doesn't actually reduce any

Re: Some thoughts about Pyramid

2011-03-04 Thread Chris McDonough
On Fri, 2011-03-04 at 04:43 -0800, Andrey Petrov wrote: Re: Excessive dependencies. Right now when you 'pip install pyramid' on a fresh environment, you get 18 packages installed: Chameleon, Mako, MarkupSafe, Paste, PasteDeploy, PasteScript, WebOb, pyramid, repoze.lru,

Re: Some thoughts about Pyramid

2011-03-04 Thread Chris McDonough
Could you put this in the Pyramid issue tracker? On Fri, 2011-03-04 at 14:28 -0500, Daniel Holth wrote: My wishlist for the manual: 1. searching for request.response_headers should pull up request.response_headerlist 2. glossary for 'Configurator' etc. should link to function signatures

Re: Some thoughts about Pyramid

2011-03-04 Thread Chris McDonough
On Fri, 2011-03-04 at 12:00 -0800, Mike Orr wrote: On Thu, Mar 3, 2011 at 11:42 PM, Peter Alexis palexis2...@gmail.com wrote: I mentioned unless there are new magical docs, because I think 99% of the problems with pyramid right now are the docs. They're hard to sift through (rather dense)

Re: Some thoughts about Pyramid

2011-03-04 Thread Chris McDonough
On Fri, 2011-03-04 at 16:38 -0500, Reed L O'Brien wrote: On Mar 4, 2011, at 3:42 PM, Blaise Laflamme wrote: That said we definitely need to communicate the right message, provide the right level of documentation for the targeted audience, have a better way to expose tools and

Re: Some thoughts about Pyramid

2011-03-03 Thread Chris McDonough
On Thu, 2011-03-03 at 03:54 -0800, Peter Alexis wrote: Just happened to see a blog about Pyramid, http://slacy.com/blog/2011/02/why-im-unhappy-with-the-pyramid-web-framework/ Sounds like (s)he is blowing off a little steam. All of these points are addressed in

Re: Some thoughts about Pyramid

2011-03-03 Thread Chris McDonough
On Thu, 2011-03-03 at 09:39 -0800, Stephen Lacy wrote: Okay, chiming in here. :) Yeah, this is my post. I've been pretty quiet here. Sorry for the somewhat negative tone, as you can imagine, the post was written after spending several hours digging through a very large amount of the

Re: Fwd: Some thoughts about Pyramid

2011-03-03 Thread Chris McDonough
3, 2011, at 9:28 AM, Chris McDonough wrote: Sounds like (s)he is blowing off a little steam. All of these points are addressed in http://docs.pylonsproject.org/projects/pyramid/1.0/designdefense.html . Indeed, my comment is awaiting moderation on the blog, I cited that URL as well

Re: Some thoughts about Pyramid

2011-03-03 Thread Chris McDonough
should value. On Thu, Mar 3, 2011 at 12:24 PM, Chris McDonough chr...@plope.com wrote: On Thu, 2011-03-03 at 09:39 -0800, Stephen Lacy wrote: Okay, chiming in here. :) Yeah, this is my post. I've been pretty quiet here

Re: url-based authentication methods with pyramid

2011-03-03 Thread Chris McDonough
On Thu, 2011-03-03 at 08:41 -0800, T Ixioides wrote: Hi, I have a project where both humans and bots need to authenticate, but I don't know where to start with this new pyramid framework. In my case, bots will only retrieve URLs starting with /bots/ and other URLs are reserved for

Re: Tutorials

2011-03-03 Thread Chris McDonough
On Thu, 2011-03-03 at 17:45 -0500, Mark Ramm wrote: A countervailing opinion: pip has problems with namespace packages. For an example, trying to use tox (a testing package which uses pip internally) to run tests against a namespace package (like repoze.anything) consistently fails. I

Re: Question about virginia

2011-03-02 Thread Chris McDonough
On Wed, 2011-03-02 at 02:21 -0800, Georges Dubus wrote: On 1 mar, 23:00, Tres Seaver tsea...@palladion.com wrote: I'm afraid the example doesn't defend against relative '..' at all. That's what I would have thought, but http://localhost:6543/../ redirects to http://localhost:6543/

Re: authenticated_userid vs unauthenticated_userid

2011-02-28 Thread Chris McDonough
On Mon, 2011-02-28 at 10:06 -0500, Daniel Holth wrote: I think the reasoning is that Interpret the current user id from a cookie / kerberos authentication / some key in the session and see whether the identified user exists in our system should be in different layers. I agree this

  1   2   >