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 sec
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 <[
2 matches
Mail list logo