Project Open Street Map management
Project description
Project Open Street Map management
Documentation
The full documentation is at https://django-osm.readthedocs.io.
Quickstart
Install django-osm:
pip install django-osm
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
"django.contrib.gis",
"django_celery_beat",
"rest_framework",
"rest_framework_gis",
"osm",
...
)
DATABASE_ROUTERS = [
...
'osm.route_db.Default'
]
DATABASES = {
...
'osm': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'HOST': 'localhost',
'NAME': 'geodjango',
},
}
OSM_REPLICS = ['osm']
If there is OSM database replication, then add the connection parameters to us in the list of databases:
DATABASES = {
...
'osm_replica1': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'HOST': 'localhost',
'NAME': 'geodjango',
},
}
And complete the list of replicas OSM_REPLICS:
OSM_REPLICS = ['osm', 'osm_replica1']
Add django-osm’s URL patterns:
urlpatterns = [
...
path('osm/', include('osm.urls', namespace='osm')),
...
]
Add DRF settings:
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework.authentication.SessionAuthentication",
"rest_framework.authentication.TokenAuthentication",
),
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
'PAGE_SIZE': 25
}
Features
TODO
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Development commands
pip install -r requirements_dev.txt invoke -l
Credits
Tools used in rendering this package:
History
0.1.0 (2021-01-16)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-osm-0.1.0.tar.gz
(14.4 kB
view hashes)
Built Distribution
Close
Hashes for django_osm-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83449727f7e31c639517f2385a2d79969c152a2e429a40c56d9a7332c1a09012 |
|
MD5 | 4d2cc9c53c5876470f1d60eca9e62cc4 |
|
BLAKE2b-256 | 86f3c9d248ab24905e44fb129efbd37b98ea47ca9526f04f8a206f4a2e576f14 |