How to use the muffin.Response function in muffin

To help you get started, we’ve selected a few muffin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github klen / muffin / tests / test_muffin.py View on Github external
def handle_400(request):
        return muffin.Response(text='Custom 400', status=400)
github klen / muffin / tests / test_muffin.py View on Github external
def handle_404(request):
        return muffin.Response(text='Custom 404', status=404)
github klen / muffin / tests / test_muffin.py View on Github external
def handle_500(request):
        return muffin.Response(text='Custom 500')
github klen / muffin / example / views.py View on Github external
def handle404(request):
    """ Handle HTTP exceptions. """
    return muffin.Response(text='Custom 404 Page', status=404)