Skip to content

ofersto/django-http-cat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django http.cat

Django Http.Cat is a tiny library that lets you easily return pictures from http.cat in case of error (404, 500, etc)

Installation

Just use pip

pip install django-http-cat

Configuration

Simply add the middleware your django MIDDLEWARE_CLASSES setting.

MIDDLEWARE_CLASSES = [
    ...
    'httpcat.middleware.HttpCatErrorHandler'
]

You don't need to include it in your INSTALLED_APPS.

You can specify which status codes it should ignore by setting HTTP_OK_CODES to a list of integers with the codes to ignore (default if 200 and 304).

About

Fetch pictures from http.cat as error pages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages