Re: challenges while upgrading to 0.9.7

2009-05-25 Thread Shannon -jj Behrens
On Fri, May 22, 2009 at 2:33 AM, Shannon -jj Behrens jji...@gmail.com wrote: I have a project in production, and I decided to upgrade my app from 0.9.6.1 to 0.9.7.  I read all the docs related to upgrading.  I decided to use paster create myapp -t pylons to upgrade my project

challenges while upgrading to 0.9.7

2009-05-22 Thread Shannon -jj Behrens
I have a project in production, and I decided to upgrade my app from 0.9.6.1 to 0.9.7. I read all the docs related to upgrading. I decided to use paster create myapp -t pylons to upgrade my project. These are the headaches I encountered: * Warn people that if they use paster create to upgrade

Re: challenges while upgrading to 0.9.7

2009-05-22 Thread Shannon -jj Behrens
 * Once I got response.status_code working, it started shoving my HTML    response into the middle of a big error template instead of just serving    what I had.  This totally messed with my Web service which counts on    the sparse HTML error messages I provide.  I hacked around the problem.

Re: challenges while upgrading to 0.9.7

2009-05-22 Thread Shannon -jj Behrens
On Fri, May 22, 2009 at 2:33 AM, Shannon -jj Behrens jji...@gmail.com wrote: I have a project in production, and I decided to upgrade my app from 0.9.6.1 to 0.9.7.  I read all the docs related to upgrading.  I decided to use paster create myapp -t pylons to upgrade my project

logging setup

2009-02-24 Thread Shannon -jj Behrens
It's weird that the default setup in development.ini is: [handler_console] class = StreamHandler args = (sys.stderr,) level = NOTSET formatter = generic I used log.warn in my controller and it didn't go to stderr. I changed level to INFO so I can see the logging message. Best Regards, -jj --

Re: SMTPHandler not working

2009-02-18 Thread Shannon -jj Behrens
Check out this blog post: http://jjinux.blogspot.com/2009/02/python-logging-to-email-in-pylons.html If you have any comments, leave them on my blog. I'm having a hard time keeping up with this list ;) -jj On Wed, Dec 17, 2008 at 2:16 AM, Pavel Skvazh pavel.skv...@gmail.com wrote: Trying to

Re: supervisor questions

2008-07-09 Thread Shannon -jj Behrens
On Mon, Jul 7, 2008 at 4:37 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: Hi, I'm looking at http://wiki.pylonshq.com/display/pylonscookbook/Monitor+Pylons+application+with+supervisord. I have a few questions: 1. Why does it use a manually created server.py instead of using paster

Re: best way to get user's IP address in pylons?

2008-07-09 Thread Shannon -jj Behrens
On Mon, Jul 7, 2008 at 6:18 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: Ugh, looking at request.environ, Varnish is giving me HTTP_X_FORWARDED_FOR. Looking at my old Aquarium code, it respected X_FORWARDED_HOST. Looking at Paste's proxy middleware, I see that it looks for X-Forwarded

supervisor questions

2008-07-07 Thread Shannon -jj Behrens
Hi, I'm looking at http://wiki.pylonshq.com/display/pylonscookbook/Monitor+Pylons+application+with+supervisord. I have a few questions: 1. Why does it use a manually created server.py instead of using paster like normal? 2. Does anyone have an rc script to start supervisor under Ubuntu? 3.

Re: A new SQLAlchemy migration toolkit - miruku 0.1a3 has been released

2008-07-07 Thread Shannon -jj Behrens
On Thu, Jul 3, 2008 at 6:59 PM, Olli Wang [EMAIL PROTECTED] wrote: On Jul 4, 9:42 am, Shannon -jj Behrens [EMAIL PROTECTED] wrote: How is it possible to not require an upgrade script? What happens if I'm changing an email field into two fields, one for the username and one for the server

Re: mod_wsgi does not check for changed files?

2008-06-28 Thread Shannon -jj Behrens
On Fri, Jun 27, 2008 at 12:53 PM, webwurst [EMAIL PROTECTED] wrote: Hi! If i start a pylons project with paster i can add the parameter -- relaod, so changes to the source code are reflected directly. But i'm using mod_wsdi now and i have to restard apache if i want changes in a python file

Re: Testing with the session object

2008-06-28 Thread Shannon -jj Behrens
On Fri, Jun 27, 2008 at 6:33 AM, Marin [EMAIL PROTECTED] wrote: I have this controller: class HeplController(BaseController): def index(self): del session['user'] session.save() return 'OK' And I want to test if it works correctly with this test: class

Re: com to co.uk with url_for

2008-06-28 Thread Shannon -jj Behrens
Pass qualified=True to url_for. -jj On Wed, Jun 25, 2008 at 7:26 AM, Nico Nicolic [EMAIL PROTECTED] wrote: Ok, I've created my own solution with regular expression. But the problem is, when I'm trying to get the existing URL with url_for(), it's just returns the relative url: /, but I need

Re: Pylons equivalent of cherrypy's serve_file?

2008-06-25 Thread Shannon -jj Behrens
On Tue, Jun 24, 2008 at 7:41 PM, Chris [EMAIL PROTECTED] wrote: Is there a Pylons equivalent of CherryPy's serve_file ? I'm trying to allow file download for files that are not in the 'public' directory In cherry py, it'd go something like this: from cherrypy.lib.static import serve_file

Re: How are c/h/etc provided to templates?

2008-06-24 Thread Shannon -jj Behrens
On Tue, Jun 24, 2008 at 7:25 AM, Jonathan Vanasco [EMAIL PROTECTED] wrote: I'm trying to make two other objects available to all templates. I'm wondering what the best practice would be. Looking at pylons.templating, I'm honestly a bit confused about what is going on. ( and if you're

Re: url_for for static resources

2008-06-21 Thread Shannon -jj Behrens
On Sat, Jun 21, 2008 at 7:53 AM, Jonathan Vanasco [EMAIL PROTECTED] wrote: i had a similar situation -- i wanted to change url_for's output on people who have a 'preview' cookie and those who don't i basically did this def url_for_custom( url ): rval = url_for(url) if logic_test():

Re: Reddit open sources their site pylons implementation

2008-06-19 Thread Shannon -jj Behrens
On Wed, Jun 18, 2008 at 8:03 AM, aaaron [EMAIL PROTECTED] wrote: Announcement: http://blog.reddit.com/2008/06/reddit-goes-open-source.html Trac: http://code.reddit.com/ That video was awesome ;) -jj -- I, for one, welcome our new Facebook overlords! http://jjinux.blogspot.com/

Re: '+' in URL not getting stripped away like '%20'

2008-06-19 Thread Shannon -jj Behrens
If you put a URL into some HTML, you should HTML escape it. Yes, this is strange. I wrote about it here: http://jjinux.blogspot.com/2006/03/html-escaping-s-in-urls-in-html.html Best Regards, -jj On Thu, Jun 19, 2008 at 11:48 AM, Tom [EMAIL PROTECTED] wrote: Just wanted to update anyone who

Re: '+' in URL not getting stripped away like '%20'

2008-06-19 Thread Shannon -jj Behrens
Hmm, upon rereading your post, I'm not sure if the two things are connected. Sorry. -jj On Thu, Jun 19, 2008 at 1:57 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: If you put a URL into some HTML, you should HTML escape it. Yes, this is strange. I wrote about it here: http

Re: jsonp support

2008-06-19 Thread Shannon -jj Behrens
I understand what you mean. I return my errors in JSON. I think that makes the user's life easier. -jj On Thu, Jun 19, 2008 at 3:25 PM, Jonathan Vanasco [EMAIL PROTECTED] wrote: this thread had me thinking... it would be really neat if there were a way to cancel out the jsonify decorator

Re: jsonp support

2008-06-19 Thread Shannon -jj Behrens
On Thu, Jun 19, 2008 at 3:29 PM, Ian Bicking [EMAIL PROTECTED] wrote: Maybe something like this: class HTTP_OK(HTTPException): code = 200 message = 'OK' raise HTTP_OK('some message') A little weird. But a good way to break out of the decorators. Hey Ian, I've needed that before.

Re: jsonp support

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 2:55 PM, Ian Bicking [EMAIL PROTECTED] wrote: Shannon -jj Behrens wrote: I'm using the jsonify decorator. It'd be nice if that decorator were updated to *automatically* support the jsonp parameter http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/. Hence

Re: jsonp support

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 3:21 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On Tue, Jun 17, 2008 at 2:55 PM, Ian Bicking [EMAIL PROTECTED] wrote: Shannon -jj Behrens wrote: I'm using the jsonify decorator. It'd be nice if that decorator were updated to *automatically* support the jsonp

Re: jsonp support

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 3:25 PM, Ian Bicking [EMAIL PROTECTED] wrote: Shannon -jj Behrens wrote: On Tue, Jun 17, 2008 at 2:55 PM, Ian Bicking [EMAIL PROTECTED] wrote: Shannon -jj Behrens wrote: I'm using the jsonify decorator. It'd be nice if that decorator were updated to *automatically

Re: WebHelpers-dev change: select() option order

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 2:52 PM, Mike Orr [EMAIL PROTECTED] wrote: The option order in webhelpers.html.tags.select() has changed from [(label, value)] to [(value, label)]. This matches most real-world lists including dict.items() where the dict is {id : label}. It's the opposite of the old

Re: WebHelpers-dev change: select() option order

