It's going to require further re-factoring to apply the same to django GIS
This change will also require the addition of Selenium tests for the
Django
--
Ticket URL: <https://code.djangoproject.com/ticket/25706>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* keywords: => CSP inline javascript
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> Currently there's work to comply with Content-Security-Policy: default-
> src 'self' on the base admin.
>
> It's going to require further re-factoring to apply the same to django
> GIS
>
> This change will also require the addition of Selenium tests for the
> Django
New description:
Currently there's work (https://github.com/django/django/pull/5567) to
comply with Content-Security-Policy: default-src 'self' on the base admin.
It's going to require further re-factoring to apply the same to django GIS
This change will also require the addition of Selenium tests for the
Django
See also #15727
--
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:1>
Old description:
> Currently there's work (https://github.com/django/django/pull/5567) to
> comply with Content-Security-Policy: default-src 'self' on the base
> admin.
>
> It's going to require further re-factoring to apply the same to django
> GIS
>
> This change will also require the addition of Selenium tests for the
> Django
>
> See also #15727
New description:
Currently there's work (https://github.com/django/django/pull/5567) to
comply with Content-Security-Policy: default-src 'self' on the base admin.
It's going to require further re-factoring to apply the same to django GIS
This change will also require the addition of Selenium tests for the
Django GIS Admin
See also #15727
--
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:2>
Old description:
> Currently there's work (https://github.com/django/django/pull/5567) to
> comply with Content-Security-Policy: default-src 'self' on the base
> admin.
>
> It's going to require further re-factoring to apply the same to django
> GIS
>
> This change will also require the addition of Selenium tests for the
> Django GIS Admin
>
> See also #15727
New description:
Currently there's work (https://github.com/django/django/pull/5567) to
comply with Content-Security-Policy: default-src 'self' on the base admin.
It's going to require further re-factoring to apply the same to django GIS
This change will also require the addition of Selenium tests for the
Django Admin GIS UI
See also #15727
--
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:3>
* component: Uncategorized => GIS
* version: 1.8 => master
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:4>
Comment (by claudep):
This [https://github.com/django/django/pull/7205 PR] does the job for the
GIS forms/widgets. I may need help for JS correctness...
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:5>
Comment (by GitHub <noreply@…>):
In [changeset:"322a1a037d4d2f18744c5d1a1efc2e84d4c5e94b" 322a1a03]:
{{{
#!CommitTicketReference repository=""
revision="322a1a037d4d2f18744c5d1a1efc2e84d4c5e94b"
Refs #25706 - Removed inline JavaScript from OpenLayers template.
This allows setting a Content-Security-Policy HTTP header.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:6>
* owner: nobody => Claude Paroz
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:7>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"44c24bf02835323d5418512ebe8e76166739ebf8" 44c24bf]:
{{{
#!CommitTicketReference repository=""
revision="44c24bf02835323d5418512ebe8e76166739ebf8"
Refs #25706 -- Removed inline CSS in the openlayers widget template.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:8>
Comment (by Mariusz Felisiak):
Claude, Is there anything left for this ticket 🤔 ?
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:9>
Comment (by Claude Paroz):
Absolutely, the challenge here is to remove any JS code from
`contrib/gis/templates/gis/openlayers.html` (and `openlayers-osm.html`),
which is currently defining the base map layer and instanciating the
MapWidget (with that layer in initializer options).
Any suggestion on how to proceed without losing customization capabilities
is warmly welcome!
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:10>
Comment (by Matthieu Marrast):
I opened the same issue : https://code.djangoproject.com/ticket/35017
(sorry for the duplicate)
I'm interested by a solution.
What is the problem with PR https://github.com/django/django/pull/7205 ?
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:11>
Comment (by Claude Paroz):
Replying to [comment:11 Matthieu Marrast]:
> What is the problem with PR https://github.com/django/django/pull/7205 ?
I would say the main problem is to replace the `base_layer` block which
was not present at the time of that patch, and still allow base layer
customization. It would probably imply specifying a custom js file
somewhere, but someone has to come with a good plan to put pieces in place
for that, with an upgrade path.
--
Ticket URL: <https://code.djangoproject.com/ticket/25706#comment:12>