Re: pylons with chameleon?

2009-09-24 Thread Wichert Akkerman
On 2009-9-24 07:53, Iain Duncan wrote: In Sat, 2009-09-19 at 09:40 +0200, Wichert Akkerman wrote: On 2009-9-16 21:06, Iain Duncan wrote: Hi folks, I have not built enough pylons to be know how to switch templating languages beyond mako and genshi, but I'm interested in using Chameleon. Has

Re: pylons with chameleon?

2009-09-26 Thread Wichert Akkerman
templates. Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons

Re: pylons with chameleon? unescaping HTML

2009-09-26 Thread Wichert Akkerman
/em!) Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons

Re: pylons with chameleon?

2009-09-26 Thread Wichert Akkerman
:) Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group

Re: Python 3.1

2009-11-02 Thread Wichert Akkerman
On 11/2/09 15:28 , Mario Ruggier wrote: The (big) gain... is that Evoque can be sandboxed (i.e. let your untrusted user modify the template source!), a feature that no other templating system had *designed-in* from the start. You mean like Zope PageTemplates since its creation about 10 years

Re: Python 3.1

2009-11-03 Thread Wichert Akkerman
On 11/2/09 16:00 , Mario Ruggier wrote: On Nov 2, 2009, at 3:41 PM, Wichert Akkerman wrote: On 11/2/09 15:28 , Mario Ruggier wrote: The (big) gain... is that Evoque can be sandboxed (i.e. let your untrusted user modify the template source!), a feature that no other templating system had

Re: Calling a controllers method from another method? Is there a 'safe' way without redirecting?

2009-12-08 Thread Wichert Akkerman
. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc

Re: Can't get pylons to log in mod_python mode..

2009-12-09 Thread Wichert Akkerman
for buildout does that for you. Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group

Re: Lazy Registration

2010-01-25 Thread Wichert Akkerman
On 1/25/10 09:57 , Matt Woolnough wrote: The answer doesn't need to be pylons specific. I just happen to be using this framework, so this group seemed like a good place to start. I'm looking to store info thats a bit more complex than just a item number, so I'm considering storing temporary

Re: Can an app be debugged without constantly reloading the server?

2010-02-16 Thread Wichert Akkerman
On 2/16/10 08:26 , Jamie wrote: I know that the answer is probably no, but I wanted to ask it anyhow. I'm trying to find an IDE that works well with Pylons and currently evaluating both Wing and Komodo. I was spoiled years ago by Visual Studio's awesome debugging features and was hoping to get

Re: Pylons and images from database

2010-02-21 Thread Wichert Akkerman
options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. -- You received this message because you are subscribed to the Google

Re: Is there a possible way to get a translator working into routing.py ?

2010-06-10 Thread Wichert Akkerman
needed. Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email

Re: Is there a possible way to get a translator working into routing.py ?

2010-06-10 Thread Wichert Akkerman
On 6/10/10 13:19 , daniel wrote: thank you Wichert appreciate your help this is exactly what I did. My problem actually is how to import the _ function to use it within the translate_incoming(environ, match_dict) function You can't easily do that: at the time routing.py is run there is no

Re: Paste 1.7.4, security fix for XSS hole

2010-06-24 Thread Wichert Akkerman
On 6/24/10 09:07 , Ian Bicking wrote: I believe the changes to 1.7.4 are limited and upgrading will have a low impact. Is there a changelog somewhere? The paste website still lists 1.7.3 as the last release and the pypi page has no changelog information. If I look at

Re: Returning a file object from an action

2010-07-21 Thread Wichert Akkerman
it already? Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send

Re: [pylons-discuss] How does one use SQLAlchemy Events with Pyramid?

2014-07-14 Thread Wichert Akkerman
On 14 Jul 2014, at 09:29, Seth seedifferen...@gmail.com wrote: Hello, I'd like to use SQLAlchemy events (http://sqlalchemy.readthedocs.org/en/rel_0_9/orm/events.html) to be able to fire off a task when a particular model is updated. For example, say someone updates their UserProfile

Re: [pylons-discuss] beginner: route_url param

2014-07-20 Thread Wichert Akkerman
On 20 Jul 2014, at 21:15, Michael taomaili...@gmail.com wrote: hi all, how do I properly create a param with route_url ? when I do return HTTPFound(location=request.route_url('user_recent', username=auth.username, page='1'), headers=headers) Use the _query parameter for route_url:

