Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
b1d6b0a7
Kaydet (Commit)
b1d6b0a7
authored
Agu 10, 2016
tarafından
Daniel Hahler
Kaydeden (comit)
Tim Graham
Eyl 03, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #26098 -- Used cdnjs.cloudflare for OpenLayers.js.
üst
dbccf163
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
15 deletions
+23
-15
options.py
django/contrib/gis/admin/options.py
+1
-1
widgets.py
django/contrib/gis/forms/widgets.py
+2
-2
admin.txt
docs/ref/contrib/gis/admin.txt
+5
-1
forms-api.txt
docs/ref/contrib/gis/forms-api.txt
+10
-10
1.11.txt
docs/releases/1.11.txt
+4
-0
tests.html
js_tests/tests.html
+1
-1
No files found.
django/contrib/gis/admin/options.py
Dosyayı görüntüle @
b1d6b0a7
...
...
@@ -34,7 +34,7 @@ class GeoModelAdmin(ModelAdmin):
map_height
=
400
map_srid
=
4326
map_template
=
'gis/admin/openlayers.html'
openlayers_url
=
'http
://openlayers.org/api
/2.13.1/OpenLayers.js'
openlayers_url
=
'http
s://cdnjs.cloudflare.com/ajax/libs/openlayers
/2.13.1/OpenLayers.js'
point_zoom
=
num_zoom
-
6
wms_url
=
'http://vmap0.tiles.osgeo.org/wms/vmap0'
wms_layer
=
'basic'
...
...
django/contrib/gis/forms/widgets.py
Dosyayı görüntüle @
b1d6b0a7
...
...
@@ -79,7 +79,7 @@ class OpenLayersWidget(BaseGeometryWidget):
class
Media
:
js
=
(
'http
://openlayers.org/api
/2.13.1/OpenLayers.js'
,
'http
s://cdnjs.cloudflare.com/ajax/libs/openlayers
/2.13.1/OpenLayers.js'
,
'gis/js/OLMapWidget.js'
,
)
...
...
@@ -95,7 +95,7 @@ class OSMWidget(BaseGeometryWidget):
class
Media
:
js
=
(
'http
://openlayers.org/api
/2.13.1/OpenLayers.js'
,
'http
s://cdnjs.cloudflare.com/ajax/libs/openlayers
/2.13.1/OpenLayers.js'
,
'gis/js/OLMapWidget.js'
,
)
...
...
docs/ref/contrib/gis/admin.txt
Dosyayı görüntüle @
b1d6b0a7
...
...
@@ -42,8 +42,12 @@ GeoDjango's admin site
.. attribute:: openlayers_url
Link to the URL of the OpenLayers JavaScript. Defaults to
``'http
://openlayers.org/api
/2.13.1/OpenLayers.js'``.
``'http
s://cdnjs.cloudflare.com/ajax/libs/openlayers
/2.13.1/OpenLayers.js'``.
.. versionchanged:: 1.11
Older versions default to
``'http://openlayers.org/api/2.13.1/OpenLayers.js'``.
.. attribute:: modifiable
...
...
docs/ref/contrib/gis/forms-api.txt
Dosyayı görüntüle @
b1d6b0a7
...
...
@@ -153,16 +153,16 @@ Widget classes
``template_name`` is ``gis/openlayers.html``.
``OpenLayersWidget`` and :class:`OSMWidget` use the ``openlayers.js`` file
hosted on the ``
openlayers.org`` website. This works for basic usage
during development, but isn't appropriate for a production deployment as
``
openlayers.org/api/`` has no guaranteed uptime and runs on a slow server.
You are therefore advised to subclass these widgets in order to specify
your own version of the ``openlayers.js`` file in the ``js`` property of
the inner ``Media`` class (see :ref:`assets-as-a-static-definition`). You
can host a copy of ``openlayers.js``
`tailored to your needs`_ on your own server or refer to a copy from a
content-delivery network like https://cdnjs.com/. This will also allow
you to serve the JavaScript file(s) using the ``https`` protocol if needed
.
hosted on the ``
cdnjs.cloudflare.com`` content-delivery network. You can
subclass these widgets in order to specify your own version of the
``
OpenLayers.js`` file `tailored to your needs`_ in the ``js`` property of
the inner ``Media`` class (see :ref:`assets-as-a-static-definition`).
.. versionchanged:: 1.11
Older versions use ``OpenLayers.js`` from ``openlayers.org`` which
isn't suitable for production use since it offers no guaranteed uptime
and runs on a slow server
.
.. _tailored to your needs: http://docs.openlayers.org/library/deploying.html
...
...
docs/releases/1.11.txt
Dosyayı görüntüle @
b1d6b0a7
...
...
@@ -116,6 +116,10 @@ Minor features
* Added support for the :lookup:`dwithin` lookup on SpatiaLite.
* The OpenLayers-based form widgets now use ``OpenLayers.js`` from
``https://cdnjs.cloudflare.com`` which is more suitable for production use
than the the old ``http://openlayers.org`` source.
:mod:`django.contrib.messages`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
js_tests/tests.html
Dosyayı görüntüle @
b1d6b0a7
...
...
@@ -83,7 +83,7 @@
class=
"vSerializedField required"
style=
"display:none;"
rows=
"10"
cols=
"150"
>
POINT (7.8177 47.397)
</textarea>
</div>
<script
src=
'http
://openlayers.org/api
/2.13.1/OpenLayers.js'
></script>
<script
src=
'http
s://cdnjs.cloudflare.com/ajax/libs/openlayers
/2.13.1/OpenLayers.js'
></script>
<script
src=
'../django/contrib/gis/static/gis/js/OLMapWidget.js'
data-cover
></script>
<script
src=
'./gis/mapwidget.test.js'
></script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment