view-callable class - request arg receives context object

2012-10-31 Thread Simon Yarde
Docs say you should expect to handle a request argument in a view-callable class. http://pyramid.readthedocs.org/en/latest/narr/views.html#defining-a-view-callable-as-a-class But I found I was getting a context object for the request arg. Does this mean context and request are being passed

Re: view-callable class - request arg receives context object

2012-10-31 Thread Simon Yarde
at 11:02 AM, Simon Yarde simon...@me.com wrote: Docs say you should expect to handle a request argument in a view-callable class. http://pyramid.readthedocs.org/en/latest/narr/views.html#defining-a-view-callable-as-a-class But I found I was getting a context object for the request arg

Pyramid/Jinja2 Filter Caching Issue

2012-07-27 Thread Simon Yarde
Filter output gets cached/compiled if a filter has no arguments or the arguments are strings. I believe this is undocumented behaviour, but makes a lot of sense. However, this is problematic if the output is supposed to vary according to some aspect of the request; the matchdict in my case. The

Re: Thank You, Chris!

2012-03-19 Thread Simon Yarde
The general view is that emacs is the more-powerful but slightly harder one, vim is the simpler more focussed one. Both good. I chose vim. This might help http://www.vim.org/about.php To answer your questions.. If you've never used a text editor in the terminal before, the official tutorial

Re: py3.2 sysconfig.get_config_var('CC') wrong value returned

2012-03-02 Thread Simon Yarde
-211.10.1)] on Darwin-11.3.0-x86_64-i386-64bit Confirm Pyramid and uWSGI working. I guess this isn't really a Python build issue as-such, but more of an issue with how uWSGI locates the compiler on Darwin, and that Apple have phased out gcc rather brutally. On 29 Feb 2012, at 18:07, Simon Yarde

py3.2 sysconfig.get_config_var('CC') wrong value returned

2012-02-29 Thread Simon Yarde
Throwing this out there.. woes with Python 3.2 sysconfig and more.. I recently started migrating a Pyramid app to py3.2 and hit a uWSGI build issue with the python installer; sysconfig.get_config_var returns 'gcc-4.2', which doesn't exist on my system, but py2.7 reports 'llvm-gcc-4.2'

Re: py3.2 sysconfig.get_config_var('CC') wrong value returned

2012-02-29 Thread Simon Yarde
Thanks Graham and Marius, much appreciated. I'll get stuck into this tomorrow and report back. On 29 Feb 2012, at 17:42, Graham Higgins gjhigg...@gmail.com wrote: On Wednesday, February 29, 2012 5:01:38 PM UTC, Marius Gedminas wrote: It's looking for libpython3.2m.so in $LD_LIBRARY_PATH.

Re: What are the files located in the AppName.egg-info used for?

2012-02-18 Thread Simon Yarde
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/project.html#the-project-structure Hope that explains it! On 18 Feb 2012, at 16:16, Tjelvar tjelvar.ols...@gmail.com wrote: Have just run: $ ./env/bin/pcreate --scaffold=starter AppName $ cd AppName $ ./env/bin/python

Re: What are the files located in the AppName.egg-info used for?

2012-02-18 Thread Simon Yarde
Actually, you want this for the detail on eggs.. http://peak.telecommunity.com/DevCenter/EggFormats On 18 Feb 2012, at 17:24, Simon Yarde simonya...@me.com wrote: http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/project.html#the-project-structure Hope that explains

Re: pylonsproject.chipin.com set up for docs overhaul pledge collections

2012-02-16 Thread Simon Yarde
Pledge made just now as promised. Confirm there is a slight delay on your payment showing-up, don't panic! Best Simon -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To

Re: Raising 403 within traversal when the Forbidden context is already used to show the login page

2012-02-10 Thread Simon Yarde
Sorry I should have added, but resisted as I felt my message was long enough.. Just because Pyramid (or your app) raises an http exception doesn't mean you have to return that view. As Michael describes you can intercept and downgrade the exception as you deem appropriate. The reason your

Re: Raising 403 within traversal when the Forbidden context is already used to show the login page

2012-02-09 Thread Simon Yarde
I'm pretty sure you need to be using 401 for pages that require authorisation, and not 403. Maybe try to untangle your approach so that the login page is never throwing 401 (or 403). The protected resource should raise the exception and your app design handles it by issuing a redirect to

Re: match_param as a dict

2012-02-07 Thread Simon Yarde
match_param will accept a tuple. 2012/2/6 Simon Yarde simonya...@me.com Hi Joel I have opened an issue #405 re your question. There is a quick and dirty hack if you must get this working right away and are ok forking Pyramid. The issue is happening because resolveConflicts stores

Re: match_param as a dict

2012-02-07 Thread Simon Yarde
Nice! :) Sent from my iPhone On 7 Feb 2012, at 17:12, Michael Merickel mmeri...@gmail.com wrote: I patched 1.2-branch and 1.3-branch last night. match_param will now accept a tuple. You can either use those branches or wait for a release. :-) On Tue, Feb 7, 2012 at 2:50 AM, Simon Yarde

Re: match_param as a dict

2012-02-06 Thread Simon Yarde
Hi Joel I have opened an issue #405 re your question. There is a quick and dirty hack if you must get this working right away and are ok forking Pyramid. The issue is happening because resolveConflicts stores the match_param in a tuple, and a string is hashable but a dict is not. Pyramid is

