Re: Utterly frustrated

2007-01-20 Thread Christoph Haas
Hi, Jamie... On Friday 19 January 2007 03:04, Jamie wrote: I've been struggling to learn how to use Pylons and it's getting to the point that I'm about to give up and just use Django. Ewww... the dark side? :) I need some advice on how to make this less painful. I've been a (professional)

Pagination research

2007-01-25 Thread Christoph Haas
Evening... as some of you may have read on IRC I'm trying to use webhelpers' pagination package. That's a pretty frustrating trip that's more a pydoc text adventure than something that saves me more time than re-inventing the wheel. Anyway... I'm using SQLAlchemy and have defined my Table()s in

Concepts of Pylons (proposal for an introductory article to web frameworks)

2007-01-28 Thread Christoph Haas
Dear community... my background is 10 years of Perl CGIs and only 2 years of Python. Pythons CGI support is pretty ridiculous so I considered using web frameworks although I generally don't like too much magic. It took a while until I got acquainted with that approach. Now that I think I get

Re: Concepts of Pylons (proposal for an introductory article to web frameworks)

2007-01-28 Thread Christoph Haas
On Sunday 28 January 2007 21:37, Graham Higgins wrote: On 28 Jan 2007, at 20:03, Christoph Haas wrote: http://workaround.org/concepts-of-pylons.html Good effort. FWIW I commend you on your English skills and (broadly) your comparison of Django, Turbogears and Pylons . Thanks. It's really

Re: Concepts of Pylons (proposal for an introductory article to web frameworks)

2007-01-29 Thread Christoph Haas
On Monday 29 January 2007 00:35, Graham Higgins wrote: On 28 Jan 2007, at 21:00, Christoph Haas wrote: Thanks. It's really hard to compare the three beasts. I am running commercial sites developed in both Django TG, and I've pushed Pylons around a bit. Your characterisation of the three

Re: Pagination research

2007-01-29 Thread Christoph Haas
UPDATE... On Thursday 25 January 2007 16:13, Christoph Haas wrote: I'm using SQLAlchemy and have defined my Table()s in models/__init__.py. To use the pagination I used from webhelpers import pagination in the lib/helpers.py. [...] Since the above query object was ugly I tried to feed

Re: Patch for webhelpers/pagination/orm.py to raise proper exception

2007-01-31 Thread Christoph Haas
On Wednesday 31 January 2007 09:12, Daniel Néri wrote: Note that raising of strings as exceptions is deprecated in Python 2.5[*] and triggers a warning. Thanks for the pointer. I already wondered why some people already use '''raise Exception, blah blah''' I currently attempt to rewrite the

IDEs and Pylons applications

2007-01-31 Thread Christoph Haas
Hi, $ALL... I'm currently trying to rewrite the webhelpers.pagination module and sometimes find it hard to understand what each variable is set to and even what type it is. Sure, I can raise exceptions all the time as a poor man's way to debug the application. But SPE or Eric3 already offer a

Re: Pagination research

2007-02-05 Thread Christoph Haas
On Saturday 03 February 2007 08:01, dds wrote: Thanks for looking into the pagination stuff. No hope too soon. :) On Jan 29, 11:54 pm, Christoph Haas [EMAIL PROTECTED] wrote: The documentation athttp://pylonshq.com/WebHelpers/module-webhelpers.pagination.htmlcont ains this example

Re: Pagination research

2007-02-18 Thread Christoph Haas
Sorry... I was offline for a while (thanks, telco)... On Tuesday 06 February 2007 00:43, David Smith wrote: Regarding queries, you don't need them when you're using assign_mapper For normal queries like model.mytable.get_by(name='Chris') it's great to use the additional methods that

Re: Deplyoing Pylons applications as Debian packages?

2007-03-05 Thread Christoph Haas
On Monday 05 March 2007 22:29, Ian Bicking wrote: Christoph Haas wrote: I could imagine a tool like pylons-buildpackage which creates a Pylons application and makes a proper Debian package of it that can be apt-installed. I'm eager to hear other people's ideas on that. FWIW, I think

Re: Deplyoing Pylons applications as Debian packages?

2007-03-06 Thread Christoph Haas
On Tuesday 06 March 2007 02:17, Stephen F. Steiner wrote: On Mar 5, 2007, at 8:08 PM, Piotr Ozarowski wrote: PS I really should be sleeping now :-( Yes, you should but you really raise some valid points even in your altered state ;-). He raised a lot of valid points that widely used

Re: Deplyoing Pylons applications as Debian packages?

