Re: problem in pylons web application

2011-02-12 Thread James Gardner
Which version of FormBuild are you using and where did you see that example please? In the latest version there is no helpers module. I'd suggest either installing an older version or updating to version 3 and using the Form class. pip install --upgrade FormBuild=3.0,=3.0.99 Docs for that

Re: FormBuild3 question

2010-08-07 Thread James Gardner
Hi waugust, Thanks. There are actually two problems here: * A bug in form.end_with_layout() * A bug where the example LiteralForm in the docs is out of date I've made a new release 3.0.2 to fix them both. If you get the source distribution and look at test/pylons_test.py you should see the

Re: How extensible is AuthKit?

2010-01-04 Thread James Gardner
Hi Jamie, It sounds like you already have a farily sophisticated setup so I'd recommend rolling your own but using the AuthKit code as an example for anything you wish to build yourself. One tip though, I now believe using exceptions to trigger the 401 and 403 responses and then intercepting

The Definitive Guide to Pylons (complimentary copies)

2008-12-20 Thread James Gardner
Hi everyone, I'm pleased to announce that The Definitive Guide to Pylons is now available in bookshops. If you order a copy from Amazon today you might even get it in time for Christmas! http://www.amazon.com/Definitive-Guide-Pylons-James-Gardner/dp/1590599349/ The book represents 18 months

Re: Problem with Authkit 0.4.2 and Pylons 0.9.7rc4 on Apache2 and mod_wsgi 2.3

2008-12-10 Thread James Gardner
Hi Tomasz, [Wed Dec 10 05:38:44 2008] [error] [client [...]] mod_wsgi (pid=8169): Exception occurred processing WSGI script '/home/.../public_html/pyupo/apache2/pyupo.wsgi'. [Wed Dec 10 05:38:44 2008] [error] [client 88.199.174.122] TypeError: sequence of string values expected, value of

Re: Problems with AuthKit (was: Django or Pylons - comparison details)

2008-12-10 Thread James Gardner
Hi Raoul, Sorry, I quoted someone else, and I didn't clarify to say that I don't agree with him 100%. Faux pas on my part there, I didn't intend to be insulting. What I tried to convey was that AuthKit doesn't fit *my* needs. Sorry, I hadn't seen the earlier thread, my fault too. Not at

Re: AuthKit

2008-11-06 Thread James Gardner
Hi Eric, It isn't that it hasn't received any attention, rather that I need to be sure your patch won't break other functionality. I've released AuthKit 0.4.1 which mirrors the current trunk and started working on applying the patches but for the next week or two I'm going to be completely busy

Re: AuthKit Newbie Woes

2008-10-14 Thread James Gardner
Hi Steven, Ben and Walter, I updated the AuthKit chapters today: http://pylonsbook.com/alpha1/authentication_and_authorization http://pylonsbook.com/alpha1/simplesite_part_3 As it happens, although the SimpleSite Part 3 chapter isn't finished, I believe all the AuthKit information is now

Re: AuthKit Newbie Woes

2008-10-14 Thread James Gardner
There is an incompatibility between AuthKit and Pylons 0.9.7. Just put the all the AuthKit middleware right at the end of the middleware stack before the return statement and after the Cascade and then it should work. (This is explained in the updated documentation). On Oct 14, 4:04 pm, Steven

Re: Authkit setup error

2008-10-14 Thread James Gardner
That's right, you need to import your model into the websetup.py file: from simplesite import model On Oct 14, 4:58 pm, Steven [EMAIL PROTECTED] wrote: I'm a newbie as well (working through the pylonsbook.com) in my SimpleSite/simplesite/websetup.py I have this line at the top of the file

Re: Is AuthKit still acrively being developed?

