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 function you were decorating
class HomeController(BaseController):
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
slight mixup, the function dec should read:
def dec(func):
# do lotsa things
print im doing something
finished = True
if finished:
func()
this function then uses request.environ['REFERER'] to call the
function it was were decorating, in this case, test
On Jun 17,
ok, I think I´m onto something:
def dec(func):
def wrapper(*vars):
print About to call decorated function %s. %
func.func_name
print request.environ[HTTP_REFERER]
return render_response(request.environ[HTTP_REFERER])
print decorator
return wrapper
this tries
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 (internal redirect path: ['/public',
'/signin']) .
But WSGI chain
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
On 17 kesä, 10:47, voltron [EMAIL PROTECTED] wrote:
I am having problems using decorators with controllers. In a test
controller:
[clip]
I have to pass self to the function passed to the decorator somehow,
what would be the best way to do this? I want the decorator to carry
out a few things
On 6/17/07, voltron [EMAIL PROTECTED] wrote:
ok, I think I´m onto something:
def dec(func):
def wrapper(*vars):
print About to call decorated function %s. %
func.func_name
print request.environ[HTTP_REFERER]
return
On 6/17/07, Ian Bicking [EMAIL PROTECTED] wrote:
Noah Slater wrote:
Hello,
When creating a configuration file, the documentation gives this as an
example:
use = egg:Paste#urlmap
What does egg:Paste#urlmap point to? From the documentation it says:
egg:Paste#urlmap means to
I took a break and later re-read what you guys wrote instead of the
trial and error stance I took, thanks Mike and PV, I have a better
understanding of decorators now :-))
I still have to figure out rendering templates from the decorator
though, using render _response for my templates does not
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
Has anyone used the fckeditor (http://www.fckeditor.net/) with pylons?
I've got a project that requires my users to entry data which is more
complicated then what can be handled by simple text boxes, due to user
formating. I've decided to use the FCKeditor to get the data, but
integrating it
12 matches
Mail list logo