2007-03-06 Thread Christoph Haas
James, thanks for your point-of-view. I hope mine isn't seen as trolling. I'm seriously trying to find a way to unite both the easy_install and the deb-package world. And at the moment everybody just seems to defend their own position. Many Python developer probably don't even care for

Deploying a Pylons project (Debian et al)

2007-03-07 Thread Christoph Haas
Hi, list... This thread is connected to the Deploying Pylons applications as Debian packages just that I would like to suspend discussing whether the Debian package management system or easy_install is better for the moment. :) I'm trying to provide an easy way to deploy Pylons projects as

Re: Deploying a Pylons project (Debian et al)

2007-03-07 Thread Christoph Haas
Shannon, On Wednesday 07 March 2007 22:22, Shannon -jj Behrens wrote: The .ini file is site-specific. Just like Debian admins have to modify Apache configs, they also have to create and modify .ini's. Okay, I think I understood that now. Seems like Paste has much more functionality that is

Error when using SqlAlchemy/autoload/PostgreSQL 8.1

2007-03-08 Thread Christoph Haas
Hi, list... formerly I had declared my models explicitly in models/__init__.py: from sqlalchemy import * from sqlalchemy.ext.assignmapper import assign_mapper powerdns_domains_table = Table( 'domains', meta, Column('id', Integer, primary_key=True),#

Renaming controllers

2007-03-13 Thread Christoph Haas
Evening, yesterday I had to rename a controller because the concept of my application has changed a little. So I wondered which files I needed to change. What I did: - rename controllers/old.py to controllers/new.py - edit controllers/new.py and rename the class name - go into tests/ and

Re: Renaming controllers

2007-03-13 Thread Christoph Haas
On Tuesday 13 March 2007 17:51, John_Nowlan wrote: I and others here have been bitten by renaming controllers. I think it is a common python practice/pattern to inspect/use a 'base' name. In short I think the controller module must contain a controller called 'FooController' So far so

Re: Deleting expired sessions

2007-03-22 Thread Christoph Haas
On Thursday 22 March 2007 00:09, Alberto Valverde wrote: On Mar 21, 2007, at 11:37 PM, Ben Bangert wrote: On Mar 21, 2007, at 3:25 PM, Alberto Valverde wrote: I'm using Beaker to manage sessions with the dbm backend and noticed that expired sessions are not deleted automatically. I see

Using the database models in python scripts

2007-03-29 Thread Christoph Haas
Dear list... I (still) work on my task to do some database maintainance on the tables that I use in Pylons as models. So it sounds clever to reuse my configuration (.ini file) to connect to the database and get access to my sqlalchemy-mapped classes. The only solution I have so far looks

Re: Staying sane with AJAX and Mako

2007-04-04 Thread Christoph Haas
Jose, thanks for your thoughts. On Wednesday 04 April 2007 18:01, Jose Galvez wrote: Ok I see what your doing, what I would do is break out the code that gets the entry from the database into a separate function and then use that to populate what ever you need. Getting the information from

Webhelpers' h.link_to(_remote) escapes my URL :(

2007-05-04 Thread Christoph Haas
Dear list... I have created a URL using information from Routes using h.url_for(). Example: /start/page?page_nr=1called=back Now I want to create a link to this URL with h.link_to. What I get is: a href=/start/page?page_nr=1amp;called=backfoo/a Apparently '' is escaped to 'amp;'

Re: Webhelpers' h.link_to(_remote) escapes my URL :(

2007-05-05 Thread Christoph Haas
On Fri, May 04, 2007 at 12:58:07PM -0700, Shannon -jj Behrens wrote: On 5/4/07, Christoph Haas [EMAIL PROTECTED] wrote: I have created a URL using information from Routes using h.url_for(). Example: /start/page?page_nr=1called=back Now I want to create a link to this URL

Re: Using Mako templates

2007-05-05 Thread Christoph Haas
On Fri, May 04, 2007 at 12:43:47PM -0700, voltron wrote: I´ll like to use only Mako templates in my projects, apart from stating this in the middleware.py, do I have to change these lines in the einviroment.py: # The following template options are passed to your template engines

Re: Using Mako templates

2007-05-05 Thread Christoph Haas
On Sat, May 05, 2007 at 10:25:31AM -0700, voltron wrote: Thank you very much for the tip Christoph. Hmm things like that should be documented somewhere You are right. I added my hints to http://docs.pythonweb.org/display/pylonscookbook/Using+Mako+templating+language Christoph

[RFC] Alternative paginator

2007-05-05 Thread Christoph Haas
Dear list... as some of you already know I have never been very happy with Webhelpers' built-in pagination module. So I wrote my own (that is NOT compatible with the existing one) and I love it so far. Interested? Get it from http://workaround.org/pylons/paginator/ and let me know what you

Re: Alternative paginator

2007-05-06 Thread Christoph Haas
On Sat, May 05, 2007 at 11:49:37PM -0700, voltron wrote: Do you have examples of its use? Thanks. I apologize for my newbiness, new to Pylons and all Yes. I took some hours to write the documentation. It's currently in the paginator.rest file as well as in the source itself. You can read it as

Re: WebHelpers

2007-05-06 Thread Christoph Haas
On Sat, May 05, 2007 at 11:58:16PM -0700, voltron wrote: I can´t seem to find any docs on Webhelpers. I would like to use Mochikit in Pylons, are there examples or tutorials that one could point me to? Regarding any docs on webhelpers: Shell: pydoc webhelpers Web:

Re: [RFC] Alternative paginator

2007-05-08 Thread Christoph Haas
On Mon, May 07, 2007 at 02:49:24PM -0700, Philip Jenvey wrote: On May 5, 2007, at 1:07 PM, Christoph Haas wrote: as some of you already know I have never been very happy with Webhelpers' built-in pagination module. So I wrote my own (that is NOT compatible with the existing one) and I love

Unicode trouble with formencode, Mako and UTF8

2007-05-08 Thread Christoph Haas
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 DhcpZoneForm(formencode.Schema): allow_extra_fields = True

Re: [RFC] Alternative paginator

2007-05-10 Thread Christoph Haas
On Wed, May 09, 2007 at 05:08:01PM -0700, Philip Jenvey wrote: On May 8, 2007, at 12:14 AM, Christoph Haas wrote: On Mon, May 07, 2007 at 02:49:24PM -0700, Philip Jenvey wrote: On May 5, 2007, at 1:07 PM, Christoph Haas wrote: as some of you already know I have never been very happy

Re: Alternative paginator

2007-05-10 Thread Christoph Haas
Michael... On Thu, May 10, 2007 at 09:59:09AM -, Michael G. Noll wrote: first of all, thanks for your work on an alternative paginator. I'm currently testing it, and I am pleased so far :-) Thank you for the feedback. I already thought I'm the only who uses that module. :) Bug ===