2008-09-12 Thread James Gardner
PROTECTED] wrote: Some claim (http://beta.stackoverflow.com/questions/47801) that it is not. And so it seems that the last commit was 2 months ago... Can anyone clarify? Cc'ing James Gardner, AuthKit's maintainer. The main problem with AuthKit has been the documentation rather than

Change to AuthKit setup.enable behaviour

2008-06-14 Thread James Gardner
Hi all, I've just checked in some code to the trunk which changes the behaviour of the setup.enable option to AuthKit. If you specify: setup.enable = False in a config file it used to disable the AuthKit middleware. It now also disables all the authorization adaptors too. This is useful if

Re: How to make QuickWiki Integration Tutorial on pylons .9.6.1, authkit0.4 and sqlalchemy_04_driver work

2008-01-14 Thread James Gardner
The sqlalchemy_04_driver requires the SQLAlchemyManager middleware to be set up. This basically involves setting up SQLAlchemy as middleware rather than as part of Pylons as the QuickWiki tutorial does. You can follow the example here:

Re: AuthKit problems

2007-12-20 Thread James Gardner
Hi Lythoner, Yes. I have modified sqlalchemy_driver.py file to use SqlAlchemy 0.4. Actually what I meant was that there is already an SQLAlchemy 0.4 driver in there: http://authkit.org/trac/browser/AuthKit/trunk/authkit/users/sqlalchemy_04_driver.py It uses some experimental middleware I

Re: AuthKit problems

2007-12-20 Thread James Gardner
Hi Enrico, Now the it seems that the 'sqlalchemy_04_driver' have some problem with 'environ' object. Ahh, you've been caught out by the different API used by the 0.4 driver. The first argument with the new API should be the WSGI environment. I can see why this doesn't quite work in the way

Re: AuthKit problems

2007-12-19 Thread James Gardner
Hi Lythoner, You've spotted the SQLAlchemy 0.4 driver have you? AuthKit has never used SAContext ever. Cheers, James Lythoner LY wrote: Enrico, AuthKit 0.4 is not updated to use the full power of sqlalchemy 0.4. I had faced a lot of issues with UsersFromDatabase class last week.

Re: Authkit 0.3.0pre5dev_r92 + Pylons 0.9.6rc2 doesn't works?

2007-09-27 Thread James Gardner
Hi Jose, The documentation is for AuthKit 0.4 from http://authkit.org/svn/AuthKit/branches/0.4 I'm going to make a release at the weekend. The problem might be because Pylons 0.9.6 doesn't have the httpexceptions middleware. Try using AuthKit 0.4 and things are more likely to work. I've

Re: Anti-cacheing headers in Pylons

2007-09-26 Thread James Gardner
You can edit your config/middleware.py file so the end of it looks like this: ... javascripts_app = StaticJavascripts() class NoCache(object): def __init__(self, app): self.app = app def __call__(self, environ, start_response): def

Re: Setting the content type in Pylons 0.9.6

2007-09-26 Thread James Gardner
Hi Alec, You need: response.headers['Content-type'] = application/atom+xml return render(genshi-xml, atom-feed) James alecf wrote: I'm trying to render some Atom feeds with Pylons - I've got a genshi template that more or less renders the atom feed, but I need to return it as

Re: Retrieving multiple similar values from request.params

2007-09-25 Thread James Gardner
Hi voltron, I wrote a blog entry about this here: http://jimmyg.org/2007/09/19/multiple-checkboxes-with-formencode/ Basically you use a custom Schema in a ForEach validator and then use a NestedVarables pre-validator to decode the data to a list. You then need to re-encode it before using

Re: Pylons 0.9.6rc1 fails to start helloworld project: Lookup error

2007-07-23 Thread James Gardner
I think this issue might have been due to missing ez_setup.py files. Can you try with the latest Pylons SVN and see if that works? Cheers, James Philip Jenvey wrote: On Jul 19, 2007, at 2:31 PM, Gambit wrote: /usr/lib/python2.4/site-packages/PasteDeploy-1.3.1-py2.4.egg/paste/

Re: problem creating custom pylons project template

2007-06-26 Thread James Gardner
emery wrote: On Jun 25, 6:06 pm, James Gardner [EMAIL PROTECTED] wrote: Hi, Well I just wrote the response below which someone else might find useful in the future but in this case I've a hunch the problem is that you have chosen the name ``new`` as the test. I expect Python

Re: problem creating custom pylons project template

2007-06-25 Thread James Gardner
Could you please post your setup.py file? You have probably made a mistake in the entry_points section. Cheers, James emery wrote: Hello all, I am trying to customize the paster template for pylons applications to eliminate the need for repetitive changes when creating new pylons

Re: problem creating custom pylons project template

2007-06-25 Thread James Gardner
emery wrote: Thanks for the reply. I've posted the setup.py here: http://paste.lisp.org/display/43399#1 Chris On Jun 25, 2:46 pm, James Gardner [EMAIL PROTECTED] wrote: Could you please post your setup.py file? You have probably made a mistake in the entry_points section. Cheers, James

Re: problem creating custom pylons project template

2007-06-25 Thread James Gardner
pm, James Gardner [EMAIL PROTECTED] wrote: Your setup.py file doesn't have the paste.app_factory main entry point so the paster command doesn't know where the make_app() function of your Pylons app actually is. To fix this make your entry_points look like this: entry_points

London Hack Day

2007-06-16 Thread James Gardner
Are any Pylons users here at the London Hack Day today? If so, drop me an email with your mobile, perhaps we could work on something Pylons-related? Cheers, James --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Revisiting Pylons Branding

2007-06-05 Thread James Gardner
Hi Tim, Maybe it's the attitude? Turn the perceived inaccessibility to Pylons' advantage and appeal more directly to the hardcore crowd. Give it a more rugged image and a bit of a bite. Use a tag line like heavy-duty rapid web development, a powerful, customizable web framework, or rapid web

Re: installing python-sql on windows

2007-06-05 Thread James Gardner
Hi Voltron, I haven't tried that but you if you don't mind using psycopg you can get the Windows binaries here: http://www.stickpeople.com/projects/python/psycopg/ James voltron wrote: has anyone tried this lately? I get errors: D:\Projects\Pylons_projects\easy_install python-pgsql

Re: Pylons Security

2007-06-04 Thread James Gardner
Hi all, Who says AuthKit is not ready for production? Did its author disrecommend it? Well, I say it isn't ready for production on the main site because I'm still tweaking the APIs a bit and have written the full documentation. I'm using the 0.4 branch in production systems myself though

Re: Pylons Logo Design

2007-06-04 Thread James Gardner
Hi all, Dan wrote: 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 suggest using pylonsframework.org for the following reasons: .org - Eludes to an open source/non-profit.

Re: Pylons Logo Design

2007-06-01 Thread James Gardner
Hi Christoph, 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? Cheers, James Christoph Haas wrote: Hi, James... On Fri, Jun 01, 2007 at 09:57:31AM +0100, James

Re: AuthKit bails out on Unicode usernames

2007-05-14 Thread James Gardner
Hi Christoph, I've just tested AuthKit 0.4 with an Arabic username and yes, there is a problem because the browser encodes the Arabic as HTML entities because there is no charset specified when the form is produced. Other than that it all seems to work fine. Is it considered standard practice

Re: AuthKit bails out on Unicode usernames

2007-05-14 Thread James Gardner
usernames - I'm not sure whether specifying them directly in the paste config file will work for unicode for example. Cheers, James James Gardner wrote: Hi Christoph, I've just tested AuthKit 0.4 with an Arabic username and yes, there is a problem because the browser encodes the Arabic

Re: can't get authkit working in 0.9.5

2007-04-16 Thread James Gardner
Hi Max, You're right. I misread the docs and put it right _before_ the httpexceptions middleware. Glad you sorted it! The timestamp is right on http://authkit.org/docs/pylons.html page. ;) Most strange! Cheers, James --~--~-~--~~~---~--~~ You received

Re: Alternate way to install Pylons

2007-04-07 Thread James Gardner
Hi Rob, Try pointing easy_install at http://pylonshq.com/download/ using this command: easy_install -f http://pylonshq.com/download/ Pylons Cheers, James RobJ wrote: apparently the cheesshop server is having some down time and I need to install Pylons. Is there any other place where I

Re: FormBuild doesn't handle FormEncode's unicode messages

2007-04-03 Thread James Gardner
Hi Frederik, OK, I see. Looks like a FormBuild problem. I'll take a look over the next few days. Cheers, James Frederik wrote: Hi James, On Apr 2, 5:49 pm, James Gardner [EMAIL PROTECTED] wrote: Hi Frederik, Is this now resolved with Ian's new FormEncode release? If not, can you

Re: formbuild Custom Form

2007-04-02 Thread James Gardner
Hi, FormBuild forms aren't really designed for you to do that. If you want to add extra methods you should so so to either the Fields or Layout classes you set the form up with and then access them via the form.field.test() if the test method produces a field or form.layout.test() if it is

Re: FormBuild doesn't handle FormEncode's unicode messages

2007-04-02 Thread James Gardner
Hi Frederik, Is this now resolved with Ian's new FormEncode release? If not, can you send me some code that breaks and I'll look into it. Cheers, James Alberto Valverde wrote: On Mar 28, 2007, at 11:23 AM, Frederik wrote: Hello! Current, I'm having a look into Pylons and FormBuild. I

Re: AuthKit: how to use authorization in Myghty templates?

2007-03-29 Thread James Gardner
Hi Chris, You need the authorized() function which returns True or False rather than raising the exception. http://authkit.org/docs/module-authkit.pylons_adaptors.html Hope that helps, James something like: Chris Shenton wrote: I'm using AuthKit with an SQLite DB and wrote a couple

Re: New Pylons site launched

2007-03-26 Thread James Gardner
Congratulations Robert and thanks for sharing the setup with the rest of us! James Robert Leftwich wrote: Just thought I'd let everyone know that after much hard work we have finally publicly launched our Pylons-based site - http://www.marketshares.com.au Apologies for the (semi-)spam,

Re: AuthKit using database for users, groups, roles?

2007-03-26 Thread James Gardner
Hi Chris, Chris Shenton wrote: My implementation may not be the cleanest and I'm still uncertain about doing auth in my account.py controller versus doing something with valid() in app_globals.py. Well, you only need to use valid() if you want the AuthKit middleware to handle the

Re: ANN: Documentation Wiki Launched

2007-03-20 Thread James Gardner
Hi Dave, Once again Philip Jenvey is on the case and has implemented a prototype rst plugin which currently generates HTML but not PDF. There isn't a huge amount of Trac content on the Trac wiki (some is rst anyway) so it will probably be easier just to move the remaining articles across

Re: formbuild questions

2007-03-20 Thread James Gardner
: On Tue, 2007-03-20 at 09:16 +, James Gardner wrote: The relevant sections of the manual (http://formbuild.org/docs/manual.html) to get you started are I seem to recall (perhaps incorrectly) that formbuild was being deprecated/discontinued/merged with another project. Is this the case

Re: Pylons Logo...

2007-03-18 Thread James Gardner
Hi Todd, Is this tied to any release plans or just a general initiative/plan? In other words is this for a 1.0 party (or more conservatively 0.9.6 :-) or just a general effort to increase visibility? It is part of a general effort to increase visibility, but that being said I think we'd all

Re: AuthKit bug: users.py UsersFromFile should read from fp, not filename

2007-03-16 Thread James Gardner
Thanks, this is fixed now. James Chris Shenton wrote: Using AuthKit-0.3.0pre5. The code gets the file pointer but then reads from the filename string: def __init__(self, filename): string = None try: fp = open(filename, 'r') string =

Re: AuthKit using database for users, groups, roles?

2007-03-16 Thread James Gardner
Hi Pauli, I always implement my own database, permissions and valid() function in my code. The users API is simply meant for use in small systems where there isn't any need for a more sophisticated solution. Although you could create your own implementation of the API to use a database, it is

Re: paste.recursive.include

2007-03-15 Thread James Gardner
Hi Ksenia The problem here is that the recursive middleware can only forward to paths below it. In this case, the recursive middleware is setup in the error document middleware in the myproject app so when you try to include /someapp the recursive middleware thinks you mean /someapp below

Re: custom authkit permission

2007-03-14 Thread James Gardner
Hi, The example you gave should have worked. I'm not sure I quite understand the question though. Do you mean that the exception is raised but that a sign in isn't triggered or that even after you have signed in, only a NotAuthenticatedError is raised any that you never get a

Re: paste.recursive.include

2007-03-14 Thread James Gardner
Hi Ksenia, The ErrorDocuments middleware also uses the recursive middleware so you don't need to include it again. Other than that, if you are trying to display the redirected page you need to do this (I've tested it with Pylons==dev and it works fine): def index(self): result =

Re: mod_proxy example

2007-03-13 Thread James Gardner
Actually you are right. I've disabled it and everything still works, including my SSL setup. Cheers, James __wyatt wrote: On Mar 12, 10:44 am, James Gardner [EMAIL PROTECTED] wrote: ... sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod proxy_connect I don't seem to need

Re: mod_proxy example

2007-03-12 Thread James Gardner
Hi wyatt, That's exactly right. For completeness if these modules aren't already enabled can enable them with this: sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod proxy_connect The only complication with the proxying approach occurs if you are proxying to an application that isn't

Re: Deplyoing Pylons applications as Debian packages?

2007-03-06 Thread James Gardner
Hi Christoph, I think there are two issues here: 1. People like to install multiple versions of the software on the same machine 2. Python software, pylons included, isn't as stable from version to version as most of the software in Debian stable Although Debian packages are brilliant when

Re: Deplyoing Pylons applications as Debian packages?

2007-03-06 Thread James Gardner
Hi Christoph, 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

Re: Deplyoing Pylons applications as Debian packages?

2007-03-05 Thread James Gardner
Hi Christoph, I use Debian and the way I deploy my apps is using a virtual Python installation into a user account I setup for each app. I usually then just checkout the latest source code and run: ~/bin/python setup.py develop The problem with trying to package up a Pylons app into a Debian

Re: ANN: AuthKit 0.3.0pre4

2007-02-19 Thread James Gardner
Hi Cliff and Robert, There was a simple typo in 0.3.0pre4 which meant none of the config data was getting passed correctly to the middleware. Thanks for pointing it out. I corrected it and released 0.3.0pre5 so you should upgrade to that. It isn't an issue with your application Cliff! To

Re: Fast Python webserver

2007-02-18 Thread James Gardner
Hi Robert, Ian I'm going to be doing some performance tests on my setup in the next few days, but one thing I've noticed in preliminary playing is that using fastcgi/flup with nginx is noticeably faster than a straight proxy. I've been interested to see how well Pylons works with

Re: Fast Python webserver

2007-02-18 Thread James Gardner
Hi guys, Maybe you could try with the latest (0.5.12) version? I've rerun the tests with 0.5.12 and the difference is exactly the same. FastCGI is 5 times *slower* than simple HTTP! Well by default nginx is going to cache the proxied server's response before sending it to the client, that

Re: Fast Python webserver

2007-02-18 Thread James Gardner
Hi Ian, I've rerun the tests with 0.5.12 and the difference is exactly the same. FastCGI is 5 times *slower* than simple HTTP! Someone mentioned caching -- are you sure that the HTTP server is getting all the requests? If Nginx is caching some responses and not passing them through,

Re: Fast Python webserver

2007-02-18 Thread James Gardner
Hi Bob, I'm curious as to why anyone would want to use FastCGI in the first place if proxying is available? Implementation wise, there's very little reason why FastCGI would be markedly faster or slower than the HTTP protocol. Agreed, there's no point unless FastCGI is significantly faster

Re: Fast Python webserver

2007-02-18 Thread James Gardner
Robert Leftwich wrote: As I'm the one that said it was faster earlier in the thread, I think I should be the one to put the rumour to bed :-)) Sure. I've heard the same rumour in other places too though actually, particularly related to rails but also with Pylons eg:

Re: AuthKit and AuthDemo

2007-02-11 Thread James Gardner
Hi Hamish, I need some simple cookie-based authentication: the user should initially be presented with a page asking for their email address; an email should be sent to that address containing a link; when the user visits that link, an association is made between cookie and email address.

Re: More on unicode (plus new i18n features like fallbacks)

2007-02-02 Thread James Gardner
Hi Uwe, Uwe Feldtmann wrote: All is translating fine using _() although it would be nice if there was some quick way to get all the strings from a template. As luck would have it I was documenting this yesterday around line 844 here:

Re: More on unicode (plus new i18n features like fallbacks)

2007-02-02 Thread James Gardner
Hi Max, from helloworld.lib.base import * from pylons.i18n.translation import add_fallback class HelloController(BaseController): def index(self): h.set_lang('en') add_fallback('es') return Response(_('Hello')+' '+_('World')+_('!')) If Hello is in the en

Re: More on unicode

2007-02-02 Thread James Gardner
Hi Damjan, Damjan wrote: While on the topic ... can someone take a look at http://routes.groovie.org/trac/routes/ticket/37 This is fixed in the latest routes. Try: easy_install -U routes==dev I've closed the ticket. Cheers, James --~--~-~--~~~---~--~~ You

Re: What's the best way to provide a patch ?

2007-02-01 Thread James Gardner
Ben Bangert wrote: A diff attached to the Trac ticket as a file upload ending in .diff is ideal, along with a test case when appropriate. I'll try and remember to get this doc'd on the front page of the Wiki as well. I've followed up Alberto's suggestion of basing our doc on the TG

Re: AuthKit: support for encrypted passwords

2007-02-01 Thread James Gardner
Hi Josh, Josh Heitzman wrote: I dug around a bit. What Unix systems used to was called crypt. Some are currently a salt + MD5, but apparently the better algorithm is considered to be bcrypt, which includes a 128-bit salt and uses are variable cycle encryption algorithm. A python

Re: Authentication and Authorization Systems

2007-02-01 Thread James Gardner
Hi Uwe, Here is a complete Pylons auth system using SQLAlchemy and OpenID to get you started: http://authkit.org/trac/browser/AuthKit/trunk/examples/pylons/AuthDemo I've looked at the above example and I was wondering why there appears to be 3 separate persistence tools namely DBUtils,

Re: More on unicode

2007-02-01 Thread James Gardner
Hi Uwe, The translation should occur at run time so this shouldn't be a problem. How are you doing the translation? If you are using the Pylons _() function in the template everything should be fine surely? Cheers, James Uwe Feldtmann wrote: I've cross posted this on the Mako list as

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

2007-01-29 Thread James Gardner
Hi Chris, I think your introduction is very helpful so thanks for writing it up. I've added a note to the TowardsOnePointZero page that we should add something similar to the main docs. Is there a review process? Does the documentation get checked into the svn? After all the main

Re: pylons controller's self vs. c global

2007-01-29 Thread James Gardner
Hi Max, From reading the docs at http://pylonshq.com/docs/0.9.4.1/module- pylons.controllers.html I assume that new controller instance is created to handle each incoming request and discarded after it is processed. This means I can safely set and read self.foobar attributes without

Re: [AuthKit] fallback for no cookie support, AtomPP in a forward auth app

2007-01-29 Thread James Gardner
Hi David, I agree it would be handy to have a way for the app to test for the client's ability to use cookies but I think the fallback mechanism needs to be thought through to be a little more generic. I was discussing this with someone else a while back too so I'll try and find the thread.

Re: how to build a portlet style site?

2007-01-17 Thread James Gardner
Hi Paul, I'm developing a new templating system called art which handles this particular case. Instead of using a controller to call a template and display the result, the template effectively defines which content it requires and calls the different controllers (called plugins in art)

Re: Authentication and Authorization Systems

2007-01-16 Thread James Gardner
Hi Alagu, All of them will work! I'd recommend AuthKit because I wrote it with Pylons in mind. I'm biased though ;-) AuthKit is based on paste.auth so includes some of the paste.auth middleware. I also tried to ensure it does everything that barrel does. Here are the AuthKit pylons docs:

