How to install Django

This document will get you up and running with Django. Install Python Being a Python Web framework, Django requires Python. See What Python version can I use with Django? for details. Get the latest version of Python at https://www.python.org/download/ or with your operating system’s package manager. Django on Jython If you use Jython (a Python implementation for the Java platform), you’ll need to follow a few additional steps. See Running Django on Jython for details. Python on Windows If y

How to deploy with WSGI

Django’s primary deployment platform is WSGI, the Python standard for web servers and applications. Django’s startproject management command sets up a simple default WSGI configuration for you, which you can tweak as needed for your project, and direct any WSGI-compliant application server to use. Django includes getting-started documentation for the following WSGI servers: How to use Django with Apache and mod_wsgi Authenticating against Django’s user database from Apache How to use Django wi

Handling HTTP requests

Information on handling HTTP requests in Django: URL dispatcher Writing views View decorators File Uploads Django shortcut functions Generic views Middleware How to use sessions

gis.widgets.OSMWidget

class OSMWidget This widget uses an OpenStreetMap base layer (Mapnik) to display geographic objects on. template_name is gis/openlayers-osm.html. The OpenLayersWidget note about JavaScript file hosting above also applies here. See also this FAQ answer about https access to map tiles.

gis.widgets.OpenLayersWidget

class OpenLayersWidget This is the default widget used by all GeoDjango form fields. template_name is gis/openlayers.html. OpenLayersWidget and 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 openlayer

gis.widgets.BaseGeometryWidget.template_name

BaseGeometryWidget.template_name The template used to render the map widget. You can pass widget attributes in the same manner that for any other Django widget. For example: from django.contrib.gis import forms class MyGeoForm(forms.Form): point = forms.PointField(widget= forms.OSMWidget(attrs={'map_width': 800, 'map_height': 500}))

gis.widgets.BaseGeometryWidget.supports_3d

BaseGeometryWidget.supports_3d Indicates if the widget supports edition of 3D data (default is False).

gis.widgets.BaseGeometryWidget.map_width

BaseGeometryWidget.map_width Height and width of the widget map (default is 400x600).

gis.widgets.BaseGeometryWidget.map_srid

BaseGeometryWidget.map_srid SRID code used by the map (default is 4326).

gis.widgets.BaseGeometryWidget.map_height

BaseGeometryWidget.map_height