Re: Using Mako templates

2007-05-10 Thread Christoph Haas
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 ( http://www.makotemplates.org/docs/unicode.html

Re: Using Mako templates

2007-05-10 Thread Christoph Haas
On Thu, May 10, 2007 at 02:37:13PM -0700, Shannon -jj Behrens wrote: On 5/10/07, Christoph Haas [EMAIL PROTECTED] wrote: Where (in a standard Pylons project) would I set use_unicode=True? I just found references to create_engine in the websetup.py which is obviously not the right place

Re: [RFC] Alternative paginator

2007-05-11 Thread Christoph Haas
On Thu, May 10, 2007 at 04:27:19PM -0700, Ben Bangert wrote: Christoph Haas wrote: I'd personally accept that the API changes as long as the module is called something else. The Python standard library has a lot of examples where old modules became deprecated with the time and modules

Re: Installing pylons on Debian Sarge

2007-05-13 Thread Christoph Haas
On Sun, May 13, 2007 at 02:45:48AM -0700, voltron wrote: Nevermind, I reinstalled and upgraded setuptools, then all was well. weird. Why do you spoil your system with setuptools at all? All up-to-date Pylons components are available in Debian. aptitude ist your friend. Christoph

AuthKit bails out on Unicode usernames

2007-05-14 Thread Christoph Haas
Hi, list... I'm using AuthKit in my application and seem to have trouble when the login form gets me the username as a Unicode string. I use the famous line: form_username = request.params.get('username') request.environ['paste.auth_tkt.set_user'](form_username) This leads to Unicode errors (I

Bad cookies (authkit cookie name clash)

2007-05-14 Thread Christoph Haas
Today I had a weird problem and wanted to post the solution just so other people who have the same trouble may find it in the archives. :) I had a Bad cookie, you have been signed out. when using the forward method of AuthKit. It always happened to me when submitting the signin form that

Re: Paster server in production

2007-05-15 Thread Christoph Haas
On Tue, May 15, 2007 at 12:56:53AM -0700, voltron wrote: I have taken the advice from this forum and have installed nginx as a proxy to the paster server. this works well, but I´m really, really worried about using the Paster server in a production site, for example, when testing a Mako

Re: [RFC] Alternative paginator

