XMLHttpRequest - Redirect - Issue

2006-12-18 Thread mmohen
Hi All, I am facing a problem in login screen using XMLHttpRequst sending the data to the pylons controller. controller is getting the value through request.params. but its not redirecting the same. def login_validation(self): c.username = request.params['username'] c.password =

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
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 on Windows is to specify both the directory and the root_directory when setting up the static file parser and

Re: pase 1.1 troubles

2006-12-18 Thread programmer.py
I had the same problem as Jose. 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

Re: pase 1.1 troubles

2006-12-18 Thread James Gardner
Hi jw, You probably don't want to do that though because of the potential security issue in that version of Paste. Just modify your config/middleware.py file as I described in my last email and everything should work. Cheers, James programmer.py wrote: I had the same problem as Jose.

Re: SQLAlchemy, Again

2006-12-18 Thread Sean Davis
On 12/11/06, Ben Bangert [EMAIL PROTECTED] wrote: On Dec 11, 2006, at 3:25 PM, Sean Davis wrote: Unfortunately, I did. I just got a working example running without any of the config stuff working--the model has a hard-coded dsn in it right now. I can work backwards from that toward

Re: pase 1.1 troubles

2006-12-18 Thread Ian Bicking
James Gardner wrote: Hi jw, You probably don't want to do that though because of the potential security issue in that version of Paste. Just modify your config/middleware.py file as I described in my last email and everything should work. Cheers, James programmer.py wrote:

Re: pase 1.1 troubles (solution)

2006-12-18 Thread Jose Galvez
Thanks James, I'll make these changes right away. It also looks like Ian might be looking into a more permanent solution as well so I'll keep my eys open for that too. Jose James Gardner wrote: Hi Jose, The problem is that StaticURLParser keeps some variables with / path separators and \

Re: pase 1.1 troubles (solution)

2006-12-18 Thread Ian Bicking
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 on Windows is to specify both the directory and the root_directory when setting

Pylons 0.9.3 and pylons.database module...

2006-12-18 Thread programmer.py
I recently upgraded pylons to 0.9.3 because I was not getting any logging output (this is still broken for me :( -- any hints on where I can begin looking for this problem?) Anyway, in the pylons.database module, the AutoConnectHub has a get_connection method, instead of getConnection which it

Re: pase 1.1 troubles (solution)

2006-12-18 Thread programmer.py
fwiw, im on windows - import os.path os.path.normpath(r'c:\tmp\pylons-sandbox\helloworld') 'c:\\tmp\\pylons-sandbox\\helloworld' Also, Ian is right, the problem is in urlparser.py ... I printed out the `full' and self.root_directory before the check @457 and got -

Re: pase 1.1 troubles (solution)

2006-12-18 Thread programmer.py
Oh, I think this is what you really wanted to know about normpath... os.path.normpath(r'c:/tmp/pylons-sandbox/helloworld') 'c:\\tmp\\pylons-sandbox\\helloworld' It does seem to fix the path separator on windows. jw On Dec 18, 11:51 am, programmer.py [EMAIL PROTECTED] wrote: fwiw, im on

Re: pase 1.1 troubles (solution)

2006-12-18 Thread James Gardner
Hi all, I've checked in some changes to paste.urlparser to work with Windows but I've noticed a problem with certain URLs now redirecting to themselves which I'm investigating. Cheers, James programmer.py wrote: Oh, I think this is what you really wanted to know about normpath...

Re: Using Durus with Pylons

2006-12-18 Thread Mike Orr
Here's what I ended up with for persistent thread-local Durus connections in Pylons. It works in my test, using a TCP socket to the database server and doing multiple requests until a thread is reused. Are there any flaws in the coding? Is CONFIG[global_conf]{__file__] the best way to get the

Re: Recent i18n Pylons changes

2006-12-18 Thread Shannon -jj Behrens
On 12/14/06, Pedro Algarvio, aka, s0undt3ch [EMAIL PROTECTED] wrote: One way to use ungettext, or better, we could also attach ungettext to N_() like some C progams do, just an idea. ungettext and N_ aren't the same thing. N_ is used to mark a string for translation but *not* translate it.

Re: Recent i18n Pylons changes

2006-12-18 Thread Shannon -jj Behrens
I'm currently working on the extraction from genshi with help from http://genshi.edgewall.org/wiki/GenshiRecipes/Localization, but the regex presented there is too narrow. So far I've succeeded on extending it a bit more, I can now also match: _(A string which will become \too

Re: Recent i18n Pylons changes

2006-12-18 Thread Shannon -jj Behrens
On 12/16/06, Philip Jenvey [EMAIL PROTECTED] wrote: On Dec 14, 2006, at 12:48 PM, Pedro Algarvio, aka, s0undt3ch wrote: I agree with Ben's arguments, I expect _() to simply exist and do the correct job, what about binding ungettext to N_()? would that clutter the namespace? gettext

Re: comments on Unicode document

2006-12-18 Thread Damjan
http://pylonshq.com/project/pylonshq/browser/Pylons/trunk/docs/internationalization.txt Wow, great document This is a lot of non-Pylons-specific work! And this should really be added to the Python wiki, too... and eventually should enter the standard Python documentation. My notes:

Re: comments on Unicode document

2006-12-18 Thread Damjan
For example MySQL's Unicode documentation is here Also note that you need to consider both the encoding of the database and the encoding used by the database driver. If you're using MySQL together with SQLAlchemy, see the following, as there are some bugs in MySQLdb that you'll need

Re: Recent i18n Pylons changes

2006-12-18 Thread Pedro Algarvio, aka, s0undt3ch
Shannon -jj Behrens wrote: I'm currently working on the extraction from genshi with help from http://genshi.edgewall.org/wiki/GenshiRecipes/Localization, but the regex presented there is too narrow. So far I've succeeded on extending it a bit more, I can now also match: _(A string

Re: Using Durus with Pylons

2006-12-18 Thread Damjan
Actually this is what I've used to create per thread durus connections and cache them: from durus.client_storage import ClientStorage from durus.connection import Connection import threading def connect(address): tls = threading.local() try: connection = tls.connection except:

Re: pase 1.1 troubles (solution)

2006-12-18 Thread Jose Galvez
Dear James, I was looking at what you checked in and I'm confussed, how does it work: your code: if os.path.sep != '/': 440 directory = directory.replace('/', os.path.sep) 441 self.root_directory = self.root_directory.replace('/', os.path.sep)