3 ms·
> Some people feel @auth_required() is ugly. That's all. The biggest issue here is backwards compatibility. Nowadays I just make a separate decorator that acc
by the_mitsuhiko 15y ago
> Some people feel @auth_required() is ugly. That's all.
The biggest issue here is backwards compatibility. Nowadays I just make a separate decorator that accepts arguments and keep the old one around unchanged. I learned my lesson :)
- d0m 15y agoYou may also use a simple wrapper to create decorators which would automatically define @decorator and @decorator().
- the_mitsuhiko 15y agoI could also aim with a bazooka at my foot. Been there done that, lesson learned :-)