2007-05-15 Thread Christoph Haas
On Tue, May 15, 2007 at 03:27:39PM -0700, Mike Orr wrote: On 5/5/07, Christoph Haas [EMAIL PROTECTED] wrote: as some of you already know I have never been very happy with Webhelpers' built-in pagination module. So I wrote my own (that is NOT compatible with the existing one) and I love

Re: SQLAlchemy and Pylons

2007-05-23 Thread Christoph Haas
On Wed, May 23, 2007 at 12:14:34AM -0700, voltron wrote: What is the recommend usage of SQLAlchemy and Pylons? I found these links, what is preffered? http://docs.pythonweb.org/display/pylonscookbook/SQLAlchemy+for+people+in+a+hurry I'm using this (^^^) approach. The only drawback is that

Re: Sessions an Pylons

2007-05-27 Thread Christoph Haas
On Sun, May 27, 2007 at 01:04:30PM -0700, voltron wrote: I read this on the Beaker site: Beaker is light WSGI middleware layer that provides session's using Myghty's Container API Does this also work with Mako? Are all of the functions available? Yes, the API works 1:1 on Mako. Ben has

Re: 'Address already in use' error

2007-05-27 Thread Christoph Haas
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 even lead to inconsistencies and make you need to reboot

Re: Apache mod_proxy + Pylons

2007-05-31 Thread Christoph Haas
On Thu, May 31, 2007 at 11:04:33AM -0700, voltron wrote: Actually its easy paster serve --daemon production.ini Thats it. I would not advice you to use --reload of you are using Debian though, What makes you draw *that* funny conclusion? I'm developing Pylons applications on Debian for

Re: Pylons Logo Design

2007-06-01 Thread Christoph Haas
Hi, James... On Fri, Jun 01, 2007 at 09:57:31AM +0100, James Gardner wrote: Ben and I have started thinking again about what really makes Pylons different from other web frameworks and how we can best highlight those differences in the Pylons marketing to help attract people to the

Re: Pylons Logo Design

2007-06-01 Thread Christoph Haas
On Fri, Jun 01, 2007 at 11:43:00AM +0100, James Gardner wrote: I didn't see the discussion actually but I've just had a look at the logs. Actually I like the style of the everaldo icons and logos, do you know if they are very costly? From IRC (Yannick is not subscribed here): 12:57

Re: Pylons Logo Design

2007-06-01 Thread Christoph Haas
On Fri, Jun 01, 2007 at 10:21:12AM -0400, Dan wrote: This is all highly opinionated, but here are some of my suggestions. I think you should consider changing domain names. I don't think the name Pylons is bad, just combined with the domain pylonshq.com it just doesn't stick. I'd

Re: Pylons Logo Design

2007-06-02 Thread Christoph Haas
On Fri, Jun 01, 2007 at 03:15:19PM -0700, Ben Bangert wrote: On Jun 1, 2007, at 11:11 AM, Mike Orr wrote: The introduction can be improved, certainly. I wasn't here when Pylons was started or the website was created, but my sense is that Pylons has evolved since then. Its first adherents

Re: SQLAlchemy object

2007-06-03 Thread Christoph Haas
On Sat, Jun 02, 2007 at 01:09:37PM -0400, Michael Bayer wrote: at Mike Orr's prodding, ive worked up a SQLAlchemy context object based on his proposal for a facade that deals with the various session (context)/engine/metadata mixtures. I think this would be a good idea for the very

Re: Can't get the blog tutorial to work

2007-06-12 Thread Christoph Haas
On Tue, Jun 12, 2007 at 05:34:47AM -0700, kib2 wrote: I'm new to Pylons and even more to DataBases. I followed your tutorial on how to make a basic blog with Pylons, but once I launch my app I've got the following errors : File 'C:\\Documents and Settings\\kib\\Bureau\\KIB\\blogtutorial\

Re: AuthKit Authorization Manager?

2007-06-13 Thread Christoph Haas
On Wed, Jun 13, 2007 at 11:28:31AM -0700, HiTekElvis wrote: I just started using AuthKit and have it working pretty snappily. Very pleased. Have a question: Is there a way to have a sort of Authorization Manager, where you can keep all of the permissions and authorizations in one file

Re: [RFC] Alternative paginator

