Skip to main content

Wagtail Makeup

Project description

Wagtail Makeup

tests codecov Total alerts Language grade: Python

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

Installation

Wagail 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.

:cool:

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-0.0.3.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

wagtailmakeup-0.0.3-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wagtailmakeup-0.0.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for wagtailmakeup-0.0.3.tar.gz
Algorithm Hash digest
SHA256 110c986133aeb16bfe35464d8e7dfd3e48f6db62e4d979cc41996542421d763a
MD5 46c2bcf240d3d78c6f040ebe501f43b0
BLAKE2b-256 f8e4c2e9a454253006bd7ca3f5ef4f6fd263af44242ae6661df7c05b3524eb60

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for wagtailmakeup-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 73d78bdb276c1f7a6367553eb3c7f60fc19b286ace316ee0732ff090870e5925
MD5 a3670182050799afd1cb7d959054f6df
BLAKE2b-256 afc222413107446f04b9259f96249361e86d15cd2c09d806ca2998dde252507f

See more details on using hashes here.

Provenance

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