Getting Started¶
Requirements¶
- Python 2.7, Python 3.5+
- Django 1.8 - 1.11
clover
0.2.0 (https://github.com/consbio/clover)numpy
(http://www.numpy.org)django-tastypie
0.13.x (https://django-tastypie.readthedocs.io)djangorestframework
(http://www.django-rest-framework.org)netCDF4-python
(http://unidata.github.io/netcdf4-python)pyproj
(https://github.com/jswhit/pyproj)fiona
(http://toblerity.org/fiona/README.html)shapely
(https://pypi.python.org/pypi/Shapely)ply
(https://pypi.python.org/pypi/ply)celery
(http://www.celeryproject.org)Pillow
(https://pypi.python.org/pypi/Pillow)six
Installation¶
Once the dependencies are installed, you can install ncdjango with:
$ pip install ncdjango
Note
The clover dependency is not the same as the pip package of the same name. clover must be installed from https://github.com/consbio/clover. The correct package should be installed by ncdjango, but in case of problems, it’s good to check that you have the correct one.
Setup¶
- Create a new Django project if you don’t already have one.
- Add
ncdjango
,tastypie
, andrest_framework
to yourINSTALLED_APPS
setting.- Modify your
settings.py
to specify the root location of your datasets:NC_SERVICE_DATA_ROOT = '/var/ncdjango/services/'
- Modify your
settings.py
to specify the location to store temporary files (uploads):NC_TEMPORARY_FILE_LOCATION = '/tmp'
- See Settings for additional options.
- Add the following to your project’s
urlpatterns
:url(r'^', include('ncdjango.urls'))Note
You can modify this URL pattern if you want all the ncdjango and web interface URLs grouped under a common path.
Publishing Services¶
Todo