2007-06-15 Thread Christoph Haas
On Fri, Jun 15, 2007 at 12:08:31PM -0700, Mike Orr wrote: There's a bug in Christoph Haas's alternative paginator (http://workaround.org/pylons/paginator/) if the result set contains zero records and 'show_if_single_page' is true. Module inews.lib.paginator:245 in navigator text = '%s' %

Re: [RFC] Alternative paginator

2007-06-15 Thread Christoph Haas
On Fri, Jun 15, 2007 at 09:26:00PM +0200, Christoph Haas wrote: I have added support for jQuery, too. UPDATE: the jQuery enabled version is already online at http://workaround.org/pylons/paginate I have also moved some logic around so it might well be the reported bug is gone. I'll check

Re: going off line

2007-06-15 Thread Christoph Haas
On Fri, Jun 15, 2007 at 02:11:01PM -0700, Shannon -jj Behrens wrote: Wish me luck with my fourth child which is due in two weeks! Best wishes! But next time you better thread instead of fork. Four children is prolly enough. :) Cheers Christoph

Re: Pylons success story (IncidentNews)

2007-06-16 Thread Christoph Haas
On Fri, Jun 15, 2007 at 03:48:07PM -0700, Mike Orr wrote: My first Pylons site is in production now at http://incidentnews.gov/ . It's running the following: Pylons 0.9.6 dev r2009 [...] Christoph Haas's alternative paginator Glad to hear that the paginator is

Re: logo redux

2007-06-16 Thread Christoph Haas
On Sat, Jun 16, 2007 at 12:02:11PM -0700, michael wrote: I was reading over the mailing list threads about the logo and I kinda had an idea. I just wanted to throw in my two cents. http://www.genoverly.com/pylons_play/pylons_logo_01_html.html I like it. Without a lot of philosophy it shows

Re: using decorators with controllers

2007-06-17 Thread Christoph Haas
On Sun, Jun 17, 2007 at 12:47:47AM -0700, voltron wrote: I am having problems using decorators with controllers. In a test controller: # testcontroller.py def dec(func): # do lotsa things print im doing something finished = True if finished: func() # call the

Re: Global Authkit app protection

2007-06-17 Thread Christoph Haas
On Sun, Jun 17, 2007 at 10:01:24AM -, Jose Figueras wrote: Following Authkit with Pylons article (and a mixture of other articles, docs, etc) If I try to protect my whole application I see this strange error: exceptions.AssertionError: Forwarding loop detected; '/signin' visited twice

Re: Global Authkit app protection

2007-06-17 Thread Christoph Haas
On Sun, Jun 17, 2007 at 09:03:42PM -, Jose Figueras wrote: On 17 jun, 13:22, Christoph Haas [EMAIL PROTECTED] wrote: On Sun, Jun 17, 2007 at 10:01:24AM -, Jose Figueras wrote: Following Authkit with Pylons article (and a mixture of other articles, docs, etc) If I try to protect

Re: How do I set my form to be a unicode string?

2007-07-01 Thread Christoph Haas
On Sun, Jul 01, 2007 at 11:27:38AM -0300, Walter Cruz wrote: Well, I asked before search the in the list archives! Sorry, no. If you like to continue the topic you brought up with another thread then please use the other thread. I didn't follow the other thread. If you start a new thread then I

Re: The is-Pylons-for-me post

2007-07-09 Thread Christoph Haas
Martin, On Mon, Jul 09, 2007 at 12:30:18AM -0700, Martin Aspeli wrote: We've just (almost certainly) chosen Pylons for a quick-and-dirty web application project. There are just a few outstanding things that we need to do, which I'm not sure how to approach. Speed is of the essence here, so

Re: putting binary data into the response

2007-07-13 Thread Christoph Haas
On Fri, Jul 13, 2007 at 01:09:06PM -0700, Jose Galvez wrote: Hi all, I know this should be simple but I can't find the answer anywhere, I have some images in a database that I need to send to a webpage. So I have a simple controller that should just send the binary data but I can't find how

SAContext and paster shell

2007-07-16 Thread Christoph Haas
Dear list, I'm on SQLAlchemy 0.3.9 and SAContext 0.3.1 now with Pylons 0.9.6-rc1. A lot of knowledge is useless now that SQLAlchemy changed quite a few things regarding queries and Pylons doesn't have pylons.database any longer. Currently I'm trying to get myself acquainted with a lot of syntax

Re: Pylons 0.9.6 Release Candidate 1

2007-07-17 Thread Christoph Haas
On Mon, Jul 16, 2007 at 03:19:16PM -0700, Ben Bangert wrote: On Jul 16, 2007, at 2:40 PM, Jose Galvez wrote: Sure, First I was testing with pylons-0.9.6rc2dev_r2256-py2.5.egg The project was created with pylons 0.9.4.1 and then converted after installing rc2 using

Re: Pylons 0.9.6 Release Candidate 1

