Quantcast
Channel: Why do I need to decorate login_required decorator with @method_decorator - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Mike Fogel for Why do I need to decorate login_required decorator...

Django's method_decorator is set up to pass the self argument in correctly to the decorated function. The reason this doesn't show up in the test cases you wrote above with the run_eight_times...

View Article



Why do I need to decorate login_required decorator with @method_decorator

I am trying to understand the code for the mixins posted at this blog post. These mixins call the login_required decorator from django.contrib.auth.decorators within the mixins , but they do so...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images