Re: [pylons-discuss] [pyramid] testing views with models sqlalchemy

2014-07-22 Thread Wichert Akkerman
On 22 Jul 2014, at 08:28, Kiss György w2lk...@gmail.com wrote: py.test style rewrite: # conftest.py from pyramid import testing import pytest import transaction from pokerherd.models import DBSession @pytest.fixture def req(): Pyramid DummyRequest. return

Re: [pylons-discuss] Per user connection using SQLAlchemy ORM

2014-07-25 Thread Wichert Akkerman
On 25 Jul 2014, at 09:44, Lele Gaifax l...@metapensiero.it wrote: url = config['sqlalchemy.url'] if username is None: url = url.replace(u'username:password@', u'') else: url = url.replace(u'username',

Re: [pylons-discuss] Can sessions be used if using AuthTktAuthenticationPolicy instead of SessionAuthenticationPolicy?

2014-08-18 Thread Wichert Akkerman
On 18 Aug 2014, at 12:46, pyramidX veerukrish...@hotmail.com wrote: So when using AuthTkt auth policy I'm setting 2 cookies and making a network round trip to the session srver (assuming session server and web server are on different machines) only when the request uses the session? Yes.

Re: [pylons-discuss] Multilingual Pyramid applications

2014-08-18 Thread Wichert Akkerman
On 18 Aug 2014, at 20:52, Mike Orr sluggos...@gmail.com wrote: Are there other significant multilingual Pyramid applications out there? There's generic things like Kotti but I'm thinking more of concrete applications. We have a bunch of sites that run in Dutch, English, German, Simplified

Re: [pylons-discuss] Multilingual Pyramid applications

2014-08-18 Thread Wichert Akkerman
On 18 Aug 2014, at 21:24, Kamal Gill designbyka...@gmail.com wrote Note that we're on Pyramid 1.4 due to our deployment target, so we're still using Lingua and Babel, but we hope to switch to Pyramid 1.5 or later in an upcoming release. You can use Lingua 2 with Pyramid 1.4 as well. I

Re: [pylons-discuss] See authentication headers with DummyRequest

2014-08-20 Thread Wichert Akkerman
On 19 Aug 2014, at 23:13, pyramidX veerukrish...@hotmail.com wrote: I'm using DummyRequest in my tests to test authentication, this is what I return from the view when login succeeds headers = remember(request, email) return HTTPFound(location=next,

Re: [pylons-discuss] See authentication headers with DummyRequest

2014-08-20 Thread Wichert Akkerman
On 20 Aug 2014, at 12:33, pyramidX veerukrish...@hotmail.com wrote: Thanks, that clarifies things. You're right that an integration test is more the way to go rather than trying to unit test this. What is the most straightforward way to run integration tests that span multiple requests?

Re: [pylons-discuss] Localized URL schema using chameleon

2014-08-20 Thread Wichert Akkerman
On 20 Aug 2014, at 19:21, Oscar Curero flext...@gmail.com wrote: Hi, I'm building my first application using pyramid and chameleon and I'm having problems with the localized URL schema. It's something like this: /en/products /es/productos /ca/productes The problem starts when I

Re: [pylons-discuss] Localized URL schema using chameleon

2014-08-21 Thread Wichert Akkerman
, 2014, at 4:13 PM, Oscar Curero flext...@gmail.com mailto:flext...@gmail.com wrote: On Wednesday, August 20, 2014 7:28:28 PM UTC+2, Wichert Akkerman wrote: On 20 Aug 2014, at 19:21, Oscar Curero flex...@gmail.com javascript: wrote: Hi, I'm building my first application

Re: [pylons-discuss] Mako templates with Deform

2014-08-22 Thread Wichert Akkerman
On 22 Aug 2014, at 10:39, pyramidX veerukrish...@hotmail.com wrote: I'm using Mako templates and have tried using Deform and it seems to work even though I haven't converted any widget templates to Mako from chameleon. Why is that? I am guessing deform renders the widget templates itself,

Re: [pylons-discuss] RFC: Pyramid tutorial at PyCon

2014-09-05 Thread Wichert Akkerman
On 04 Sep 2014, at 12:35, Paul Everitt paulwever...@gmail.com wrote: tl;dr Should I submit a slightly different kind of PyCon tutorial proposal? Although this isn't necessarily the target audience, I thought I'd open it up for discussion here. At the last two PyCons I did a half-day

Re: [pylons-discuss] setup.py's requires vs development.ini's pyramid.includes vs __init__.py's config.include

2014-09-06 Thread Wichert Akkerman
On 06 Sep 2014, at 14:20, pyramidX veerukrish...@hotmail.com wrote: I'm not sure what the difference is between the requires statement in setup.py and the pyramid.includes statement in development.ini and the config.include(...) in __init__.py. The requires statement in setup.py tells

Re: [pylons-discuss] setup.py's requires vs development.ini's pyramid.includes vs __init__.py's config.include

2014-09-07 Thread Wichert Akkerman
On 07 Sep 2014, at 13:07, pyramidX veerukrish...@hotmail.com wrote: In what cases would you add something you've put in setup.py into one of pyramid.includes or config.include()? I see that my sample applications work fine even though some of the things specified in setup.py haven't been

Re: [pylons-discuss] Turning arbitrary query string into IMultiDict?

2014-09-08 Thread Wichert Akkerman
On 08 Sep 2014, at 16:04, pyramidX veerukrish...@hotmail.com wrote: In Python 3 what is the best way to turn a string that's a URL querystring (gotten from anywhere, not necessarily current request) into an IMultiDict? Is it urllib.parse or is there a more Pyramid specific way of doing

Re: [pylons-discuss] Pyramid + ZODB persistent registry

2014-10-13 Thread Wichert Akkerman
On 14 Oct 2014, at 04:25, Tres Seaver tsea...@palladion.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/13/2014 09:54 PM, Chris Rossi wrote: My naive first take is just write a utility method: def find_sitemanager(context): Find nearest site manager, walking back up

Re: [pylons-discuss] Strange overlaps in independent Pyramid projects

2014-10-30 Thread Wichert Akkerman
On 30 Oct 2014, at 11:30, Laurent DAVERIO ldave...@gmail.com wrote: Overlap #1: SQLAlchemy maps the wrong class to the returned data : I assume this is because the classes bear the same names (or aliases) in the two distinct projects : $ cd foo $ pshell development.ini In [1]: from

Re: [pylons-discuss] JSON data no reaching my view

2014-12-10 Thread Wichert Akkerman
On 10 Dec 2014, at 13:27, Rosciuc Bogdan rosciuc.bog...@gmail.com wrote: My view code: @view_config(route_name = 'declare_usage', renderer = 'declara.jinja2') @view_config(route_name = 'declare_usage_json', renderer = 'json') def declara_consum(request): #Removed code for simplicity

Re: [pylons-discuss] Handling hTTP OPTIONS request

2014-12-13 Thread Wichert Akkerman
On 13 Dec 2014, at 19:52, Raja Naresh rajanares...@gmail.com wrote: Hello Everyone, Is there a way I can handle HTTP OPTIONS request in pyramid? I am trying to make a CORS request with a custom header hence it's preflighted and I want to handle the HTTP OPTIONS request. Any kind of help

Re: [pylons-discuss] Dynamically-generated PDF to download

2015-01-25 Thread Wichert Akkerman
On 25 Jan 2015, at 07:37, Adam Morris adam.mor...@igbis.edu.my wrote: I have a view that serves up a page that whose template/css contain both define screen and print media. Which means the view's renderer provides a page that serves up html that is formatted for the browser (screen

Re: [pylons-discuss] Dynamically-generated PDF to download

2015-01-25 Thread Wichert Akkerman
On 25 Jan 2015, at 14:40, Adam Morris adam.mor...@igbis.edu.my wrote: Okay, I get that bit now, and coded it up, but when I go to render it, I use the pyramid.renderers.render object but obviously it ends up downloading a corrupted file because it's not even in PDF format. You are still

Re: [pylons-discuss] Routes with same name and different url

2015-03-04 Thread Wichert Akkerman
On 04 Mar 2015, at 15:34, Mário Idival marioidi...@gmail.com wrote: Good morning I wonder if there is any way that I can name two routes with the same name and with different urls … You can’t do that. Why would you want to do that? Perhaps there is an alternative approach that would

<    1   2