Skip to content

v1.3 — Python 3.12+ install fix, Bootstrap 5, SEO

Latest

Choose a tag to compare

@slyapustin slyapustin released this 25 Jul 16:36
4dc94de

Fixes installation on Python 3.12+

If you are on 1.2.1 with Python 3.12 or 3.13, the package does not start. django-bootstrap-form imports distutils at module load time, and distutils was removed from the stdlib in PEP 632 — so following the README produced ModuleNotFoundError: No module named 'distutils' before Django finished loading apps, making every route unreachable.

It only appeared to work where setuptools happened to be installed, since setuptools vendors a distutils shim. That is also why CI never caught it: the test workflow installed setuptools first. A new clean-install job now installs into python:3.13-slim and asserts setuptools is absent.

Bootstrap 5 and fewer dependencies

Bootstrap 3.3.7 (2016) → Bootstrap 5.3.8 across all bundled templates.

Removed entirely: jQuery, lightbox2, the Glyphicons font files, jumbotron-narrow.css, and bootstrap.min.css.map. The only remaining script is Bootstrap's own bundle, and typography uses system font stacks — so there are no external requests at all. Bundled static assets: ~1MB → 344KB.

Item images now open in a Bootstrap modal with a carousel, starting on the thumbnail you clicked.

SEO

  • <html lang> follows the active translation. With 10 translations shipped, every non-English page previously declared itself English.
  • Category pages are now in sitemap.xml. Only items were listed, so the natural landing pages for category searches were absent.
  • Category pages carry their own meta description instead of inheriting the site-wide one on every page.
  • Self-referencing canonical URLs, og:site_name, og:locale, twitter:card.
  • JSON-LD Product and BreadcrumbList on item pages, replacing the inline microdata.
  • noindex on search, profile and form pages.
  • Exactly one h1 per page.

Redesign

The bundled templates were redesigned around the app's own two-level catalogue: sections as labelled dividers, groups as ruled entries with counts, and prices in tabular monospace so they align down a listing column. Light and dark themes via data-bs-theme, prefers-reduced-motion respected, visible focus styles, print stylesheet.

Upgrading

If you use the templates as shipped, pip install -U django-classified is all you need.

  • Remove 'bootstrapform' from INSTALLED_APPS — it is no longer a dependency, so leaving it listed raises ModuleNotFoundError. The bootstrap template filter is now provided by this package and keeps its name.
  • Overridden templates are now Bootstrap 5 markup. The Bootstrap 3 classes are gone.
  • Removed static files: jQuery, lightbox2, Glyphicons fonts, jumbotron-narrow.css. Reference them from your own project if you still need them.

See the "Upgrading to 1.3" section in the README and changelog.txt for the full list.