Re: [Django] #34712: Prevent misconfiguration of `STORAGES` setting

1 view
Skip to first unread message

Django

unread,
Jul 16, 2023, 11:52:56 PM7/16/23
to django-...@googlegroups.com
#34712: Prevent misconfiguration of `STORAGES` setting
--------------------------------------+------------------------------------
Reporter: Bruno Alla | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.staticfiles | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* component: Documentation => contrib.staticfiles
* stage: Unreviewed => Accepted


Comment:

Documentation improvements are welcome.

> Another thing that could be maybe be added is a deployment check, to
make sure that both `default` and `staticfiles` storages are present in
the setting.

I agree that we could add a check for a `staticfiles` storage, e.g.
- `staticfiles.E005`: `You must define a 'staticfiles' storage in your
:setting:``STORAGES`` setting.` in the
`django.contrib.staticfiles.checks`.

However, as far as I'm aware, you don't have to use the `default` storage
so a new system check might be an issue for some projects.

--
Ticket URL: <https://code.djangoproject.com/ticket/34712#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 17, 2023, 6:16:48 AM7/17/23
to django-...@googlegroups.com
#34712: Prevent misconfiguration of `STORAGES` setting
-------------------------------------+-------------------------------------
Reporter: Bruno Alla | Owner: Bruno
Type: | Alla
Cleanup/optimization | Status: assigned

Component: contrib.staticfiles | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Bruno Alla):

* owner: nobody => Bruno Alla
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/34712#comment:3>

Django

unread,
Jul 17, 2023, 7:42:24 AM7/17/23
to django-...@googlegroups.com
#34712: Prevent misconfiguration of `STORAGES` setting
-------------------------------------+-------------------------------------
Reporter: Bruno Alla | Owner: Bruno
Type: | Alla
Cleanup/optimization | Status: assigned
Component: contrib.staticfiles | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Bruno Alla):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/34712#comment:4>

Django

unread,
Jul 19, 2023, 5:40:22 AM7/19/23
to django-...@googlegroups.com
#34712: Prevent misconfiguration of `STORAGES` setting
-------------------------------------+-------------------------------------
Reporter: Bruno Alla | Owner: Bruno
Type: | Alla
Cleanup/optimization | Status: assigned
Component: contrib.staticfiles | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/34712#comment:5>

Django

unread,
Jul 24, 2023, 3:07:35 PM7/24/23
to django-...@googlegroups.com
#34712: Prevent misconfiguration of `STORAGES` setting
-------------------------------------+-------------------------------------
Reporter: Bruno Alla | Owner: Bruno
Type: | Alla
Cleanup/optimization | Status: assigned
Component: contrib.staticfiles | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"86561844ce66cda3e6a8c22d4ace4c2d1bc1f2e7" 86561844]:
{{{
#!CommitTicketReference repository=""
revision="86561844ce66cda3e6a8c22d4ace4c2d1bc1f2e7"
Refs #34712 -- Doc'd that defining STORAGES overrides the default
configuration.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34712#comment:6>

Django

unread,
Jul 24, 2023, 3:08:03 PM7/24/23
to django-...@googlegroups.com
#34712: Prevent misconfiguration of `STORAGES` setting
-------------------------------------+-------------------------------------
Reporter: Bruno Alla | Owner: Bruno
Type: | Alla
Cleanup/optimization | Status: assigned
Component: contrib.staticfiles | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"12ebd9a1ac8b1de34a2d4615fa830d132f6e56b9" 12ebd9a1]:
{{{
#!CommitTicketReference repository=""
revision="12ebd9a1ac8b1de34a2d4615fa830d132f6e56b9"
[4.2.x] Refs #34712 -- Doc'd that defining STORAGES overrides the default
configuration.

Backport of 86561844ce66cda3e6a8c22d4ace4c2d1bc1f2e7 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34712#comment:7>

Django

unread,
Aug 31, 2023, 2:58:46 AM8/31/23
to django-...@googlegroups.com
#34712: Prevent misconfiguration of `STORAGES` setting
-------------------------------------+-------------------------------------
Reporter: Bruno Alla | Owner: Bruno
Type: | Alla
Cleanup/optimization | Status: assigned
Component: contrib.staticfiles | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"4c4536f7442a3ed1218f5b1dc791295d65c24f4c" 4c4536f7]:
{{{
#!CommitTicketReference repository=""
revision="4c4536f7442a3ed1218f5b1dc791295d65c24f4c"
Refs #34712 -- Added system check for staticfiles storage in STORAGES
setting.

Co-authored-by: Mariusz Felisiak <felisiak...@gmail.com>
Co-authored-by: Natalia Bidart <124304+...@users.noreply.github.com>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34712#comment:8>

Django

unread,
Aug 31, 2023, 2:59:07 AM8/31/23
to django-...@googlegroups.com
#34712: Prevent misconfiguration of `STORAGES` setting
-------------------------------------+-------------------------------------
Reporter: Bruno Alla | Owner: Bruno
Type: | Alla
Cleanup/optimization | Status: closed
Component: contrib.staticfiles | Version: 4.2
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/34712#comment:9>

Reply all
Reply to author
Forward
0 new messages