mirror of
https://github.com/jazzband/dj-database-url.git
synced 2026-03-16 22:20:24 +00:00
Added postgis:// url scheme
This commit is contained in:
parent
47ade69fbc
commit
5030d257b5
3 changed files with 5 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -23,7 +23,7 @@ from setuptools import setup
|
|||
|
||||
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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue