Skip to main content

A Django template filter for displaying longitude and latitude in degrees-minutes-seconds notation

Project description

Description

django-dms is a Django template filter for displaying decimal degrees of angles (longitude and latitude) in the Degrees-Minutes-Seconds notation.

It contains the filters longitude and latitude. They both take a number as input and convert it into a DMS value. The filter longitude accepts any number between -180 and 180, the filter latitude accepts any number between -90 and 90. If the input value is not a number or is a number outside the before mentioned ranges respectively, then the input is displayed without any change and the filters don’t have any effect.

Install

You can install django-dms with pip:

pip install django-dms

Use

To use the filters you have to include the app in the settings.py of your Django project:

INSTALLED_APPS = (
    # other entries
    'django_dms',
)

In your templates you can use the template filters like this:

{% load dms %}
{{ 38.8897|latitude }}

The output will be:

38° 53' 23" N

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-dms-0.1.1b0.tar.gz (17.0 kB view details)

Uploaded Source

File details

Details for the file django-dms-0.1.1b0.tar.gz.

File metadata

  • Download URL: django-dms-0.1.1b0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-dms-0.1.1b0.tar.gz
Algorithm Hash digest
SHA256 38ec22d6e62f934e613e1ce991f70d23baa60bb9670d8d4da8f5e4a64d1a7a81
MD5 8ffd7d0a78c19390f3ff25231895e9bb
BLAKE2b-256 4c7e7a31bccc54f1c3f3ad60ffb1baca476ed1872f4e0665c30b36e9703a8cbd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page