Skip to main content

lfs-carousel

An image carousel for LFS shops: managers upload images with a title, text and link in the management interface, and the shop shows them on its start page.

Requirements

django-lfs 1.0 or newer (Django 5.2, Python 3.12+).

Installation

pip install lfs-carousel

Add the app and its URLs, then create its table:

# settings.py
INSTALLED_APPS = [
    # ...
    "lfs_carousel",
]
# urls.py
from lfs_carousel.views import carousel

urlpatterns += [path("carousel/", include(carousel.urls))]
python manage.py migrate

With the app installed, the management interface shows a Carousel tab under Shop. There managers upload images (several at once), set each item's title, text, link and position, and delete items. Only users with the core.manage_shop permission can change the carousel; others are sent to the login page.

lfs-theme shows the carousel on the start page as a slider when the app is installed; nothing else to do.

In your own theme, add the tag where the carousel belongs, usually in lfs/shop/shop.html:

{% load lfs_carousel_tags %}
{% carousel_show shop %}

It renders lfs_carousel/carousel.html with items (the carousel items in order of their position). The add-on's template shows them as a plain list of images with title, text and link; override the template in your theme to turn them into a slider. Without items it renders nothing.

{% carousel_image_url request shop %} returns the absolute URL of the first image, for example for an og:image.

Development

pip install -e . pytest pytest-django
pytest

License

BSD 3-Clause, see LICENSE.txt.

History

  • 2.0.0: for django-lfs 1.0 (Django 5.2): management tab in the new management interface, a default template for carousel_show, visitors without permission are sent to the login page, tests. Removes the coin-slider files and the unused, unprotected move-item and manage-items URLs.
  • 1.1: Django 1.6 compatibility.

Metadata

Release files for lfs-carousel 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lfs-carousel 2.0.0
File Size Uploaded Provenance Actions
lfs_carousel-2.0.0.tar.gz 15.7 kB Without provenance Details for lfs_carousel-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lfs-carousel 2.0.0
File Interpreter ABI Platform Actions
lfs_carousel-2.0.0-py3-none-any.whl Python 3 none any Details for lfs_carousel-2.0.0-py3-none-any.whl

Total release size: 35.7 kB

Security for lfs-carousel 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page