From ffae332ad3c90e54772127cc50c10c4e391678cc Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 28 Jun 2012 09:56:53 -0500 Subject: [PATCH] better extension parsing, thanks Corne --- VERSION | 2 +- gluon/compileapp.py | 4 ++-- gluon/html.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 409ab534..89b0ad2f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-06-28 09:54:19) dev +Version 2.00.0 (2012-06-28 09:56:50) dev diff --git a/gluon/compileapp.py b/gluon/compileapp.py index f1a41e2f..cc338fd7 100644 --- a/gluon/compileapp.py +++ b/gluon/compileapp.py @@ -128,7 +128,7 @@ def LOAD(c=None, f='index', args=None, vars=None, attr['_id']=target request = current.request if '.' in f: - f, extension = f.split('.',1) + f, extension = f.rsplit('.',1) if url or ajax: url = url or URL(request.application, c, f, r=request, args=args, vars=vars, extension=extension, @@ -235,7 +235,7 @@ class LoadFactory(object): attr['_id']=target request = self.environment['request'] if '.' in f: - f, extension = f.split('.',1) + f, extension = f.rsplit('.',1) if url or ajax: url = url or html.URL(request.application, c, f, r=request, args=args, vars=vars, extension=extension, diff --git a/gluon/html.py b/gluon/html.py index 220e8824..63205145 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -275,7 +275,7 @@ def URL( extension = None if '.' in function: - function, extension = function.split('.', 1) + function, extension = function.rsplit('.', 1) function2 = '%s.%s' % (function,extension or 'html')