Re: [pylons-discuss] can i add something to the pyramid logging ?

2017-06-01 Thread Jeff Dairiki
On Thu, Jun 1, 2017 at 10:42 AM, Steve Piercy <steve.piercy@gmail.com> wrote: > On 6/1/17 at 12:07 PM, mmeri...@gmail.com (Michael Merickel) pronounced: > > > On Thu, Jun 1, 2017 at 11:52 AM, Jeff Dairiki <dair...@dairiki.org> > wrote: > > > > &

Re: [pylons-discuss] can i add something to the pyramid logging ?

2017-06-01 Thread Jeff Dairiki
On Fri, May 26, 2017 at 8:04 PM, Guohuang Chen wrote: > can i add something to the pyramid logging ? such as session['login_name'] > remote-ip ... > You might also look at the pyramid-log package. I think it will do what you

Re: [pylons-discuss] does anyone have a server-side session library other than pyramid_redis_sessions ?

2017-02-08 Thread Jeff Dairiki
On Tue, Feb 7, 2017 at 6:28 PM, Mike Orr <sluggos...@gmail.com> wrote: > On Tue, Feb 7, 2017 at 2:38 PM, Jeff Dairiki <dair...@dairiki.org> wrote: > > > > > > On Mon, Feb 6, 2017 at 11:25 AM, Jonathan Vanasco <jonat...@findmeon.com > > > > wrote:

Re: [pylons-discuss] does anyone have a server-side session library other than pyramid_redis_sessions ?

2017-02-07 Thread Jeff Dairiki
On Mon, Feb 6, 2017 at 11:25 AM, Jonathan Vanasco <jonat...@findmeon.com> wrote: > > > On Sunday, February 5, 2017 at 4:16:29 PM UTC-5, Jeff Dairiki wrote: >> >> >> Actually, no. Pretty much every page includes a CSRF token somewhere, >> and thus require a

Re: [pylons-discuss] does anyone have a server-side session library other than pyramid_redis_sessions ?

2017-02-05 Thread Jeff Dairiki
On Fri, Feb 3, 2017 at 6:37 PM, Jonathan Vanasco wro > > > So I assume you defer creating a null session until it's used? > Actually, no. Pretty much every page includes a CSRF token somewhere, and thus require a session. However these simple sessions are stored entirely

Re: [pylons-discuss] does anyone have a server-side session library other than pyramid_redis_sessions ?

2017-02-03 Thread Jeff Dairiki
I have written a custom session implementation which is a hybrid between cookie-storage and redis-storage. If the session dict is JSON-serializable and is not too large, then the session is just stored directly in a cookie. Otherwise, the session data is pickled and stored in redis. In the

Re: [pylons-discuss] need guidance for Pyramid, Jinja2, deform combination

2015-11-20 Thread Jeff Dairiki
On Fri, Nov 13, 2015 at 4:40 AM, kk wrote: > I guess I said all in my subject line. > I would love if I can have templates in jinja2 and use deform library > together with Pyramid. I do this. It "just works." The stock templates which come with deform are Chameleon, not

Re: [pylons-discuss] fine-tuning a deployment under uwsgi + supervisord

2015-11-10 Thread Jeff Dairiki
I'm not arguing that this is the best way, but as a data point, here's what I do. I use buildout to generate app.ini, as well as other config files, including for uwsgi and supervisord, from templates (using collective.recipe.template.) I have several top-level buildout config files, all of

Re: [pylons-discuss] Non-Javascript Web UI framework?

2015-08-27 Thread Jeff Kunce
There are things like Dart out there. Even python in the browser - I used pyjs for a while, that's pretty much dead, but there are newer efforts. Most of us just bite the bullet and use javascript. Have you seen Ractive.js? I really like it: super powerful, but lightweight and non-opiniated.

Re: [pylons-discuss] resource and data with zodb

2015-07-29 Thread Jeff Dairiki
If you're thinking about using ZODB in a new pyramid-based app, definitely look into SubstanceD http://www.substanced.net/, which provide pre-built admin UII (and more) for ZODB-based web apps. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To

Re: [pylons-discuss] Explicit reissue of auth_tkt cookie

2015-07-09 Thread Jeff Dairiki
Another way to ensure that authentification happens every request: @subscriber(NewRequest) def refresh_auth_cookie(event): event.request.unauthenticated_userid As a side-note, if you happen to be using pyramid_tm, its tween is probably already doing this for you. Unless disabled by one of

Re: [pylons-discuss] How to configure authentication for testing

2015-06-18 Thread Jeff Dairiki
One way is to step through the whole login procedure. I.e. make sure your test app is configured with a particular user (and password) in its user db, then so something like:: res = self.app.get('/login') login_form = res.forms['login-form'] login_form['username'] = 'someuser'

[pylons-discuss] z3c.form in Pyramid?

2014-04-11 Thread Jeff Kunce
really use, is an example minimal Pyramid app using z3c.form. Thanks! -- Jeff -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr

Re: [pylons-discuss] Re: Graceful degrading on bad Beaker session

