Skip to main content

Django Storage Engine which returns images of kittens if files could not be found.

Project description

kittenstorage is a so called development storage engine.

Many people have the problem with gigantomanic production databases with gigabytes of pictures/files. It is a pain to keep the image files synchronised between development and production environments.

Therefore I have written this storage engine. In case a file is not found, an image from placekitten.com will be used/displayed instead.

Setup

It’s on pypi.

pip install django-kittenstorage

Feel free to clone from github too. Forking is welcome as well :-)

In your django settings file:

DEFAULT_FILE_STORAGE = 'kittenstorage.storages.GreyKitten'

Storage Engines

kittenstorage offers two engines:

  1. kittenstorage.storages.GreyKitten

  2. kittenstorage.storages.ColorKitten

Choose depending on the saturation you want. I prefer GreyKitten since it does have a pretty classy look.

Settings

There is only one setting:

KITTEN_SIZE

Default: (1024, 1024)

A tuple of format (width, height), specifiying the size of the image requested from placekitten.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-kittenstorage-1.0.0.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file django-kittenstorage-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django-kittenstorage-1.0.0.tar.gz
Algorithm Hash digest
SHA256 48d3b50b365869e1c6bedea343154fd638fddddc7621489ba21551ece0f7d191
MD5 5b463c7c376affe8fd3c0302c357253b
BLAKE2b-256 298da0acc68277e7e14c37706b9db135ddd60fda8fe2bcc8e48577bcd742fdda

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page