forked from GeoNode/geonode
/
settings.txt
695 lines (501 loc) · 19.1 KB
/
settings.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
.. _settings:
========
Settings
========
Here’s a list of settings available in GeoNode and their default values. This includes settings for some external applications that
GeoNode depends on.
.. comment:
:local:
:depth: 1
Documents settings
==================
Here's a list of settings available for the Documents app in GeoNode.
ALLOWED_DOCUMENT_TYPES
----------------------
Default: ``['doc', 'docx', 'xls', 'xlsx', 'pdf', 'zip', 'jpg', 'jpeg', 'tif', 'tiff', 'png', 'gif', 'txt']``
A list of acceptable file extensions that can be uploaded to the Documents app.
MAX_DOCUMENT_SIZE
-----------------
Default: ``2``
Metadata settings
=================
CATALOGUE
---------
A dict with the following keys:
* ENGINE: The CSW backend (default is ``geonode.catalogue.backends.pycsw_local``)
* URL: The FULLY QUALIFIED base URL to the CSW instance for this GeoNode
* USERNAME: login credentials (if required)
* PASSWORD: login credentials (if required)
pycsw is the default CSW enabled in GeoNode. pycsw configuration directives
are managed in the PYCSW entry.
PYCSW
-----
A dict with pycsw's configuration. Of note are the sections
``metadata:main`` to set CSW server metadata and ``metadata:inspire``
to set INSPIRE options. Setting ``metadata:inspire['enabled']`` to ``true``
will enable INSPIRE support. Server level configurations can be overridden
in the ``server`` section. See http://docs.pycsw.org/en/latest/configuration.html
for full pycsw configuration details.
MODIFY_TOPICCATEGORY
--------------------
Default: ``False``
Metadata Topic Categories list should not be modified, as it is strictly defined
by ISO (See: http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
and check the <CodeListDictionary gml:id="MD_MD_TopicCategoryCode"> element).
Some customization is still possible by changing the is_choice and the GeoNode
description fields.
In case it is absolutely necessary to add/delete/update categories, it is
possible to set the MODIFY_TOPICCATEGORY setting to True.
Maps settings
=============
DEFAULT_MAP_BASE_LAYER
----------------------
The name of the background layer to include in newly created maps.
DEFAULT_MAP_CENTER
------------------
Default: ``(0, 0)``
A 2-tuple with the latitude/longitude coordinates of the center-point to use
in newly created maps.
DEFAULT_MAP_ZOOM
----------------
Default: ``0``
The zoom-level to use in newly created maps. This works like the OpenLayers
zoom level setting; 0 is at the world extent and each additional level cuts
the viewport in half in each direction.
MAP_BASELAYERS
--------------
Default::
MAP_BASELAYERS = [{
"source": {
"ptype": "gxp_wmscsource",
"url": OGC_SERVER['default']['PUBLIC_LOCATION'] + "wms",
"restUrl": "/gs/rest"
}
},{
"source": {"ptype": "gxp_olsource"},
"type":"OpenLayers.Layer",
"args":["No background"],
"visibility": False,
"fixed": True,
"group":"background"
}, {
"source": {"ptype": "gxp_osmsource"},
"type":"OpenLayers.Layer.OSM",
"name":"mapnik",
"visibility": False,
"fixed": True,
"group":"background"
}, {
"source": {"ptype": "gxp_mapquestsource"},
"name":"osm",
"group":"background",
"visibility": True
}, {
"source": {"ptype": "gxp_mapquestsource"},
"name":"naip",
"group":"background",
"visibility": False
},{
"source": {"ptype": "gxp_mapboxsource"},
}, {
"source": {"ptype": "gxp_olsource"},
"type":"OpenLayers.Layer.WMS",
"group":"background",
"visibility": False,
"fixed": True,
"args":[
"bluemarble",
"http://maps.opengeo.org/geowebcache/service/wms",
{
"layers":["bluemarble"],
"format":"image/png",
"tiled": True,
"tilesOrigin": [-20037508.34, -20037508.34]
},
{"buffer": 0}
]
}]
A list of dictionaries that specify the default map layers.
Specific settings for map API providers (if they are not set those base maps will not be available):
* ALT_OSM_BASEMAPS set this variable to True if you want additional OSM basemaps
* CARTODB_BASEMAPS set this variable to True if you want CartoDB basemaps
* STAMEN_BASEMAPS set this variable to True if you want stamen basemaps
* THUNDERFOREST_BASEMAPS set this variable to True if you want Thunderforest basemaps
* MAPBOX_ACCESS_TOKEN set this variable to your Mapbox public token
* BING_API_KEY set this variable to your BING Map Key value
LAYER_PREVIEW_LIBRARY
---------------------
Default: ``"leaflet"``
The library to use for display preview images of layers. The library choices are:
* ``"leaflet"``
* ``"geoext"``
* ``"react"``
More instructions can be found `here<https://github.com/GeoNode/geonode-client/blob/master/README.md>`
OGC_SERVER
----------
Default: ``{}`` (Empty dictionary)
A dictionary of OGC servers and their options. The main
server should be listed in the 'default' key. If there is no 'default'
key or if the ``OGC_SERVER`` setting does not exist GeoNode will raise
an Improperly Configured exception. Below is an example of the ``OGC_SERVER``
setting::
OGC_SERVER = {
'default' : {
'LOCATION' : 'http://localhost:8080/geoserver/',
'USER' : 'admin',
'PASSWORD' : 'geoserver',
}
}
BACKEND
.......
Default: ``"geonode.geoserver"``
The OGC server backend to use. The backend choices are:
* ``'geonode.geoserver'``
BACKEND_WRITE_ENABLED
.....................
Default: ``True``
Specifies whether the OGC server can be written to. If False, actions that modify
data on the OGC server will not execute.
DATASTORE
.........
Default: ``''`` (Empty string)
An optional string that represents the name of a vector datastore that GeoNode uploads
are imported into. In order to support vector datastore imports there also needs to be an
entry for the datastore in the ``DATABASES`` dictionary with the same name. Example::
OGC_SERVER = {
'default' : {
'LOCATION' : 'http://localhost:8080/geoserver/',
'USER' : 'admin',
'PASSWORD' : 'geoserver',
'DATASTORE': 'geonode_imports'
}
}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'development.db',
},
'geonode_imports' : {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'geonode_imports',
'USER' : 'geonode_user',
'PASSWORD' : 'a_password',
'HOST' : 'localhost',
'PORT' : '5432',
}
}
GEOGIG_ENABLED
..............
Default: ``False``
A boolean that represents whether the OGC server supports GeoGig datastores.
GEONODE_SECURITY_ENABLED
........................
Default: ``True``
A boolean that represents whether GeoNode's security application is enabled.
LOCATION
........
Default: ``"http://localhost:8080/geoserver/"``
A base URL from which GeoNode can construct OGC service URLs.
If using GeoServer you can determine this by
visiting the GeoServer administration home page without the
/web/ at the end. For example, if your GeoServer administration app is at
http://example.com/geoserver/web/, your server's location is http://example.com/geoserver.
MAPFISH_PRINT_ENABLED
.....................
Default: ``True``
A boolean that represents whether the MapFish printing extension is enabled on the server.
PASSWORD
........
Default: ``'geoserver'``
The administrative password for the OGC server as a string.
PG_GEOGIG
.........
Default: ``False``
A boolean that represents whether GeoNode will use a Postgres database as a backend for GeoGig stores. When set to true, the ``DATASTORE`` field must be set to a Postgres database which will be used.
PRINT_NG_ENABLED
................
Default: ``True``
A boolean that represents whether printing of maps and layers is enabled.
PUBLIC_LOCATION
...............
Default: ``"http://localhost:8080/geoserver/"``
The URL used to in most public requests from GeoNode. This settings allows a user to write to one OGC server (the LOCATION setting)
and read from a separate server or the PUBLIC_LOCATION.
USER
....
Default: ``'admin'``
The administrative username for the OGC server as a string.
WMST_ENABLED
............
Default: ``False``
Not implemented.
WPS_ENABLED
...........
Default: ``False``
Not implemented.
TIMEOUT
.......
Default: ``10``
The maximum time, in seconds, to wait for the server to respond.
SITEURL
-------
Default: ``'http://localhost:8000/'``
A base URL for use in creating absolute links to Django views and generating links in metadata.
Proxy settings
==============
PROXY_ALLOWED_HOSTS
-------------------
Default: ``()`` (Empty tuple)
A tuple of strings representing the host/domain names that GeoNode can proxy requests to. This is a security measure
to prevent an attacker from using the GeoNode proxy to render malicious code or access internal sites.
Values in this tuple can be fully qualified names (e.g. 'www.geonode.org'), in which case they will be matched against
the request’s Host header exactly (case-insensitive, not including port). A value beginning with a period can be used
as a subdomain wildcard: ``.geonode.org`` will match geonode.org, www.geonode.org, and any other subdomain of
geonode.org. A value of '*' will match anything and is not recommended for production deployments.
PROXY_URL
---------
Default ``/proxy/?url=``
The URL to a proxy that will be used when making client-side requests in GeoNode. By default, the
internal GeoNode proxy is used but administrators may favor using their own, less restrictive proxies.
Search settings
===============
DEFAULT_SEARCH_SIZE
-------------------
Default: ``10``
An integer that specifies the default search size when using ``geonode.search`` for querying data.
API settings
============
API_LIMIT_PER_PAGE
------------------
Default: ``0``
Number of items returned by the API. 0 equals no limit
API_INCLUDE_REGIONS_COUNT
-------------------------
Default: ``False``
Specifies if to include facets count for regions.
Security settings
=================
AUTH_EXEMPT_URLS
----------------
Default: ``()`` (Empty tuple)
A tuple of URL patterns that the user can visit without being authenticated.
This setting has no effect if ``LOCKDOWN_GEONODE`` is not True. For example,
``AUTH_EXEMPT_URLS = ('/maps',)`` will allow unauthenticated users to
browse maps.
LOCKDOWN_GEONODE
----------------
Default: ``False``
By default, the GeoNode application allows visitors to view most pages without being authenticated. If this is set to ``True``
users must be authenticated before accessing URL routes not included in ``AUTH_EXEMPT_URLS``.
RESOURCE_PUBLISHING
-------------------
Default: ``True``
By default, the GeoNode application allows GeoNode staff members to
publish/unpublish resources.
By default resources are published when created. When this settings is set to
True the staff members will be able to unpublish a resource (and eventually
publish it back).
Social settings
===============
SOCIAL_BUTTONS
--------------
Default: ``True``
A boolean which specifies whether the social media icons and JavaScript should be rendered in GeoNode.
SOCIAL_ORIGINS
--------------
Default::
SOCIAL_ORIGINS = [{
"label":"Email",
"url":"mailto:?subject={name}&body={url}",
"css_class":"email"
}, {
"label":"Facebook",
"url":"http://www.facebook.com/sharer.php?u={url}",
"css_class":"fb"
}, {
"label":"Twitter",
"url":"https://twitter.com/share?url={url}",
"css_class":"tw"
}, {
"label":"Google +",
"url":"https://plus.google.com/share?url={url}",
"css_class":"gp"
}]
A list of dictionaries that is used to generate the social links displayed in the Share tab. For each origin, the name and URL format parameters are replaced by the actual values of the ResourceBase object (layer, map, document).
CKAN_ORIGINS
------------
Default::
CKAN_ORIGINS = [{
"label":"Humanitarian Data Exchange (HDX)",
"url":"https://data.hdx.rwlabs.org/dataset/new?title={name}¬es={abstract}",
"css_class":"hdx"
}]
A list of dictionaries that is used to generate the links to CKAN instances displayed in the Share tab. For each origin, the name and abstract format parameters are replaced by the actual values of the ResourceBase object (layer, map, document). This is not enabled by default. To enabled, uncomment the following line: SOCIAL_ORIGINS.extend(CKAN_ORIGINS).
TWITTER_CARD
------------
Default:: ``True``
A boolean that specifies whether Twitter cards are enabled.
TWITTER_SITE
------------
Default:: ``'@GeoNode'``
A string that specifies the site to for the twitter:site meta tag for Twitter Cards.
TWITTER_HASHTAGS
----------------
Default:: ``['geonode']``
A list that specifies the hashtags to use when sharing a resource when clicking on a social link.
OPENGRAPH_ENABLED
-----------------
Default:: ``True``
A boolean that specifies whether Open Graph is enabled. Open Graph is used by Facebook and Slack.
Upload settings
===============
GEOGIG_DATASTORE_NAME
---------------------
Default: ``None``
A string with the default GeoGig datastore name. This value is only used if no GeoGig datastore name is provided
when data is uploaded but it must be populated if your deployment supports GeoGig.
UPLOADER
--------
Default::
{
'BACKEND' : 'geonode.rest',
'OPTIONS' : {
'TIME_ENABLED': False,
'GEOGIG_ENABLED': False,
}
}
A dictionary of Uploader settings and their values.
BACKEND
-------
Default: ``'geonode.rest'``
The uploader backend to use. The backend choices are:
* ``'geonode.importer'``
* ``'geonode.rest'``
The importer backend requires the GeoServer importer extension to be enabled and is required for uploading data into
GeoGig datastores.
OPTIONS
-------
Default::
'OPTIONS' : {
'TIME_ENABLED': False,
'GEOGIG_ENABLED': False,
}
TIME_ENABLED
------------
Default: ``False``
A boolean that specifies whether the upload should allow the user to enable time support when uploading data.
GEOGIG_ENABLED
--------------
Default: ``False``
A boolean that specifies whether the uploader should allow the user to upload data into a GeoGig datastore.
User Account settings
=====================
REGISTRATION_OPEN
-----------------
Default: ``False``
A boolean that specifies whether users can self-register for an account on your site.
THEME_ACCOUNT_CONTACT_EMAIL
---------------------------
Default: ``'admin@example.com'``
This email address is added to the bottom of the password reset page in case users have trouble unlocking-locking their account.
.. _pinax-notifications:
User notifications settings
===========================
.. note:: `PINAX_*` settings are relevant if you have `pinax.notifications` app added to `INSTALLED_APPS`.
.. note:: user configuration is described :ref:`notifications`.
.. note:: Full list of Pinax-notifications app settings is `available in Pinax notifications docs <https://pinax-notifications.readthedocs.io/en/latest/settings/>`_.
PINAX_NOTIFICATIONS_QUEUE_ALL
-----------------------------
Default: `False`
A boolean that specifies if user notifications should be queued and send outside main web application process. If set to `True`, additional sending script, `python manage.py emit_notices` should be called periodically.
PINAX_NOTIFICATIONS_BACKENDS
----------------------------
Default:
.. code::
[
("email", "pinax.notifications.backends.email.EmailBackend"),
]
List of backends (channels) that delivers messages to receipients.
Download settings
=================
DOWNLOAD_FORMATS_METADATA
-------------------------
Specifies which metadata formats are available for users to download.
Default::
DOWNLOAD_FORMATS_METADATA = [
'Atom', 'DIF', 'Dublin Core', 'ebRIM', 'FGDC', 'ISO',
]
DOWNLOAD_FORMATS_VECTOR
-----------------------
Specifies which formats for vector data are available for users to download.
Default::
DOWNLOAD_FORMATS_VECTOR = [
'JPEG', 'PDF', 'PNG', 'Zipped Shapefile', 'GML 2.0', 'GML 3.1.1', 'CSV',
'Excel', 'GeoJSON', 'KML', 'View in Google Earth', 'Tiles',
]
DOWNLOAD_FORMATS_RASTER
-----------------------
Specifies which formats for raster data are available for users to download.
Default::
DOWNLOAD_FORMATS_RASTER = [
'JPEG', 'PDF', 'PNG' 'Tiles',
]
Contrib settings
================
EXIF_ENABLED
------------
Default: ``False``
A boolean that specifies whether the Exif contrib app is enabled. If enabled, metadata is generated from Exif tags when documents are uploaded.
NLP_ENABLED
-----------
Default: ``False``
A boolean that specifies whether the NLP (Natural Language Processing) contrib app is enabled. If enabled, NLP (specifically MITIE) is used to infer additional metadata from uploaded documents to help fill metadata gaps.
NLP_LOCATION_THRESHOLD
----------------------
Default: ``1.0``
A float that specifies the threshold for location matches.
NLP_LIBRARY_PATH
----------------
Default:: ``'/opt/MITIE/mitielib'``
A string that specifies the location of the MITIE library
NLP_MODEL_PATH
--------------
Default:: ``'/opt/MITIE/MITIE-models/english/ner_model.dat'``
A string that specifies the location of the NER (Named Entity Resolver). MITIE comes with English and Spanish NER models. Other models can be trained.
SLACK_ENABLED
-------------
Default: ``False``
A boolean that specifies whether the Slack contrib app is enabled. If enabled, GeoNode will send messages to the slack channels specified in SLACK_WEBHOOK_URLS when a document is uploaded, metadata is updated, etc. Coverage of events is still incomplete.
SLACK_WEBHOOK_URLS
------------------
A list that specifies the URLs to post Slack messages to. Each URL is for a different channel. The default URL should be replaced when slack integration is enabled.
Default::
SLACK_WEBHOOK_URLS = [
"https://hooks.slack.com/services/T000/B000/XX"
]
Amazon Web Services Settings
============================
S3_STATIC_ENABLED
-----------------
Default: ``False``
A boolean that specifies whether GeoNode's static files will be served through an S3 bucket. Set through the environment variable ``S3_STATIC_ENABLED``.
S3_MEDIA_ENABLED
----------------
Default: ``False``
A boolean that specifies whether GeoNode's media files will be served through an S3 bucket. Set through the environment variable ``S3_MEDIA_ENABLED``.
AWS_BUCKET_NAME
---------------
The name of the S3 bucket GeoNode will pull static and/or media files from. Set through the environment variable ``S3_BUCKET_NAME``.
AWS_STORAGE_BUCKET_NAME
-----------------------
The name of the S3 bucket GeoNode will pull static and/or media files from. Set through the environment variable ``S3_BUCKET_NAME``.
AWS_ACCESS_KEY_ID
-----------------
The access key for the S3 bucket GeoNode will pull static and/or media files from. Set through the environment variable ``AWS_ACCESS_KEY_ID``.
AWS_SECRET_ACCESS_KEY
---------------------
The secret access key for the S3 bucket GeoNode will pull static and/or media files from. Set through the environment variable ``AWS_SECRET_ACCESS_KEY``.
AWS_QUERYSTRING_AUTH
--------------------
Default: ``False``
Generate an S3 auth querystring.