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
Managing the carousel
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.
Showing the carousel
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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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
Release files / lfs_carousel-2.0.0.tar.gz
| Download URL | lfs_carousel-2.0.0.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c594389b5cd972c6d73df171cae409714e92515f82f78ae8463431459dcfbfe1
|
|
BLAKE2b-256 checksum How to use checksums |
cc58f1ba27c3169c574f3bac72c0e74179d4eae11397bc061a7f529720ca4242
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Release files / lfs_carousel-2.0.0-py3-none-any.whl
| Download URL | lfs_carousel-2.0.0-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c2406bf6224573573ed17ad432e98f8f6e7ef586456f0381b29fefa68c3d805
|
|
BLAKE2b-256 checksum How to use checksums |
4db3764db6137b6cb2c6b9e10859232c44e1140a08391876faa13adbb0a75ab9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
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.