Re: checking for decorators or view meta properties

2008-06-28 Thread Julien
Hi, I'm not sure if I have see exactly what you mean by annotation in this context, but Python allows to add attribute dynamically to any object including functions. So, you could do like this: def my_view(request): ... my_view.some_annotation = 'bla' On Jun 29, 3:30 am, Leo Shklovskii

checking for decorators or view meta properties

2008-06-28 Thread Leo Shklovskii
I'd like to write some code that modifies a page depending on whether the view that generated it requires login or not. Right now all such views are decorated with @login_required. My initial thoughts on how to do this (coming from java) would be to slap an annotation on the views that are