Skip to main content

Wagtail Makeup

Project description

Wagtail Makeup

tests codecov

Tired of having no images locally when you need them? Don't want to fill your computer up with images? Use Wagtail Makeup ;)

Installation

Wagtail makeup depends on python unsplash:

pip install python-unsplash wagtailmakeup

Configuration

Sign up for an Unsplash api key and add this to your settings:

# settings.py
WAGTAIL_UNSPLASH = {
    "CLIENT_ID": "",
    "CLIENT_SECRET": ""
}

The API is rate limited to 50 request/hour... you can apply for a higher rate limit.

Using

You probably don't want this in your production settings, so add the following to you local.py settings:

INSTALLED_APPS.append('wagtailmakeup')

Wagtail Makeup works by providing a new management command:

python manage.py make_up [search query] [amount of images]

So you want to replace all your broken images on your site with dogs (who wouldn't) you can do it like this:

python manage.py make_up dogs 10

Note: the amount value is the number of images to download, the higher this is, the more variance you will get 😎

Contributing

Contributions are welcome, please see our contributing guide for more details.

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

wagtailmakeup-1.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

wagtailmakeup-1.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file wagtailmakeup-1.1.0.tar.gz.

File metadata

  • Download URL: wagtailmakeup-1.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for wagtailmakeup-1.1.0.tar.gz
Algorithm Hash digest
SHA256 24e6c374c3021676520dd1eac1e85d2354b77454192ada102cd1a9f6635370cc
MD5 ca153aeb765271d66e095c500fbfdfc9
BLAKE2b-256 2c368c9cb7b6e91777c178914924b26c3299cfc7d18c724b5a2e361175ad6674

See more details on using hashes here.

File details

Details for the file wagtailmakeup-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtailmakeup-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e4eed51a83d51d6a79aedbe2fa1ccfc5546ca24dde67ed4010b36f6e90d5a95
MD5 0b55973691016798894c4e65ce633ac7
BLAKE2b-256 d7342602b981f442a0c722cb05564aa4d93b3efab76c07c626dc8cc25fe16030

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