Re: need your help to overhaul docs

2012-02-05 Thread Simon Yarde
I would be happy to personally contribute $50 to the effort. Please add me to the list. Perhaps this is an amount other independents could put forward, and together another 18 of us might represent one of the $1000 company contributions? Best, S On 4 Feb 2012, at 12:32, Chris McDonough wrote:

Re: Caching Response Object

2012-01-31 Thread Simon Yarde
I wonder if this solves your issue with Varnish, or if it is too coarse: https://www.varnish-cache.org/docs/trunk/tutorial/cookies.html It would seem as a minimum you could identify logged-in-users from non-logged-in-users by a the presence of a specific auth-cookie. This would certainly

Re: Caching Response Object

2012-01-31 Thread Simon Yarde
is not the concern it might have been. Best, S On 31 Jan 2012, at 16:57, jerry wrote: Thanks Simon. Varnish is definitely worth exploring. I'm also very interested in your second approach, how can you tell if the user has JS enabled by looking at her request? Jerry On Jan 31, 11:45 pm, Simon Yarde

route_prefix trailing-slash design issue?

2012-01-18 Thread Simon Yarde
Please can we have the option to disable automatic slash for empty route-paths, in order for despatch-style design to be 'more modular'. Issue: - Let's say I want to exclude the '/article' prefix from the article module to make it 'more modular'; - I use a route_prefix to add the routes from

Re: route_prefix trailing-slash design issue?

2012-01-18 Thread Simon Yarde
a container in which the suffixed '/' is appropriate. Anyway I decided to document this on github rather than fully explain it here for posterity: https://github.com/Pylons/pyramid/issues/406 On Wed, Jan 18, 2012 at 5:53 AM, Simon Yarde simonya...@me.com wrote: Please can we have

Re: FAPWS / Gevent and Nginx

2011-12-14 Thread Simon Yarde
Thanks again Phillip. The uWSGI docs are certainly not of the calibre of Pyramid's docs :) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group,

Re: FAPWS / Gevent and Nginx

2011-12-13 Thread Simon Yarde
wrote: On Dec 12, 1:40 pm, Simon Yarde simonya...@me.com wrote: Thanks for the info. It's starting to become clear(er)! I've been perplexed by the multitude of ways you can configure a server/wsgi, and to be honest I think I'm still struggling conceptually. Is the following anywhere

Re: FAPWS / Gevent and Nginx

2011-12-12 Thread Simon Yarde
-and-uwsgi it also applies to pyramid as well. i'd be very interested in docs about gevent nginx. On Dec 9, 2:36 pm, Simon Yarde simonya...@me.com wrote: Hi All Anyone have any experience using of FAPWS or Gevent and Nginx together that they would be interested in sharing? I understand

FAPWS / Gevent and Nginx

2011-12-09 Thread Simon Yarde
Hi All Anyone have any experience using of FAPWS or Gevent and Nginx together that they would be interested in sharing? I understand uWSGI, Gevent, and FAPWS are highly capable, with FAPWS focussed in simplicity/speed and needing to be extended to add SSL support (which I'm interested in).

Re: Possible? Raise HTTPNotFound within Exception handler view

2011-11-14 Thread Simon Yarde
Many thanks again. It felt quite natural to handle/raise/re-raise exceptions in the exception view since this has become the exception handler so-to-speak. However, looking at the problem again, the code is much easier to follow as a result of placing all of the application's

Pyramid Debug Toolbar: Issue #44

2011-11-14 Thread Simon Yarde
Hi All Does anyone have any information on progress for Pyramid Debug Toolbar issue #44? The issue causes the exception below when URI's contain accented characters (in my case 'ΓΌ'). Pyramid behaves normally without error when debug toolbar is turned off. A temporary patch/workaround would

Re: Pyramid Debug Toolbar: Issue #44

2011-11-14 Thread Simon Yarde
, schrieb Simon Yarde: A temporary patch/workaround would be really useful, other than turn off debugging :) Here is a patch for this issue, let us know how it works: https://github.com/Pylons/pyramid_debugtoolbar/pull/43 -- Christoph -- You received this message because you

Possible? Raise HTTPNotFound within Exception handler view

2011-11-05 Thread Simon Yarde
Is it possible to raise an HTTPNotFound within an Exception handler view, and have the HTTPNotFound caught by a custom HTTPNotFound handler? Can anyone help? What I have... - An exception handler view which responds to a normal python Exception - works - I'm fielding the exception by either

Documentation: Configurator include route_prefix

2011-11-02 Thread Simon Yarde
Should the route_prefix argument be documented under Configurator include statement? http://docs.pylonsproject.org/projects/pyramid/current/narr/introduction.html?highlight=route_prefix#configuration-extensibility No mention of route_prefix here..

Re: Documentation: Configurator include route_prefix

2011-11-02 Thread Simon Yarde
Sorry about that.. looking at the wrong doc from a search and didn't spot the version in the URL http://docs.pylonsproject.org/projects/pyramid/1.2/api/config.html On 2 Nov 2011, at 11:36, Simon Yarde wrote: Should the route_prefix argument be documented under Configurator include statement