Skip to content

Search for Unsplash images and upload to Wagtail

License

Notifications You must be signed in to change notification settings

mintyPT/wagtail-unsplashed

 
 

Repository files navigation

Release Build status codecov Commit activity License

Screenshot showing wagtail-unsplash search results

Search for Unsplash images and upload to the Wagtail image library.

This package uses the python-unsplash API wrapper

Getting started

Install using pip:

pip install wagtail-unsplashed

After installing the package, add wagtail_unsplashed to installed apps in your settings file:

# settings.py

INSTALLED_APPS = [
    ...
    'wagtail_unsplashed',
    ...
]

and add the API credentials:

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

You can get the needed information by creating an application at https://unsplash.com/developers

Getting started (development)

Pull the repo

git clone [email protected]:mintyPT/wagtail-unsplash.git

Set Up Your Development Environment

Then, install the environment and the pre-commit hooks with

make install

This will also generate your uv.lock file

Run the pre-commit hooks

Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run:

uv run pre-commit run -a

After pushing

You are now ready to start development on your project! The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.

To finalize the set-up for publishing to PyPI, see here. For activating the automatic documentation with MkDocs, see here. To enable the code coverage reports, see here.

Releasing a new version

  • Create an API Token on PyPI.
  • Add the API Token to your projects secrets with the name PYPI_TOKEN by visiting this page.
  • Create a new release on Github.
  • Create a new tag in the form *.*.*.

For more details, see here.


Repository initiated with fpgmaas/cookiecutter-uv.

About

Search for Unsplash images and upload to Wagtail

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 63.5%
  • Makefile 16.5%
  • HTML 15.9%
  • Dockerfile 4.1%