diff --git a/CHANGELOG.md b/CHANGELOG.md index d9b0638..628f8ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +- Nothing (yet)! + +## [3.0.0] - 2025-01-10 + ### Changed - Drop Django 3.2 and 4.1 support. @@ -88,7 +94,8 @@ Using the following categories, list your changes in this order: - Forked from [`whitenoise`](https://github.com/evansd/whitenoise) to add ASGI support. -[Unreleased]: https://github.com/Archmonger/ServeStatic/compare/2.1.1...HEAD +[Unreleased]: https://github.com/Archmonger/ServeStatic/compare/3.0.0...HEAD +[3.0.0]: https://github.com/Archmonger/ServeStatic/compare/2.1.1...3.0.0 [2.1.1]: https://github.com/Archmonger/ServeStatic/compare/2.1.0...2.1.1 [2.1.0]: https://github.com/Archmonger/ServeStatic/compare/2.0.1...2.1.0 [2.0.1]: https://github.com/Archmonger/ServeStatic/compare/2.0.0...2.0.1 diff --git a/docs/src/django.md b/docs/src/django.md index 2dc4a3e..678d7fb 100644 --- a/docs/src/django.md +++ b/docs/src/django.md @@ -6,7 +6,11 @@ We mention Heroku in a few places, but there's nothing Heroku-specific about Ser ## Step 1: Enable ServeStatic -Edit your `settings.py` file and add ServeStatic to the `MIDDLEWARE` list. The ServeStatic middleware should be placed directly after the Django [SecurityMiddleware](https://docs.djangoproject.com/en/stable/ref/middleware/#module-django.middleware.security) (if you are using it) and before all other middleware: +Edit your `settings.py` file and add ServeStatic to the `MIDDLEWARE` list. + +!!! warning "Middleware order is important!" + + The ServeStatic middleware should be placed directly after the Django [SecurityMiddleware](https://docs.djangoproject.com/en/stable/ref/middleware/#module-django.middleware.security) (if you are using it) and before all other middleware. ```python linenums="0" MIDDLEWARE = [ @@ -16,7 +20,7 @@ MIDDLEWARE = [ ] ``` -That's it -- ServeStatic will now serve your static files. However, to get the best performance you should proceed to step 3 below and enable compression and caching. +That's it! ServeStatic is now configured to serve your static files. For optimal performance, proceed to the next step to enable compression and caching. ??? question "How should I order my middleware?" @@ -145,7 +149,6 @@ You can disable Django's static file handling and allow ServeStatic to take over ```python linenums="0" INSTALLED_APPS = [ - # ... "servestatic.runserver_nostatic", "django.contrib.staticfiles", # ... diff --git a/pyproject.toml b/pyproject.toml index 1c309f7..3e4d226 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ description = "Production-grade static file server for Python web apps." readme = "README.md" keywords = ["asgi", "django", "http", "server", "static", "staticfiles", "wsgi"] license = "MIT" -authors = [{ name = "Mark Bakhit" }] +authors = [{ name = "Mark Bakhit", email = "archiethemonger@gmail.com" }] requires-python = ">=3.9" classifiers = [ "Development Status :: 5 - Production/Stable", @@ -124,7 +124,6 @@ update = ["pre-commit autoupdate"] [tool.ruff] line-length = 120 extend-exclude = [".eggs/*", ".nox/*", ".venv/*", "build/*"] - format.preview = true lint.extend-ignore = [ "ARG001", # Unused function argument diff --git a/src/servestatic/__init__.py b/src/servestatic/__init__.py index 70d2f11..2b5da15 100644 --- a/src/servestatic/__init__.py +++ b/src/servestatic/__init__.py @@ -3,6 +3,6 @@ from servestatic.asgi import ServeStaticASGI from servestatic.wsgi import ServeStatic -__version__ = "2.1.1" +__version__ = "3.0.0" __all__ = ["ServeStatic", "ServeStaticASGI"]