﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36562	`StaticFilesHandler` should respect `StaticFilesStorage.base_url` and treat `STATIC_URL` as a fallback	Kamil Paduszyński		"As follows from the official [https://docs.djangoproject.com/en/5.2/ref/files/storage/#django.core.files.storage.FileSystemStorage.base_url docs] one can specify `base_url` in storage's `""OPTIONS""`. `StaticFilesStorage` subclasses from `FileSystemStorage`, so one could expect that when setting:

{{{#!python
# Storages

STORAGES = {
    ""staticfiles"": {
        ""BACKEND"": ""django.contrib.staticfiles.storage.StaticFilesStorage"",
        ""OPTIONS"": {
            ""base_url"": ""static/"",
        },
    },
}
}}}

everything should work without touching `STATIC_URL`. However, we get:

{{{
django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the required STATIC_URL setting.
}}}

Would it be possible to change this behavior? IMHO, such change would make setting up storages (even in development) more centralized, thus cleaner.
Of course, this would not be a breaking change, since `STATIC_URL` could be still returned when `base_url` is not explicitly set.

I believe that this would require updating `get_base_url` method of the static files handler mixin:

https://github.com/django/django/blob/ad4a9e0f3b1de261409bc083aa49dba705531824/django/contrib/staticfiles/handlers.py#L29-L31
"	Bug	closed	contrib.staticfiles	5.2	Normal	wontfix			Unreviewed	0	0	0	0	0	0