2008-06-17 Thread Shannon -jj Behrens
On Tue, Jun 17, 2008 at 7:48 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On Tue, Jun 17, 2008 at 2:52 PM, Mike Orr [EMAIL PROTECTED] wrote: The option order in webhelpers.html.tags.select() has changed from [(label, value)] to [(value, label)]. This matches most real-world lists

Re: best practices for static resources

2008-06-17 Thread Shannon -jj Behrens
On Mon, Jun 16, 2008 at 2:37 PM, Cliff Wells [EMAIL PROTECTED] wrote: On Mon, 2008-06-16 at 14:26 -0700, Cliff Wells wrote: On Mon, 2008-06-16 at 13:03 +0200, Wichert Akkerman wrote: I am trying to figure out what the best practices for dealing with static resources such as CSS, Javascript

Re: Adding content-length in all responses

2008-06-17 Thread Shannon -jj Behrens
On Mon, Jun 16, 2008 at 4:11 PM, Agustín (Cucho) Villena [EMAIL PROTECTED] wrote: Hi! At work we need to add the content-length header in all our responses, but we don't want to hack any method in our controllers to do that. Is there any way to factor out this behaviour in a single place?

Re: Pylons-based JSON-RPC service?

2008-06-17 Thread Shannon -jj Behrens
On Sun, Jun 15, 2008 at 1:12 PM, KJ [EMAIL PROTECTED] wrote: Would Pylons be a good choice for implementing a JSON-RPC-based web service? If yes, can someone point me to a good example? (Actually, I'd be interested in seeing examples of any Pylons-based web service, even if it doesn't use

Re: WebHelpers with Genshi do not work

2008-06-14 Thread Shannon -jj Behrens
I wonder if the b has to be escaped, like lt;bgt;. -jj On Sat, Jun 14, 2008 at 12:11 PM, webwurst [EMAIL PROTECTED] wrote: Hi! I just tried this example similar to that from http://genshi.edgewall.org/wiki/GenshiRecipes/PylonsWithGenshi#TheHardWay !DOCTYPE html PUBLIC -//W3C//DTD

Re: Difference between controllers and views?

2008-06-13 Thread Shannon -jj Behrens
wsgiorg.routing_args. I might be completely wrong on that though. Cheers Alexander On Jun 12, 9:59 pm, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On Thu, Jun 12, 2008 at 10:05 AM, rcs_comp [EMAIL PROTECTED] wrote: On Jun 11, 4:10 pm, Karlo Lozovina [EMAIL PROTECTED] wrote: What's the practical

Re: Exception email reporting in production

2008-06-13 Thread Shannon -jj Behrens
mails and just changing the address did the trick. thanks Ben On 13 Jun, 03:01, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On Thu, Jun 12, 2008 at 3:48 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm having trouble getting pylons to report errors via email where debug = false

Re: Bulk inserts

2008-06-12 Thread Shannon -jj Behrens
On Wed, Jun 11, 2008 at 7:20 PM, Contact 42 [EMAIL PROTECTED] wrote: Jonathan Vanasco wrote: write to a .txt log in some sort of standardized format , when it hits 10k lines run a batch query what happens if an insert fails ? It continues with the rest of the batch. It'll tell you at the

Re: Pylons memory leak

2008-06-12 Thread Shannon -jj Behrens
On Wed, Jun 11, 2008 at 10:28 PM, zepolen [EMAIL PROTECTED] wrote: I'm running pylons with paster in daemon mode. At startup the paster process is using 10% (100mb) memory. Paster is serving about 500k requests per day, 350k are pages, 150k are ajax requests. Static files (an extra 800k

Re: Truncating an html string safely

2008-06-12 Thread Shannon -jj Behrens
On Sat, Jun 7, 2008 at 7:24 AM, Matt Feifarek [EMAIL PROTECTED] wrote: Oops; replied from the wrong address. -- Forwarded message -- On Thu, Jun 5, 2008 at 2:36 PM, Ian Bicking [EMAIL PROTECTED] wrote: Well... it's hard to truncate exactly, as there's all that annoying

Re: DistributionNotFound: decorator problem using PyISAPIe

2008-06-12 Thread Shannon -jj Behrens
On Wed, Jun 4, 2008 at 3:12 PM, rcs_comp [EMAIL PROTECTED] wrote: I am trying to get Paste running using the PyISAPIe WSGI server on IIS. However, I am getting this error and I can't figure out why: The same application succesfully runs with the paste HTTP server. Traceback (most recent

Re: Exception email reporting in production

2008-06-12 Thread Shannon -jj Behrens
On Thu, Jun 12, 2008 at 3:48 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm having trouble getting pylons to report errors via email where debug = false - basically nothing ever turns up. In production.ini there are some lines like: email_to = [EMAIL PROTECTED] smtp_server =

Re: Bulk inserts

2008-06-11 Thread Shannon -jj Behrens
Beware of multiple threads and/or processes writing to the file at the same time. It may make sense to use a mutex. I agree with the earlier recommendations to use mysql load data in file. It really is a lot faster. You can completely remove Python from the picture when importing the file.

Re: Difference between controllers and views?

2008-06-11 Thread Shannon -jj Behrens
On Wed, Jun 11, 2008 at 3:14 PM, Ben Bangert [EMAIL PROTECTED] wrote: On Jun 11, 2008, at 1:10 PM, Karlo Lozovina wrote: What's the practical difference between controller based approach and views based one? Eg. Django views, and controllers in Pylons? It doesn't seem that much different, so

Re: paster make-config issue

2008-06-11 Thread Shannon -jj Behrens
On Wed, Jun 11, 2008 at 9:51 AM, Ian Bicking [EMAIL PROTECTED] wrote: Jean Parpaillon wrote: Hi all, When using paster make-config, generated file is automatically added to svn. Is there a way to disable it ? Why is it the default behaviour ? (Generated files are usually not versioned !)

Re: Pylons Session help

2008-06-10 Thread Shannon -jj Behrens
On Mon, Jun 9, 2008 at 1:26 PM, Mike Orr [EMAIL PROTECTED] wrote: On Mon, Jun 9, 2008 at 1:50 AM, Krishgy [EMAIL PROTECTED] wrote: Hi, I am working on a community website, using pylons. I needed to capture the user navigation by recording user interaction with the web site. I will store

Re: How did you begin your fun with Pylons?

2008-05-30 Thread Shannon -jj Behrens
I'm not making any judgments about anyone. However, I did see a great talk yesterday called How Open Source Projects Survive Poisonous People: http://youtube.com/watch?v=ZSFDm3UYkeE It's definitely worth watching ;) -jj On Thu, May 29, 2008 at 9:33 PM, Jonathan Vanasco [EMAIL PROTECTED]