2014-02-19 Thread Jeff Dairiki
On Wed, Feb 19, 2014 at 12:54:04PM -0800, Jonathan Vanasco wrote: I think you'd need to have an `id` in ISession as an attribute. If I understand your motives — it's quite possible that I don't — you want access to the session id in order to access extra externally stored session data (e.g. from

Re: [pylons-discuss] Graceful degrading on bad Beaker session

2014-02-16 Thread Jeff Dairiki
client-side. More context here: https://groups.google.com/forum/#!searchin/pylons-discuss/session|sort:date/pylons-discuss/RQjev5QXBqc/Xf1pUHXl1-0J Jeff -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group

Re: [pylons-discuss] NotFound views and AddSlash

2014-02-10 Thread Jeff Dairiki
On Mon, Feb 10, 2014 at 10:45:00AM -0800, Jonathan Vanasco wrote: hoping someone has a suggestion... we run `pyramid.view.append_slash_notfound_view` as a convenience for people writing in bad urls. on one of our newer views, we need to raise an authoritative 404. ie, This is a 404 ,

Re: [pylons-discuss] pyramid_mailer ComponentLookupError:

2013-11-16 Thread Jeff Dairiki
On Sat, Nov 16, 2013 at 05:33:37PM +1300, Matt Smith wrote: On 16/11/13 16:53, Jeff Dairiki wrote: Okay, now can you show the rest of your app configuration (your main)? No need. I tryed the straight python way again with smtplib and it works fine. So that resolves my issue

Re: [pylons-discuss] pyramid_mailer ComponentLookupError:

2013-11-15 Thread Jeff Dairiki
internet.) Jeff -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss

Re: [pylons-discuss] Testing using webtest and pyramid_mailer

2013-11-11 Thread Jeff Dairiki
On Mon, Nov 11, 2013 at 03:47:47PM -0800, Kristian wrote: Thanks Jeff, that led me to find the registry in the app. It works using that registry : # As simple as calling this in the unittest registry = self.testapp.app.registry mailer = get_mailer(registry) Slick! I didn't realize one

Re: [pylons-discuss] Testing using webtest and pyramid_mailer

2013-11-09 Thread Jeff Dairiki
On Sat, Nov 09, 2013 at 12:27:11PM +0100, Gael Pasgrimaud wrote: Hi, On Fri, Nov 08, 2013 at 08:06:09PM -0800, Kristian wrote: I'm using webtest to test a functionality that send an email. I want to catch the email in my unittest and get a url in the mail to further test. Only problem,

Pylons on Apache, only basic FTP/CLI access available. Run both PHP Pylons on single site.

2013-06-24 Thread Jeff C
I have a PHP website running on an apache server. I have basic access to the CLI, I am able to install pylons but not make changes to the apache conf files. Is it possible to serve the both the PHP the pylons site on port 80? What is the best way to install pylons? What I really need is a

Re: Pylons on Apache, only basic FTP/CLI access available. Run both PHP Pylons on single site.

2013-06-24 Thread Jeff C
restarted? Jeff On Tuesday, June 25, 2013 7:06:17 AM UTC+8, Vincent Catalano wrote: What type of hosting service are you using? You may not have access to the Apache config files, however, you may be able to create .htaccess files for overriding Apache settings for your website. It is possible

Re: Distinguishing between view names

2012-06-15 Thread Jeff Dairiki
On Fri, Jun 15, 2012 at 12:38:37PM -0700, Jason wrote: On Friday, June 15, 2012 3:11:22 PM UTC-4, Theron Luhn wrote: A lot of times I use the same view for both editing items and making new items. How can I determine which view name is being called? I know I'm not explaining

Re: Accessing a beaker session object from within Deform fileuploadWidget's tmpstore

2012-04-07 Thread Jeff Dairiki
=deferred_upload_widget) upload_schema = MyUploadSchema() then, in your view logic (where you have access to the request object): schema = upload_schema.bind(request=request) form = Form(schema, ... Jeff -- You received this message because you are subscribed to the Google Groups pylons-discuss

Re: [deform] Allowing optgroup HTML tags in SelectWidget

2012-04-04 Thread Jeff Dairiki
, while the long label (Bar (Foo)) is displayed in old/bizarre browsers. Cheers, Jeff -- 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, send email

Re: trying to create a pdf version of the pyramid cookbook...

2012-02-24 Thread Jeff Dairiki
v1.0.8 loading pickled environment... not yet created Theme error: no theme named 'pyramid' found (missing theme.conf?) make: *** [html] Error 1 (~/pyramid_cookbook)$ The pyramid theme appeared in Sphinx v1.1. Jeff -- You received this message because you are subscribed

Re: Logging Configuration

2012-01-09 Thread Jeff Tchang
You can try the propagate flag: [logger_buildings] level = INFO handlers = qualname = myapp.buildings propagate = 1 On Mon, Jan 9, 2012 at 7:48 AM, Jason ja...@deadtreepages.com wrote: Can someone help me with my logging configuration? I have read the logging and pyramid_exclog

Errors on deform HiddenWidget

2011-09-13 Thread Jeff Dairiki
doing it wrong? (To me, it looks like MappingWidget.handle_error — probably SequenceWidget.handle_error, or maybe even better just FormWidget.handle_error — should be glomming on to error messages for hidden children.) Cheers, Jeff -- You received this message because you are subscribed

Re: add_static_view for a single file

2011-08-25 Thread Jeff Dairiki
) self.app.cache_control(max_age=cache_max_age) def __call__(self, request): return request.get_response(self.app) ... then, in your config code, something like ... config.add_route('favicon', '/favicon.ico') config.add_view(StaticView('static/favicon.ico'), route_name='favicon') Cheers, Jeff

