Skip to content

Commit

Permalink
docs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Sep 21, 2024
1 parent 17d49f9 commit 767dbf9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ Using the following categories, list your changes in this order:

### Fixed

- Fix crash when running `manage.py collectstatic` if Django's `settings.py:STATIC_ROOT` is a `Path` object.
- Fix crash when running `manage.py collectstatic` when Django's `settings.py:STATIC_ROOT` is a `Path` object.

## [2.0.0](https://github.com/Archmonger/ServeStatic/compare/1.2.0...2.0.0) - 2024-09-12

### Added

- Django `settings.py:SERVESTATIC_USE_MANIFEST` utilize the Django manifest rather than scanning the filesystem.
- Django `settings.py:SERVESTATIC_USE_MANIFEST` will allow ServeStatic to use the Django manifest rather than scanning the filesystem.
- When also using ServeStatic's `CompressedManifestStaticFilesStorage` backend, ServeStatic will no longer need to call `os.stat`.

### Changed
Expand Down
4 changes: 2 additions & 2 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ watch:
- ../LICENSE.md

site_name: ServeStatic
site_author: Archmonger
site_author: Mark Bakhit (Archmonger)
site_description: Production-grade static file server for Python web apps.
copyright: '&copy;<div id="year"></div> <script>document.getElementById("year").innerHTML = new Date().getFullYear();</script> Archmonger'
copyright: '&copy;<div id="year"></div> <script>document.getElementById("year").innerHTML = new Date().getFullYear();</script> Mark Bakhit (Archmonger)'
repo_url: https://github.com/Archmonger/ServeStatic
site_url: https://archmonger.github.io/ServeStatic/
repo_name: ServeStatic (GitHub)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/django-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Find and serve files using Django's manifest file.

This is the most efficient way to determine what files are available, but it requires that you are using a [manifest-compatible](https://docs.djangoproject.com/en/stable/ref/contrib/staticfiles/#manifeststaticfilesstorage) storage backend.

When using ServeStatic's [`CompressedManifestStaticFilesStorage`](./django.md#step-2-add-compression-and-caching-support) storage backend, ServeStatic will no longer need to call `os.stat` on each file during startup which improves startup speeds.
When using ServeStatic's [`CompressedManifestStaticFilesStorage`](./django.md#step-2-add-compression-and-caching-support) storage backend, ServeStatic will no longer need to call `os.stat` on each file during startup.

---

Expand Down
9 changes: 4 additions & 5 deletions docs/src/django.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ Edit your `settings.py` file and add ServeStatic to the `MIDDLEWARE` list. The S

```python linenums="0"
MIDDLEWARE = [
...,
"django.middleware.security.SecurityMiddleware",
"servestatic.middleware.ServeStaticMiddleware",
...,
# ...
]
```

Expand All @@ -29,7 +28,7 @@ ServeStatic comes with a storage backend which compresses your files and hashes

```python linenums="0"
STORAGES = {
...,
# ...
"staticfiles": {
"BACKEND": "servestatic.storage.CompressedManifestStaticFilesStorage",
},
Expand Down Expand Up @@ -146,9 +145,9 @@ 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",
...,
# ...
]
```
1 change: 0 additions & 1 deletion docs/src/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Edit your `settings.py` file and add `ServeStatic` to the `MIDDLEWARE` list, abo

```python linenums="0"
MIDDLEWARE = [
# ...
"django.middleware.security.SecurityMiddleware",
"servestatic.middleware.ServeStaticMiddleware",
# ...
Expand Down

0 comments on commit 767dbf9

Please sign in to comment.