2007-07-17 Thread Christoph Haas
On Tue, Jul 17, 2007 at 11:34:03AM -0500, Ian Bicking wrote: Christoph Haas wrote: On Mon, Jul 16, 2007 at 03:19:16PM -0700, Ben Bangert wrote: On Jul 16, 2007, at 2:40 PM, Jose Galvez wrote: Sure, First I was testing with pylons-0.9.6rc2dev_r2256-py2.5.egg

Re: should I code against the current release or the 0.96rc?

2007-07-31 Thread Christoph Haas
On Mon, Jul 30, 2007 at 11:30:43PM -0700, Jose Galvez wrote: Well I've definitely got a deadline to make this week. What I'm afraid of is that this project will grow and the migration will be that much more difficult. Indeed. The API has changed a bit (to the better) and I would suggest you

Re: 0.9.6rc: No templates directory

2007-07-31 Thread Christoph Haas
On Tue, Jul 31, 2007 at 10:39:47AM +0200, Christoph Haas wrote: Is it a bug that the templates directory is missing with the 0.9.6rc Pylons template? Creating it (mkdir) and putting Mako templates into it works perfectly though. So the basic Mako configuration is okay. Just figured that it's

Pagination module updated

2007-08-09 Thread Christoph Haas
Dear list... there was a tiny bug in my pagination module that lead to SQL errors in case a certain ORM-query lead to an empty result (0 items). It had been pointed out a month ago already but I suspected an SQLAlchemy bug. That has been fixed and the new version (currently Rev 100) is

Re: Redirection question

2007-08-11 Thread Christoph Haas
On Sat, Aug 11, 2007 at 04:59:33AM -, [EMAIL PROTECTED] wrote: Hello guys, is it recommended that a controller action displays various templates?, or is better redirect to the appropiate controller action for it to display the template? Depends on whether you want the URL to change.

Re: Logging

2007-08-11 Thread Christoph Haas
On Sat, Aug 11, 2007 at 02:28:31AM -0700, Mike Orr wrote: On 8/11/07, Christoph Haas [EMAIL PROTECTED] wrote: On Fri, Aug 10, 2007 at 09:31:58PM -0700, Mike Orr wrote: How do I get the Pylons logging to work in 0.9.6? I tried a few variations on import logging; logging.basicConfig

Re: CSS/Javascript in Pylons

2007-08-12 Thread Christoph Haas
On Sat, Aug 11, 2007 at 02:51:48PM -, Jose Figueras wrote: In my controllers I try to include CSS references (to css files inside /public/css) dynamically before I call to render_response(). The same about javascript files. If you are using templates then nothing it technically output

Re: [Paste] Can't start pylons app

2007-08-15 Thread Christoph Haas
On Wed, Aug 15, 2007 at 09:02:22AM -0400, Matt Feifarek wrote: On 8/15/07, Ian Bicking [EMAIL PROTECTED] wrote: Yeah; weird stuff with site-packages or easy-install.pth, perhaps? Doing python -c import pylons; print pylons.__file__ might help debug, and maybe if you install yolk

Re: [Paste] Can't start pylons app

2007-08-15 Thread Christoph Haas
On Wed, Aug 15, 2007 at 02:19:14PM -0400, Matt Feifarek wrote: On 8/15/07, Neil Blakey-Milner [EMAIL PROTECTED] wrote: On 8/15/07, Christoph Haas [EMAIL PROTECTED] wrote: Morale: never install eggs on a Debian-based system. Or, even better, use virtual-python or workingenv

Re: Can't start pylons app

2007-08-15 Thread Christoph Haas
On Wed, Aug 15, 2007 at 06:33:33PM -, __wyatt wrote: On Aug 15, 10:01 am, Christoph Haas [EMAIL PROTECTED] wrote: On Wed, Aug 15, 2007 at 09:02:22AM -0400, Matt Feifarek wrote: On 8/15/07, Ian Bicking [EMAIL PROTECTED] wrote: Yeah; weird stuff with site-packages or easy

Re: New SQLAlchemy tutorial; SAContext is dead

2007-08-16 Thread Christoph Haas
On Wed, Aug 15, 2007 at 06:04:22PM -0700, Mike Orr wrote: I've updated SQLAlchemy for people in a hurry with the new SQLAlchemy 0.4 programming pattern designed by Ben, MikeB, and myself. We're no longer using SAContext but instead putting the engine, metadata, and contextual session

Re: New SQLAlchemy tutorial; SAContext is dead

2007-08-16 Thread Christoph Haas
On Thu, Aug 16, 2007 at 01:55:26PM -0700, Mike Orr wrote: First, apologies for the mistakes in the tutorial. I'm going to convert my own application today, so that will be a practical test. But I did say to check back in 24 hours in case there are corrections. Let's make that 48 hours from

