コード例 #1
0
ファイル: views.py プロジェクト: LucianU/zamboni
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)
コード例 #2
0
ファイル: views.py プロジェクト: LucianU/zamboni
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)
コード例 #3
0
ファイル: admin_log.py プロジェクト: beenishkhan/zamboni
    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())
コード例 #4
0
ファイル: log.py プロジェクト: alfredo/funfactory
    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)
コード例 #5
0
ファイル: views.py プロジェクト: bensternthal/remo
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})))
コード例 #6
0
ファイル: log.py プロジェクト: kyoshino/funfactory
    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)
コード例 #7
0
    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)
コード例 #8
0
ファイル: views.py プロジェクト: writefaruq/zamboni
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)
コード例 #9
0
ファイル: log.py プロジェクト: church29/cyder
    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)
コード例 #10
0
ファイル: views.py プロジェクト: bensternthal/remo
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})))
コード例 #11
0
ファイル: views.py プロジェクト: MechanisM/zamboni
def handler500(request):
    arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '')
    if arecibo:
        post(request, 500)
    return jingo.render(request, 'amo/500.lhtml', status=500)
コード例 #12
0
ファイル: log.py プロジェクト: andymckay/django-arecibo
    def emit(self, record):
        arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '')

        if arecibo and hasattr(record, 'request'):
            post(record.request, 500)
コード例 #13
0
def handler500(request):
    arecibo = getattr(settings, 'ARECIBO_SERVER_URL', '')
    if arecibo:
        post(request, 500)
    return jingo.render(request, 'amo/500.html', status=500)