Re: Best practice on using Deform with placeholder attributes

2011-08-17 Thread Jeff Dairiki
look at the URL you end up at to see the submitted values.) Jeff On Aug 13, 12:09 pm, Jeff Dairiki dair...@dairiki.org wrote: On Fri, Aug 12, 2011 at 02:57:18PM -0700, Bobby wrote: The desired outcome is an input field filled with a default value that is removed when the field is focused

Re: Best practice on using Deform with placeholder attributes

2011-08-13 Thread Jeff Dairiki
behavior. The modernizr wiki has a list of polyfills, several of which claim to do the job (scroll down to Web Forms - input placeholder): https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills Jeff -- You received this message because you are subscribed to the Google Groups

Re: session and pylons

2011-01-02 Thread Jeff Tchang
What do you want to happen when a user opens up another browser and logins again? I don't see a problem. -Jeff On Fri, Dec 31, 2010 at 9:14 AM, gazza burslem2...@yahoo.com wrote: Hey Guys, Working on a progress bar for my site. I'm essentially storing the state of the progress bar

Pyramid question: mako.default_filters?

2010-11-24 Thread Jeff Dairiki
.) It seems that the config value is not being converted to a list. What am I doing wrong? Jeff -- 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...@googlegroups.com. To unsubscribe from this group, send

Re: Question: URL generation under hybrid URL dispatch / traversal in Pyramid

2010-11-24 Thread Jeff Dairiki
Hi Chris, Thanks for the answers! On Wed, Nov 24, 2010 at 03:11:01PM -0500, Chris McDonough wrote: On Wed, 2010-11-24 at 10:08 -0800, Jeff Dairiki wrote: Here's my second question. URL generation seems awkward when using hybrid URL dispatch traversal. I suspect I'm missing something

Re: Pyramid question: mako.default_filters?

2010-11-24 Thread Jeff Dairiki
On Wed, Nov 24, 2010 at 06:44:20PM -0500, Chris McDonough wrote: On Wed, 2010-11-24 at 10:01 -0800, Jeff Dairiki wrote: I'm trying to get the mako.default_filters .ini file setting to work. It doesn't seem to. If, in my .ini file, I set mako.default_filters = h then as soon

Re: pyramids and pylons

2010-11-06 Thread Jeff Tchang
the road to expect a rewrite. How about new projects? Should they immediately start using Pyramids and abandon Pylons? -Jeff -- 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...@googlegroups.com

Re: Beaker and Redis

2010-07-07 Thread Jeff Tchang
JSON is not as efficient byte for byte I like how it is easily readable and relatively well supported across the technologies I've chosen: http://github.com/bbangert/beaker_extensions/blob/master/beaker_extensions/redis_.py -Jeff On Tue, Jul 6, 2010 at 11:15 AM, Gopalakrishnan S

using image_tag with google charts url

2008-11-19 Thread Jeff Burton
that '.png' will no longer be added in future versions, but is there some way to make it stop now? I'm using version 0.9.6.2 Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group

Re: mod_wsgi and pylons, Logging

2007-12-19 Thread Jeff Lindsay
the opposite of what you say... except that we don't get the errors in the main apache log either when in daemon mode. This is Gentoo btw. -jeff On Dec 19, 2007 6:28 PM, Graham Dumpleton [EMAIL PROTECTED] wrote: Which Apache error log file are you looking in? Do you have VirtualHost specific

Re: mod_wsgi and pylons, Logging

2007-12-19 Thread Jeff Lindsay
Ok, that makes sense now but only concerns me more because logging in daemon mode is not working, using wsgi.errors or sys.stderr. However, I'm a bit confused because CustomLog is used for access logs, which does work btw if I wasn't clear. It's only error logs that don't work. -jeff On Dec 19

Object is not callable thrown when accessing easyBay object

2007-10-19 Thread Jeff
(): response.headers.add('Set-Cookie', c.output(header='')) response.headers.update(pylons.response.headers) exceptions.TypeError: 'Node' object is not callable Thanks, Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: SQLAlchemy, Again

2006-12-19 Thread Jeff Shell
I just came across this thread. I'm not sure if this will help anyone, but this is the implementation I came up with when I was playing around with Pylons + SQLAlchemy a couple of months ago. My experience with Pylons has been limited, and this hasn't been tested under heavy load, but it may