1 2 3 4 5 6 | class HttpResponseNotAuthorized(HttpResponse):
status_code = 401
def __init__(self, redirect_to):
HttpResponse.__init__(self)
self['WWW-Authenticate'] = 'Basic realm="%s"' % Site.objects.get_current().name
|
More like this
- another render_to_response wrapper by ro60 4 years, 4 months ago
- HTTP headers view decorator by dottedmag 4 years, 11 months ago
- Cache view by user (and anonymous) by rafaelsdm 9 months ago
- Fix for GZipMiddleware when serving files or streaming or using iterators by wojtek 2 years, 6 months ago
- ajax protocol for data by limodou 5 years, 2 months ago
Comments
how can i use above code?
#