def get(self, request, *args, **kwargs): auth = request.META.get('HTTP_AUTHORIZATION') if auth is None: return basic_challenge("authenticate to update DNS", 'badauth') username, password = basic_authenticate(auth) self.hostname = username self.secret = password return super(JsUpdateView, self).get(request, *args, **kwargs)