Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from django.utils.decorators import method_decorator
from app.lib.ajax import login_required_ajax
class RequireSignInAjax(object):
@method_decorator(login_required_ajax())
def dispatch(self, request, *args, **kwargs):
return super(RequireSignInAjax, self).dispatch(request, *args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment