dabapps/django-private-views — pull request #6 by hasier (2014-08-08 14:24:02+00:00)
Title: Easy Ajax support for views

Add @ajax and @ajax_login_not_required decorators to easily mark views as requiring Ajax.
If a view marked with either @ajax or @ajax_login_not_required receives a non-ajax call, it will return a 400 Bad Request.
If a view marked with @ajax receives a call without a logged in user, it will return a 401 Unauthorized.