Re: gettext doesn't work in Mighty template?

2007-01-10 Thread James Gardner
Hi Max, Have you set your encoding to UTF-8 in the Myghty config as described here? http://pylonshq.com/docs/internationalization.html#templating HTH James Max Ischenko wrote: Hello, I am testing i18n support in Pylons and run into this error: Myghty Template Error Error:

Re: Can Pylons be more aggressive ?

2007-01-05 Thread James Gardner
Hi Kendall, I've talked to James about writing a piece about Pylons when it goes 1.0, and I still want to do that (i.e., if James is still interested, he's got dibbs on the main 1.0 piece). I'm still up for that. In fact perhaps now that others on the mailing list seem to think it is

Re: Problem with the Flickr tutorial

2006-12-22 Thread James Gardner
I just noticed that there was a change in Paste 1.1 which might affect things: paste.request.parse_formvars didn't accept parameters in CONTENT_TYPE. prototype.js sets a charset parameter, which caused a problem. Have you tried upgrading to Paste 1.1? Does that fix the issue or is

Re: pase 1.1 troubles (solution)

2006-12-21 Thread James Gardner
Hi Ian, I'd like to release a new version of Paste with these Windows fixes before I leave for vacation on Friday. So maybe best to leave off the directory indexes for now. I've checked in a new version of the code that doesn't use your recursive technique. Hope that's OK. Cheers,

Re: Pudge troubles

2006-12-20 Thread James Gardner
Hi, You'll need Kid==0.9.3 (0.9.4 doesn't work) and you'll need to remove all the .pyc files in docs/pudge_template too. Once I've done this the main docs compile nicely, thanks Ben. I get the following warning though: C:\Documents and

Re: pase 1.1 troubles (solution)

2006-12-20 Thread James Gardner
Hi Jose, I've tried your suggestion of using: self.directory = os.path.normpath(directory) and that works fine too so I'll check that in instead if you'd prefer? James Gardner wrote: At the moment if I put in a URL which resolves to a directory this code kicks in (line 460

Re: pase 1.1 troubles (solution)

2006-12-20 Thread James Gardner
Hi Ian, self.directory = os.path.normpath(directory) I think that makes sense. Great. This is how subdirectories are handled: SCRIPT_NAME=''; PATH_INFO='/foo/bar/baz.html' maps to app StaticURLParser('/www') That in turn forwards the request as: SCRIPT_NAME='/foo';

Re: new project and so many files

2006-12-19 Thread James Gardner
Hi Max, Is it really necessarily? Is it because no one yet figured out how to simplify things or this approach does provide some benefits? Well, it's a simple case of trying to make things as simple as possible but leaving everything in there that a developer is actually going to use. If

Re: AuthKit: code typo

2006-12-18 Thread James Gardner
Hi Bill, Thanks, I've fixed this now. Cheers, James Bill wrote: http://authkit.org/trac/browser/AuthKit/trunk/authkit/authenticate/__init__.py#L327 references AuthConfigError instead of AuthKitConfigError: # # Configure the config files # if config_file and

Re: pase 1.1 troubles

2006-12-18 Thread James Gardner
Hi Jose, I get the same problem. No doubt something to do with Windows paths. First thing to do is see if it is a Pylons or Paste problem so I'll do some checks. Cheers, James I just tried the removing all the spaces from my paths and it still does not work. I'm also not getting much in

Re: pase 1.1 troubles (solution)

2006-12-18 Thread James Gardner
['static_files'].replace('/','\\') ) Then everything should work. Cheers, James James Gardner wrote: Hi Jose, I get the same problem. No doubt something to do with Windows paths. First thing to do is see if it is a Pylons or Paste problem so I'll do some checks. Cheers, James I

Re: pase 1.1 troubles

2006-12-18 Thread James Gardner
. I'm using windows also. I downgraded to Paste 1.0.1 and it works. jw On Dec 18, 8:04 am, James Gardner [EMAIL PROTECTED] wrote: Hi Jose, I get the same problem. No doubt something to do with Windows paths. First thing to do is see if it is a Pylons or Paste problem so I'll do some checks

Re: pase 1.1 troubles (solution)

2006-12-18 Thread James Gardner
ouch. Thanks all! jw On Dec 18, 10:47 am, Ian Bicking [EMAIL PROTECTED] wrote: James Gardner wrote: Hi Jose, The problem is that StaticURLParser keeps some variables with / path separators and \ characters with others if you don't specify the root_directory on Windows. The solution

Re: Recent i18n Pylons changes

2006-12-14 Thread James Gardner
We all seem to be having different suggestions here. The issues were: 1. Whether to drop the h. prefix 2. Whether to point h._ to ugettext rather than gettext 3. How to integrate the aquarium code The current opinion seems to be edging towards: 1. keep _() in the global namespace and as h._

Re: pylons and Apache's DocumentRoot

2006-12-13 Thread James Gardner
Dear Ramon, It sounds like you are simply bewildered by choice here! Since you are serving only 50 requests/day it really doesn't matter which deployment technique you use. Here are a load of bullet points which hopefully clear up all the various areas you have touched on! * Pylons doesn't

Re: Recent i18n Pylons changes

2006-12-13 Thread James Gardner
The plan in 0.9.4 is to use h.ugettext() instead of _(). h._() will be the same as h.ugettext(). Have you seen the new docs? I think we've pretty much agreed on what is in this document now? Most of the interesting stuff is at the bottom.

Re: Using Durus with Pylons

2006-12-12 Thread James Gardner
Hi Mike, The globals object is *not* thread-specific! I suggest you instead create the connection in lib/base.py within the __call__. Then I'll be creating a connection for every request. Is there no better place to do it once per thread? Well, the thing is Pylons is thread-safe but

Re: New tutorials

2006-12-12 Thread James Gardner
Hi Mike, These look really good! I'm sure people will find them useful. Many thanks, James Mike Orr wrote: Here's what I've been up to. I've written down notes of my study of Pylons. There's a detailed article tracing the code execution of QuickWiki, tips for controller actions, and an

Re: Error importing kid from example

2006-12-11 Thread James Gardner
Hi Sean, I expect you are missing the TurboKid package. You can install it manually with: easy_install TurboKid or, as is the case with all of the optional Pylons packages you can do: easy_install -U Pylons[kid] The extras are described here:

Re: Error importing kid from example

2006-12-11 Thread James Gardner
Hi Sean, Thanks, James. Just a quick link on that page back to the install instructions would be helpful, although it is quite obvious on the install page that this needs to be done for kid templates to work. No problem, I've updated the docs with this paragraph:

Re: Internationalization - utf-16

2006-12-11 Thread James Gardner
Hi Alagu, Presumably you have created the binary message catalog with the following command as described in the docs: python setup.py lang_compile If so I have a similar problem. The tutorial works fine with ASCII characters but not with Unicode. I've tried re-writing Python's msgfmt.py file