Re: advice with configuration/scaling a live Pylons app.

2008-05-30 Thread Shannon -jj Behrens
On Fri, May 30, 2008 at 12:49 AM, Graham Dumpleton [EMAIL PROTECTED] wrote: On May 30, 12:56 pm, Mike Orr [EMAIL PROTECTED] wrote: On Thu, May 29, 2008 at 4:30 PM, Graham Dumpleton [EMAIL PROTECTED] wrote: On May 29, 7:29 pm, Alex Marandon [EMAIL PROTECTED] wrote: 2008/5/29 Alex

Re: advice with configuration/scaling a live Pylons app.

2008-05-30 Thread Shannon -jj Behrens
On Fri, May 30, 2008 at 5:12 AM, Alex Marandon [EMAIL PROTECTED] wrote: 2008/5/30 Graham Dumpleton [EMAIL PROTECTED]: class FooController(BaseController): def bla(self): return 'Hello World! %s' % time.time() def slow_bla(self): time.sleep(10) return

Re: Deployment Question

2008-05-24 Thread Shannon -jj Behrens
On Fri, May 23, 2008 at 2:26 PM, Jonathan Vanasco [EMAIL PROTECTED] wrote: On May 23, 3:48 pm, Mike Orr [EMAIL PROTECTED] wrote: This is quite interesting. I've been looking for a way to build a site scraper (something analogous to an aggregator but more site-specific) that could eventually

Re: Cross-Project code sharing...modules/plugins what does Pylons use?

2008-05-24 Thread Shannon -jj Behrens
On Sat, May 24, 2008 at 6:37 AM, rcs_comp [EMAIL PROTECTED] wrote: Hello all, I am new to the Python web-programming world and trying to decide on frameworks. I was really impressed with Django, but ran into some problems with IIS hosting. Since Pylons had really nice install instructions

Re: How did you begin your fun with Pylons?

2008-05-23 Thread Shannon -jj Behrens
On Fri, May 23, 2008 at 1:38 AM, Christoph Haas [EMAIL PROTECTED] wrote: On Freitag, 23. Mai 2008, Mike Orr wrote: On Thu, May 22, 2008 at 11:46 PM, Raoul Snyman [EMAIL PROTECTED] wrote: I will have to agree with the sentiments already voiced here. The documentation is very sparse, and it

Re: Deployment Question

2008-05-23 Thread Shannon -jj Behrens
On Fri, May 23, 2008 at 12:32 AM, Lawrence Oluyede [EMAIL PROTECTED] wrote: On Thu, May 22, 2008 at 11:12 PM, Shannon -jj Behrens [EMAIL PROTECTED] wrote: Has anyone tried out the mod_wsgi module for *Nginx*? Yeah, I know, weird: http://wiki.codemongers.com/NginxNgxWSGIModule I

Re: Deployment Question

