{{{
# No-op if not in debug mode or an non-local prefix
if not settings.DEBUG or (prefix and '://' in prefix):
return []
}}}
in `django.conf.urls.static.static` will not match and does not turn off
the static server as it should.
I guess `://` should at least be changed to `//`.
--
Ticket URL: <https://code.djangoproject.com/ticket/24336>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 1
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24336#comment:1>
Comment (by phalt):
I experimented on a local branch of Django and changed the `://` to `//`
and didn't see any immediate problems. However this'll definitely need
tests to verify.
--
Ticket URL: <https://code.djangoproject.com/ticket/24336#comment:2>
Comment (by aaugustin):
It would be safer to skip URLs starting with:
- `http://`
- `https://`
- `//`
The most robust solution may be to parse the URL and skip it if the host
part isn't empty.
--
Ticket URL: <https://code.djangoproject.com/ticket/24336#comment:3>
* type: Bug => Cleanup/optimization
* needs_tests: 1 => 0
* easy: 1 => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24336#comment:4>
* status: new => assigned
* owner: nobody => farrepa
--
Ticket URL: <https://code.djangoproject.com/ticket/24336#comment:5>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/10219 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/24336#comment:6>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/24336#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"2a74ceb5f371c1083bfc9b95e093543ba09eb20f" 2a74ceb5]:
{{{
#!CommitTicketReference repository=""
revision="2a74ceb5f371c1083bfc9b95e093543ba09eb20f"
Fixed #24336 -- Made django.conf.urls.static() ignore all absolute URLs
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24336#comment:8>