Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added `postgis://` url scheme

  • Loading branch information...
commit 5030d257b5d7ec0f86a2b6b2eedf929cdef83791 1 parent 47ade69
@fcurella fcurella authored
Showing with 5 additions and 2 deletions.
  1. +1 −1  README.rst
  2. +3 −0  dj_database_url.py
  3. +1 −1  setup.py
View
2  README.rst
@@ -20,7 +20,7 @@ Parse an arbitrary Database URL::
Supported databases
-------------------
-Support currently exists for PostgreSQL, MySQL and SQLite.
+Support currently exists for PostgreSQL, PostGIS, MySQL and SQLite.
SQLite connects to file based databases. The same URL format is used, omitting
the hostname, and using the "file" portion as the filename of the database.
View
3  dj_database_url.py
@@ -42,6 +42,9 @@ def parse(url):
if url.scheme == 'postgres':
config['ENGINE'] = 'django.db.backends.postgresql_psycopg2'
+ if url.scheme == 'postgis':
+ config['ENGINE'] = 'django.contrib.gis.db.backends.postgis'
+
if url.scheme == 'mysql':
config['ENGINE'] = 'django.db.backends.mysql'
View
2  setup.py
@@ -23,7 +23,7 @@
setup(
name='dj-database-url',
- version='0.2.0',
+ version='0.2.1',
url='https://github.com/kennethreitz/dj-database-url',
license='BSD',
author='Kenneth Reitz',
Please sign in to comment.
Something went wrong with that request. Please try again.