SQLAlchemy queries getting logged twice

2007-08-22 Thread Christoph Haas
Dear list... 0.9.6rc2 I just enabled sqlalchemy.echo and found that all queries are getting printed to the console twice. Raising the handler level to WARNING lead to the correct results. Looks like somehow the sqlalchemy mapper is propagating to the root logger. What can be done about that? I

Re: Session directories in 0.9.6

2007-08-24 Thread Christoph Haas
On Thu, Aug 23, 2007 at 06:16:35PM -0700, Mike Orr wrote: What are the cache and session config variables in 0.9.6? I upgraded my application with paster create and it contained: beaker.session.key = ... beaker.session.secret = ... cache_dir = %(here)s/data cache_enabled

Re: 'c' variable between redirects

2007-08-24 Thread Christoph Haas
On Fri, Aug 24, 2007 at 02:33:07PM +0200, Tomasz Nazar wrote: Whatever variable attached to 'c', it is available in the template when rendered via 'render_response('x.tmpl')'. I often however use redirects 'h.redirect_to(another_action)' to reuse controller's code. And the 'c'-attached

paster shell doesn't make models available

2007-09-03 Thread Christoph Haas
Dear list... when I run paster shell I do not have the model object available. I can of course import it manually from myproject import model but it used to be available in previous versions. How can I control what paster shell is doing? Wasn't it supposed to import everything from lib/base.py

Re: Jsonify like TG

2007-10-02 Thread Christoph Haas
On Tue, Oct 02, 2007 at 01:08:34AM -0600, Philip Cooper wrote: I wrote up this page http://www.openvest.com/trac/wiki/PylonsJsonify Quoting: * The reason is that the return from a controller method is a call to * render_response. This isn't quite true. You could send a Response() object

Re: Reducing pylons app memory usage?

2007-10-17 Thread Christoph Haas
On Tue, Oct 16, 2007 at 04:22:14PM +0200, Marcin Kasperski wrote: Any ideas how could I reduce pylons app RAM usage? At the moment pylons process takes above 100MB (almost static site serving some templates) - both when run with paste, and when run under mod_wsgi. Quite a lot, considering

Re: Reducing pylons app memory usage?

2007-10-17 Thread Christoph Haas
On Wed, Oct 17, 2007 at 09:03:12PM +0300, Max Ischenko wrote: On 10/17/07, Christoph Haas [EMAIL PROTECTED] wrote: On Tue, Oct 16, 2007 at 04:22:14PM +0200, Marcin Kasperski wrote: Any ideas how could I reduce pylons app RAM usage? At the moment pylons process takes above

Re: FormEncode form validators

2007-10-17 Thread Christoph Haas
On Wed, Oct 17, 2007 at 01:20:07PM -0500, Ian Bicking wrote: FormEncode is overdue for a release, but before that a request: there has been some mention that FormEncode should ship more useful form validators. For instance, FieldsMatch is an example of something currently shipped, but

Re: FormEncode form validators

2007-10-19 Thread Christoph Haas
On Thu, Oct 18, 2007 at 10:28:52PM -0400, Yannick Gingras wrote: Christoph Haas [EMAIL PROTECTED] writes: I could contribute validators for: - valid IPv4 network/address specifications (e.g. 10.0.0.0/8 or 192.168.25.1 but not 1.2.3.4/123) Here is what I use for IPv4 addr ranges

Re: Packages to use on Gutsy

2007-10-26 Thread Christoph Haas
On Fri, Oct 26, 2007 at 03:12:48AM -0400, Matt Feifarek wrote: Definitely use easy_install for Pylons and its dependencies Thanks all. Amazing, something upon which everyone agrees! Actually not. But I'm a bit tired of voicing my opinion and I can imagine that others may be tired of my

Re: Packages to use on Gutsy

2007-10-26 Thread Christoph Haas
On Fri, Oct 26, 2007 at 09:44:02AM -0700, zunzun wrote: On Oct 26, 8:42 am, Christoph Haas [EMAIL PROTECTED] wrote: Actually not. But I'm a bit tired of voicing my opinion and I can imagine that others may be tired of my opinion either. I am an Ubuntu user and was disappointed to learn

Re: Packages to use on Gutsy

2007-10-26 Thread Christoph Haas
On Fri, Oct 26, 2007 at 02:22:42PM -0700, Mike Orr wrote: On 10/26/07, zunzun [EMAIL PROTECTED] wrote: On Oct 26, 8:42 am, Christoph Haas [EMAIL PROTECTED] wrote: Actually not. But I'm a bit tired of voicing my opinion and I can imagine that others may be tired of my opinion either