Re: Internationalization - utf-16

2006-12-11 Thread James Gardner
Hi Alagu, OK, I've cracked it. As I suspected there is nothing wrong with the implementation in Pylons, it is just that Python's msgfmt.py implementation to create the binary catalogs is not even slightly adequate. The solution is to use GNU gettext or a third party tool to create the

Re: QuickWiki source

2006-12-08 Thread James Gardner
Hi Mike, The source is here: http://pylonshq.com/project/pylonshq/browser/sandbox/examples/QuickWiki You can check it out with: svn co http://pylonshq.com/svn/sandbox/examples/QuickWiki Cheers, James Mike Orr wrote: Is there a source tarball for QuickWiki available? I'm particularly

Re: Pylons on Ubuntu (with Python 2.5)

2006-12-08 Thread James Gardner
You could try installing Cheetah 1.0 instead. Using the Python 2.5 version of easy_install and all one line: easy_install -U http://cheeseshop.python.org/packages/source/C/Cheetah/Cheetah-1.0.tar.gz#md5=aaa4907b8877093b9bb11e6cea6b029b Then try to install Pylons again. Let me know if that

Re: Pylons on Ubuntu (with Python 2.5)

2006-12-08 Thread James Gardner
has already made? Hope it works, James 3KWA wrote: James Gardner wrote: You could try installing Cheetah 1.0 instead. Using the Python 2.5 version of easy_install and all one line: easy_install -U http://cheeseshop.python.org/packages/source/C/Cheetah/Cheetah-1.0.tar.gz#md5

Re: set up a host to provider Pylons service

2006-12-06 Thread James Gardner
Hi Thomas, I didn't quite understand your question but if you are looking for a Pylons web hosting company I can highly recommend WebFaction www.webfaction.com. They have a web-based control panel app that sets you up with a Pylons app quickly and easily. Mention Pylons when you sign up and they

Re: who can give me a simple database demo?

2006-12-04 Thread James Gardner
Hi Thomas, Have you seen these: http://pylonshq.com/docs/0.9.3/quick_wiki.html http://pylonshq.com/project/pylonshq/wiki/SqlAlchemyWithPylons You could also do it directly without using SQLAlchemy. HTH, James Thomas Qi wrote: Hi, All I want to use Pylons to do a simple page, it should

  1   2   >