def handler500(request): webapp = settings.APP_PREVIEW template = "amo/500%s.html" % ("_apps" if webapp else "") arecibo = getattr(settings, "ARECIBO_SERVER_URL", "") if arecibo: post(request, 500) return jingo.render(request, template, {"webapp": webapp}, status=500)
def handler500(request): webapp = settings.APP_PREVIEW template = 'amo/500%s.html' % ('_apps' if webapp else '') arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '') if arecibo: post(request, 500) return jingo.render(request, template, {'webapp': webapp}, status=500)
def emit(self, record): arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '') if not self.should_email(record) or not arecibo: return post(record.request, 500) self.emitted(self.__class__.__name__.lower())
def emit(self, record): from django.conf import settings arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '') if arecibo and hasattr(record, 'request'): from django_arecibo.tasks import post post(record.request, 500)
def custom_404(request): """Custom 404 error handler.""" featured_rep = utils.latest_object_or_none(FeaturedRep) t = loader.get_template('404.html') post(request, 404) return http.HttpResponseNotFound( t.render(RequestContext(request, {'request_path': request.path, 'featuredrep': featured_rep})))
def emit(self, record): arecibo = getattr(settings, "ARECIBO_SERVER_URL", "") if arecibo and hasattr(record, "request"): if getattr(settings, "ARECIBO_USES_CELERY", False): from django_arecibo.tasks import post else: from django_arecibo.wrapper import post post(record.request, 500)
def emit(self, record): arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '') if arecibo and hasattr(record, 'request'): if getattr(settings, 'ARECIBO_USES_CELERY', False): from django_arecibo.tasks import post else: from django_arecibo.wrapper import post post(record.request, 500)
def handler500(request): webapp = settings.APP_PREVIEW template = 'amo/500%s.html' % ('_apps' if webapp else '') arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '') if arecibo: post(request, 500) if request.path_info.startswith('/api/'): return api.views.handler500(request) else: return jingo.render(request, template, {'webapp': webapp}, status=500)
def emit(self, record): from django.conf import settings arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '') if arecibo and hasattr(record, 'request'): if getattr(settings, 'ARECIBO_USES_CELERY', False): from django_arecibo.tasks import post else: from django_arecibo.wrapper import post post(record.request, 500)
def custom_500(request): """Custom 500 error handler.""" t = loader.get_template('500.html') uid = post(request, 500) return http.HttpResponseServerError( t.render(Context({'MEDIA_URL': settings.MEDIA_URL, 'request': request, 'user': request.user, 'uid': uid})))
def handler500(request): arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '') if arecibo: post(request, 500) return jingo.render(request, 'amo/500.lhtml', status=500)
def emit(self, record): arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '') if arecibo and hasattr(record, 'request'): post(record.request, 500)
def handler500(request): arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '') if arecibo: post(request, 500) return jingo.render(request, 'amo/500.html', status=500)