Re: Outputting results of Pylons function to Javascript

2007-11-04 Thread Christoph Haas
On Sun, Nov 04, 2007 at 07:45:13AM -0800, JamesT wrote: I have a javascript file in /public/javascript that I want to receive data from a pylons function. I assume that you are including and running that Javascript from the HTML output you send to the browser. :) I am returning JSON

Re: Outputting results of Pylons function to Javascript

2007-11-04 Thread Christoph Haas
On Sun, Nov 04, 2007 at 05:48:10PM -, JamesT wrote: I think it has to do with the route to the pylons controller/function from the javascript file. Is your javascript located in /public/ javascripts/? Yes. And in one case I load the Javascript from my HTML document like: script

Re: mako rendering 'ascii' codec can't decode byte on variable from sqlalchemy

2007-11-18 Thread Christoph Haas
On Sun, Nov 18, 2007 at 01:20:54AM -0800, eleith wrote: i meant div ${c.name}/div I figured. :) Did you declare your Mako template file as UTF8? I always prepend my template files with: # -*- coding: utf-8 -*- Since Pylons 0.9.6 you do not need to do any fancy encoding stunts. Just pass

Re: Wiki page for Documentation Suggestions

2007-11-28 Thread Christoph Haas
Ches, On Wed, Nov 28, 2007 at 11:37:44AM -0800, Ches Martin wrote: Just wanted to share for public consumption that I've created a page in the Cookbook section of the wiki for suggested documentation fixes/ suggestions:

Re: Wiki page for Documentation Suggestions

2007-11-29 Thread Christoph Haas
On Thu, Nov 29, 2007 at 09:02:31AM +0200, Max Ischenko wrote: On 11/29/07, Christoph Haas [EMAIL PROTECTED] wrote: But Pylons is moving. And people find out interesting things and develop nifty ideas every day. We discuss them on IRC but in this case I'd love to have a planet

Re: h.link_to_remote help

2007-12-04 Thread Christoph Haas
On Mon, Dec 03, 2007 at 10:03:50PM -0800, Anil wrote: ${ h.link_to_remote(Download, dict(url=h.url(controller=export, action=pdf)) ) } I have a link like that. The action pdf generates a PDF file. Then, I want to show this PDF file to the browser (for download). How can I do this? I am

Re: Upgrading existing project to newer Pylons

2007-12-13 Thread Christoph Haas
On Thu, Dec 13, 2007 at 11:47:58AM +0100, Marcin Kasperski wrote: Maybe I missed something, but ... what should I do to upgrade existing project to the new Pylons release? I mean, for example, patching middleware.py so it suits newer idioms, patching imports etc. Install the new

SQLAlchemy logging in paster shell

2007-12-16 Thread Christoph Haas
Dear list... I've struggling with logging of SQL statements through SQLAlchemy for months now. I start to assume that logging is somehow broken in the paster shell. My development.ini has the default [loggers] section as part of the 0.9.6.1 Pylons template. I have just tried to add an

formencode validation on GET requests

2008-01-07 Thread Christoph Haas
Fellow earthicans... today I had a case where I wanted to @validate (Pylons decorator) GET requests through a formencode schema. It works well now that I use the parameters - post_only=False - on_get=True I just wonder if there is a reason that those are two parameters. Is there any case where

Re: WebHelpers plans

2008-01-11 Thread Christoph Haas
On Fri, Jan 11, 2008 at 05:51:00AM -0800, Mike Orr wrote: On Jan 11, 2008 4:48 AM, Lawrence Oluyede [EMAIL PROTECTED] wrote: What about http://codespeak.net/lxml/dev/lxmlhtml.html#creating-html-with-the-e-factory ? About the JavaScript thing: is it savvy to havea one for all

[ANN] paginate 0.3.2

2008-01-23 Thread Christoph Haas
Fellow earthicans... I have just released version 0.3.2 of the paginate module. It splits up large data sets into pages (just like search engines displays ~10 results per page instead of flooding you with 8 million results at onc3) and can easily be used with Pylons. It serves as a replacement

[ANN] Pylons Cheatsheet

2008-01-23 Thread Christoph Haas
Me again... :) I've been collecting knowledge about the various parts of Pylons in notes cluttering my KDE desktop. So I've started creating a 'Cheat Sheet' styled properly formatted document on my workaround.org site a while ago. To put the document where it can be found I've copied it to:

  1   2   >