2008-05-22 Thread Shannon -jj Behrens
Here's my two cents: Has anyone tried out the mod_wsgi module for *Nginx*? Yeah, I know, weird: http://wiki.codemongers.com/NginxNgxWSGIModule Being asynchronous rules! That's why Erlang, Squid, IronPort servers, Nginx, etc. are able to handle so many concurrent requests so easily. Here's

Re: How did you begin your fun with Pylons?

2008-05-22 Thread Shannon -jj Behrens
On Thu, May 22, 2008 at 7:37 AM, Mikeroz [EMAIL PROTECTED] wrote: Hey guys, I'm wondering where did you start your journey with Pylons? Ben Bangert and I decided to meet for dinner in Berkeley. I got very lost and ended up in Oakland. I finally got to the restaurant an hour late. Ben had

Re: Authkit - colliding cookies

2008-05-19 Thread Shannon -jj Behrens
On Sun, May 18, 2008 at 7:10 AM, Moshe C. [EMAIL PROTECTED] wrote: Hi, I have two parallel applications running from the same host but on different ports. How do I configure Authkit so that each one creates a unique cookie. Currently if you log into one app, you are also authenticated for

Re: Beaker Trunk With Appengine

2008-05-19 Thread Shannon -jj Behrens
On Fri, May 16, 2008 at 11:16 AM, Anil [EMAIL PROTECTED] wrote: I am trying to run pylons with google app engine and everything is working perfectly locally, but when I upload the site live beaker gives me the following error. Anyone have any idea on where to start debugging?

going off line

2007-06-15 Thread Shannon -jj Behrens
Hey guys, As much as I love Pylons, I need to step off the list for a little while. If you need to ask me questions, feel free to send me email directly. Wish me luck with my fourth child which is due in two weeks! Happy Hacking! -jj -- http://jjinux.blogspot.com/

Re: Pylons deployment methods

2007-06-09 Thread Shannon -jj Behrens
: python setup.py bdist_egg I take it too be the same as in the docs, but this just threw horrible errors back at me Sorry, I don't know why. Best Regards, -jj On Jun 7, 12:03 pm, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On 5/29/07, voltron [EMAIL PROTECTED] wrote: Ok, just to get

Re: mod_python configuration?

2007-06-09 Thread Shannon -jj Behrens
On 6/7/07, Chris Shenton [EMAIL PROTECTED] wrote: Shannon -jj Behrens [EMAIL PROTECTED] writes: The current favorite way to run Pylons apps behind Apache is to proxy them and use Paster. It's exactly the sort of problems that you ran into that make some of us wary of mod_python. I did

Pylons jobs

2007-06-07 Thread Shannon -jj Behrens
I'm seeing a lot of Pylons-related jobs out here in Silicon Valley. I think that's a very good sign. If anyone wants one, I know that both Wize and Metaweb are looking for really solid Python guys who know Pylons. Tell them I sent you. Best Regards, -jj -- http://jjinux.blogspot.com/

Re: accessing request handler from BaseController

2007-06-07 Thread Shannon -jj Behrens
On 6/6/07, Max Ischenko [EMAIL PROTECTED] wrote: Hello, I am not very happy with the default validation scheme suggested by Pylons and trying to design my own. The idea is to let the code handle main code path (data is valid) and handle validation error separatedly. I want to be able to

Re: Using pater with other servers

2007-06-07 Thread Shannon -jj Behrens
On 5/30/07, voltron [EMAIL PROTECTED] wrote: I am trying to get Pylons to work with a web server that supports FCGI, the problem is, the server manges URLs with extentions like .php e.t.c which Pylons does not have. Are there some key things that I have to take notice of when trying to

Re: Subdirectories and resource paths in Mako

2007-06-07 Thread Shannon -jj Behrens
Also, for static resources, like images or CSS files that actually are on the proxy server proxying for the Paster server, how can I pass a sort of /media path to my templates that would always be resolved no matter how deep the links are that are mapped? Personally, I'm lazy, so I just use

Re: Custom error documents

2007-06-07 Thread Shannon -jj Behrens
On 5/31/07, voltron [EMAIL PROTECTED] wrote: I wish we could edit posts. Anyway, I took a look at the docs again, so I modified my error.py accordingly, but I still get a trace: response = self._dispatch_call() File c:\python24\lib\site-packages\Pylons-0.9.5-py2.4.egg\pylons

Re: mod_python configuration?

2007-06-07 Thread Shannon -jj Behrens
On 5/29/07, Chris Shenton [EMAIL PROTECTED] wrote: I used mod_python about 6 months back to get Apache to proxy HTTPS to my Pylons app; it wasn't easy. Now I'm trying again with current Pylons, paste and friends. But I'm again having troubles getting it to work. The simplest apache

Re: use of globals, threadless, and requests

2007-06-07 Thread Shannon -jj Behrens
On 5/29/07, alecf [EMAIL PROTECTED] wrote: I'm interested in serving up my pylons app under Stackless Python - Stackless is more or less single-threaded so the model is somewhat like Twisted but without all the deferreds. Instead of threads, there are tasklets which participate in kind of a

Re: Pylons deployment methods

2007-06-07 Thread Shannon -jj Behrens
: * Create an egg. * Copy the egg to the server. * easy_install the.egg. * paster setup-app your.ini. Best Regards, -jj the way of the pylons is sometimes easy, but mostly secretive and tricky On May 29, 4:25 pm, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On 5/29/07, voltron [EMAIL

Re: accessing request handler from BaseController

2007-06-07 Thread Shannon -jj Behrens
On 6/7/07, Max Ischenko [EMAIL PROTECTED] wrote: Hello, On 6/7/07, Shannon -jj Behrens [EMAIL PROTECTED] wrote: Somewhere in the environ, there's the Routes stuff. You can use that to figure out which action was executed. I usually just print out the environ and start poking around

Re: Subdirectories and resource paths in Mako

2007-06-07 Thread Shannon -jj Behrens
On 6/7/07, Philip Jenvey [EMAIL PROTECTED] wrote: On Jun 7, 2007, at 6:09 AM, Daniel Tang wrote: On 6/7/07, Shannon -jj Behrens [EMAIL PROTECTED] wrote: Also, for static resources, like images or CSS files that actually are on the proxy server proxying for the Paster server, how

Re: Conditional database creation in websetup

2007-06-07 Thread Shannon -jj Behrens
On 6/7/07, voltron [EMAIL PROTECTED] wrote: I have meta.create_all() in my websetup.py file, this takes all the models in the models.py file and attempts to create a database based on the models found, can one code a conditional that asks beforehand exactly what databases it should create

Re: Odd behavior with paster and Pylons

2007-06-06 Thread Shannon -jj Behrens
On 6/3/07, Daniel Tang [EMAIL PROTECTED] wrote: I discovered some interesting behavior when using Pylons on WebFaction. For some very odd reason that I can't discern, whenever I run paster inside of a Pylons command, even if I don't pass any arguments, it launches gconfd-2. Normally, I

Re: Pylons deployment methods

2007-05-29 Thread Shannon -jj Behrens
On 5/29/07, voltron [EMAIL PROTECTED] wrote: This is another of my what is the best way questions. I would like to deploy my Pylons application without headaches on my clients server. This would mean my app with its templates and creating the database. A while back, Dan posted that he had

Re: SQLAlchemy + MySQL + UTF-8 support - how?

2007-05-29 Thread Shannon -jj Behrens
SQLAlchemy do the work, I don't have any objections. Happy Hacking! -jj Shannon -jj Behrens wrote: I'm not necessarily disagreeing with you, but I do think it's really bad practice to have your database confused about the encoding of the data that it's storing. At one point, I had things

Re: storing SA mapped objects in beaker sessions

2007-05-28 Thread Shannon -jj Behrens
On 5/27/07, Anil [EMAIL PROTECTED] wrote: user_mapper = assign_mapper(ctx, User, user_table, properties = { 'alerts': relation(Alert, cascade=all, delete-orphan) }) alert_mapper =

Re: genshi

2007-05-28 Thread Shannon -jj Behrens
On 5/27/07, Julien Cigar [EMAIL PROTECTED] wrote: Hello, I'm new to Pylons and a long-time Genshi user. I wondered how can I tell to Pylons that the rendered template (with Genshi) should be in utf-8 / xhtml-strict ? I tried the following (middleware.py) but without success :

Re: 'Address already in use' error

2007-05-28 Thread Shannon -jj Behrens
On 5/27/07, Christoph Haas [EMAIL PROTECTED] wrote: On Sun, May 27, 2007 at 01:55:55PM -0700, voltron wrote: one thing, just using kill process number on Linux, you would have to use kill -9, maybe its the same on OSX Better not. Sending the signal 9 (SIGKILL) is a very harsh way that may

Re: Mod_python and Sessions?

2007-05-28 Thread Shannon -jj Behrens
On 5/26/07, rahul [EMAIL PROTECTED] wrote: Thanks for the info. I went out and used mod_fcgid and it worked flawlessly. I didn't think that paster serve being served behind apache was the perferred choice, as I automatically assumed that it is intended for development purpose as django's

Re: Towards a more incremental test-driven-development in Pylons?

2007-05-28 Thread Shannon -jj Behrens
On 5/28/07, Agustin Villena [EMAIL PROTECTED] wrote: Hi all Researching patterns to test-driven-development in frameworks based on the model view controller, I found this interesting paper http://www.purpletech.com/articles/mvc/mvc-and-beyond.html In this pattern, there ios a mini-MVC for

Re: Installation problems

2007-05-28 Thread Shannon -jj Behrens
On 5/28/07, Calder [EMAIL PROTECTED] wrote: Hi, I'm new to Pylon, and I just installed it using easy_install. It said it installed successfully, but when I start the first tutorial and type: paster create --template=pylons helloworld I get the following error: Traceback (most recent

Re: Class nesting or subclassing controllers

2007-05-28 Thread Shannon -jj Behrens
-jj Behrens [EMAIL PROTECTED] wrote: On 5/25/07, voltron [EMAIL PROTECTED] wrote: Is it possible to nest classes in a controller class? Routes knows how to look at a URL and try to figure out the matching controller module - controller class - method name. If you deviate from

Re: Installation problems

2007-05-28 Thread Shannon -jj Behrens
-jj Behrens [EMAIL PROTECTED] wrote: On 5/28/07, Calder [EMAIL PROTECTED] wrote: Hi, I'm new to Pylon, and I just installed it using easy_install. It said it installed successfully, but when I start the first tutorial and type: paster create --template=pylons helloworld I

Re: Mod_python and Sessions?

2007-05-26 Thread Shannon -jj Behrens
On 5/25/07, rahul [EMAIL PROTECTED] wrote: Hello, I'm new to pylons. Started out a couple of days ago. Comming from django, I am attempting to move to pylons for my current project, and everything went smoothly until i got to the point of installing pylons on apache2 + mod_python. I

Re: Class nesting or subclassing controllers

2007-05-26 Thread Shannon -jj Behrens
On 5/25/07, voltron [EMAIL PROTECTED] wrote: Is it possible to nest classes in a controller class? Routes knows how to look at a URL and try to figure out the matching controller module - controller class - method name. If you deviate from this too much, you will probably not find joy. Of

Re: abort(), detail and the error controller

2007-05-26 Thread Shannon -jj Behrens
On 5/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello! I am working on my first real Pylons application and so far everything is going really good! Big thanks to all those involved for creating such a great web framework. I am just getting to adding users to my application. I want

Re: Free blog application

2007-05-26 Thread Shannon -jj Behrens
On 5/26/07, Jonas Melian [EMAIL PROTECTED] wrote: Is there any FLOSS blog system using Pylons? I've heard that blogs that use Pylons are more interesting to read ;) /me giggles -jj -- http://jjinux.blogspot.com/ --~--~-~--~~~---~--~~ You received this

Re: Daemonizing and auto-restart

2007-05-25 Thread Shannon -jj Behrens
Pylons and Paste are meant to run in a wide variety of OSs. This is the type of stuff where it makes sense to take advantage of what your particular OS provides. For me on Ubuntu, that was runit. My $0.02, -jj On 5/25/07, voltron [EMAIL PROTECTED] wrote: What actually is recommended by the

Re: using buffet

2007-05-24 Thread Shannon -jj Behrens
On 5/23/07, Max Ischenko [EMAIL PROTECTED] wrote: On 5/23/07, Shannon -jj Behrens [EMAIL PROTECTED] wrote: /usr/lib/python2.4/site-packages/Paste-1.3-py2.4.egg/paste/registry.py, line 177, in _current_obj raise TypeError( TypeError: No object (name: Buffet) has been registered

Re: Daemonizing and auto-restart

2007-05-24 Thread Shannon -jj Behrens
On 5/24/07, Ian Bicking [EMAIL PROTECTED] wrote: Mike Orr wrote: On 5/22/07, Ian Bicking [EMAIL PROTECTED] wrote: My other question is, paster has a --monitor-restart option to restart the server if it dies. But the Pylons Cookbook has recipes for daemontools and supervisor2. Are

Re: where to put application init code?

2007-05-23 Thread Shannon -jj Behrens
On 5/22/07, Max Ischenko [EMAIL PROTECTED] wrote: On 5/23/07, Shannon -jj Behrens [EMAIL PROTECTED] wrote: So, any ideas how to detect changes in template files to re-generate them or at least generate everything at Pylons' application startup? Perhaps there's something more

Re: mako template speed question

2007-05-23 Thread Shannon -jj Behrens
On 5/23/07, voltron [EMAIL PROTECTED] wrote: I discovered that I could reduce the number of templates in use by using conditionals. Based on the link or the user input, I have a list of mako functions that generate HTML Divs of content. My question is, is it faster to create a separate

Re: Daemonizing and auto-restart

2007-05-22 Thread Shannon -jj Behrens
On 5/22/07, Mike Orr [EMAIL PROTECTED] wrote: I'm about to deploy my Pylons application and need to daemonize it and set up auto-restart if it dies. paster serve production.ini start does not daemonize it, contrary to what paster serve --help says. paster serve --daemon production.ini does,

Re: where to put application init code?

2007-05-22 Thread Shannon -jj Behrens
On 5/22/07, Max Ischenko [EMAIL PROTECTED] wrote: Hello, On 5/18/07, Max Ischenko [EMAIL PROTECTED] wrote: Any other superglobals won't have been setup by then, though. What other ones do you need access to? That's precisely the problem. I have a mixed PHP/Pylons site and

Re: Common files for a multi-app

2007-05-19 Thread Shannon -jj Behrens
On 5/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have been working with Pylons and have developed some standalone applications that are part of a larger site. I'm trying to find out what the best way is to reference common css/javascript files across all of the apps. Here is the setup

Re: Issues with @validate decorator

2007-05-19 Thread Shannon -jj Behrens
On 5/17/07, Max Ischenko [EMAIL PROTECTED] wrote: On 5/17/07, Shannon -jj Behrens [EMAIL PROTECTED] wrote: When there are errors and form is redisplayed to the user how the template can tell it (to display something like there were errors, please correct and resubmit)? From what I

Re: myghty: Error(UnicodeDecodeError): 'ascii' codec can't decode byte 0xc3

2007-05-17 Thread Shannon -jj Behrens
By the way, do you know about this trick: reload(sys) sys.setdefaultencoding(encoding) It gets around the site.py problem. Best Regards, -jj On 5/16/07, Jens Hoffrichter [EMAIL PROTECTED] wrote: Hey Voltron, On 5/16/07, voltron [EMAIL PROTECTED] wrote: Oh I did not know about

Re: widgets

2007-05-17 Thread Shannon -jj Behrens
Please, advise some widget framework to use with Pylons, I know there is in turbogears. I'd like to here some recommendations before I start learning Toscawidgets because it's only alpha stage now. Maybe there are more mature/promising widget frameworks suitable for Pylons. In the Python

Re: Using Mako templates

2007-05-10 Thread Shannon -jj Behrens
On 5/10/07, Christoph Haas [EMAIL PROTECTED] wrote: On Wed, May 09, 2007 at 11:18:12AM -0700, KyleJ wrote: On May 5, 3:08 am, Christoph Haas [EMAIL PROTECTED] wrote: tmpl_options['mako.default_filters'] = ['decode.utf8'] You may wish to not use that option. From the Mako docs (

Re: Clean url mapping

2007-05-09 Thread Shannon -jj Behrens
On 5/9/07, Graham Higgins [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9 May 2007, at 15:48, voltron wrote: Oops, those are typos. Just to be sure. I made another quick test: I cant get this to render: http://localhost:5000/test I get a 404 error

Re: Autohandler question

2007-05-09 Thread Shannon -jj Behrens
Since I'm not using Myghty, one of the first things I do when I start a new project is delete it. Best Regards, -jj On 5/9/07, voltron [EMAIL PROTECTED] wrote: Thanks Graham! -- http://jjinux.blogspot.com/ --~--~-~--~~~---~--~~ You received this

Re: Apache proxy to pylons link prefix

2007-05-09 Thread Shannon -jj Behrens
On 5/9/07, voltron [EMAIL PROTECTED] wrote: Hi, I am using Apacher as a proxy server according to this tutorial: http://docs.pythonweb.org/display/pylonscookbook/Apache+and+mod_proxy+for+Pylons my development.ini conf has these settings: [app:main] use = egg:FirstApp cache_dir =

Re: pylons, and executing php or other cgi?

2007-05-08 Thread Shannon -jj Behrens
On 5/8/07, sjol [EMAIL PROTECTED] wrote: Hi, I've looked for the answer but can't quite figure it out : I would like to have the whole website handled by pylons, but I still have some php code that is in use and not quite worth the time to translate into python. is it possible to have urls

Re: Unicode trouble with formencode, Mako and UTF8

2007-05-08 Thread Shannon -jj Behrens
On 5/8/07, Christoph Haas [EMAIL PROTECTED] wrote: Dear list... I'm learning how to use Formencode to validate the input of the HTML forms I use. Unfortunatly I have some breakage that I don't know how to fix. My controller: === class

Re: difficulties load paste app config

2007-05-08 Thread Shannon -jj Behrens
On 4/17/07, Ian Bicking [EMAIL PROTECTED] wrote: Max Ischenko wrote: File /home/max/projects/dou-trunk/site/doupy/doupy/websetup.py, line 54, in command app_conf = appconfig('config:'+name, relative_to=conf_dir) File /usr/lib/python2.4/site-packages/PasteDeploy-1.3-py2.4.egg/

Re: Spawning a worker thread from the controller?

2007-05-07 Thread Shannon -jj Behrens
By the way: http://docs.python.org/lib/module-Queue.html Best Regards, -jj On 5/7/07, Matt Billenstein [EMAIL PROTECTED] wrote: Hi Ben, I didn't look at it in great detail -- how do you handle passing status between the pylons threads and the worker threads? This seems to be where I'm

  1   2   3   >