|
133 | 133 | # SECURITY WARNING: keep the secret key used in production secret!
|
134 | 134 | SECRET_KEY = 's%e0b$qew$cso(kqrg^ves-!d3i!6#@6#uk3$0z&f22lxa9l20'
|
135 | 135 |
|
136 |
| -# SECURITY WARNING: don't run with debug turned on in production! |
137 |
| -DEBUG = True |
| 136 | +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" |
| 137 | +PG_SUPERUSER = "" |
| 138 | +PG_SUPERUSER_PW = "" |
| 139 | + |
| 140 | +# from http://django-guardian.readthedocs.io/en/stable/configuration.html#anonymous-user-name |
| 141 | +ANONYMOUS_USER_NAME = None |
| 142 | + |
| 143 | +ELASTICSEARCH_HTTP_PORT = 9200 # this should be in increments of 200, eg: 9400, 9600, 9800 |
| 144 | +SEARCH_BACKEND = "arches.app.search.search.SearchEngine" |
| 145 | +SEARCH_THUMBNAILS = False |
| 146 | +# see http://elasticsearch-py.readthedocs.org/en/master/api.html#elasticsearch.Elasticsearch |
| 147 | +ELASTICSEARCH_HOSTS = [{"scheme": "https", "host": "localhost", "port": ELASTICSEARCH_HTTP_PORT}] |
138 | 148 |
|
139 | 149 | ROOT_URLCONF = 'manatee.urls'
|
140 | 150 |
|
|
376 | 386 | if DEBUG is True:
|
377 | 387 | SILENCED_SYSTEM_CHECKS = ["captcha.recaptcha_test_key_error"]
|
378 | 388 |
|
| 389 | +MAPBOX_API_KEY = "" # Put your Mapbox key here! |
| 390 | + |
| 391 | +# links to sprites and glyphs for use on map |
| 392 | +MAPBOX_SPRITES = "mapbox://sprites/mapbox/basic-v9" |
| 393 | +MAPBOX_GLYPHS = "mapbox://fonts/mapbox/{fontstack}/{range}.pbf" |
| 394 | + |
| 395 | +DEFAULT_MAP_ZOOM = 0 |
| 396 | +MAP_MIN_ZOOM = 0 |
| 397 | +MAP_MAX_ZOOM = 20 |
| 398 | + |
| 399 | +# Map filter auto adjusts map extent to fit results. If False, map extent will not change when filtering results. |
| 400 | +MAP_FILTER_AUTO_ZOOM_ENABLED = True |
| 401 | + |
| 402 | +# If True, users can make edits to graphs that are locked |
| 403 | +# (generally because they have resource intances saved against them) |
| 404 | +# Changing this setting to True and making graph modifications may result in |
| 405 | +# disagreement between your Resource Models and Resource Instances potentially |
| 406 | +# causing your application to break. |
| 407 | +OVERRIDE_RESOURCE_MODEL_LOCK = False |
| 408 | + |
| 409 | +# If True, allows users to selectively enable two-factor authentication |
| 410 | +ENABLE_TWO_FACTOR_AUTHENTICATION = False |
| 411 | + |
| 412 | +# If True, users cannot log in unless they have enabled two-factor authentication |
| 413 | +FORCE_TWO_FACTOR_AUTHENTICATION = False |
| 414 | + |
| 415 | +# bounds for search results hex binning fabric (search grid). |
| 416 | +# a smaller bbox will give you less distortion in hexes and better performance |
| 417 | +DEFAULT_BOUNDS = { |
| 418 | + "type": "FeatureCollection", |
| 419 | + "features": [ |
| 420 | + { |
| 421 | + "geometry": {"type": "Polygon", "coordinates": [[[-122, -52], [128, -52], [128, 69], [-122, 69], [-122, -52]]]}, |
| 422 | + "type": "Feature", |
| 423 | + "properties": {}, |
| 424 | + } |
| 425 | + ], |
| 426 | +} |
379 | 427 |
|
380 |
| -# EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' #<-- Only need to uncomment this for testing without an actual email server |
381 |
| -# EMAIL_USE_TLS = True |
382 |
| -# EMAIL_HOST = 'smtp.gmail.com' |
383 |
| -EMAIL_HOST_USER = "xxxx@xxx.com" |
384 |
| -# EMAIL_HOST_PASSWORD = 'xxxxxxx' |
385 |
| -# EMAIL_PORT = 587 |
| 428 | +# size to use for hex binning search results on map (in km) |
| 429 | +HEX_BIN_SIZE = 100 |
| 430 | +# binning uses elasticsearch GeoHash grid aggregation. |
| 431 | +# precision for binning is set based on GeoHash precision, see this table: |
| 432 | +# https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-geohashgrid-aggregation.html#_cell_dimensions_at_the_equator |
| 433 | +# high precision binning may result in performance issues. |
| 434 | +HEX_BIN_PRECISION = 4 |
386 | 435 |
|
| 436 | +ALLOWED_POPUP_HOSTS = [] |
387 | 437 | DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
|
388 | 438 |
|
| 439 | +TILESERVER_URL = None |
| 440 | + |
389 | 441 | CELERY_BROKER_URL = "" # RabbitMQ --> "amqp://guest:guest@localhost", Redis --> "redis://localhost:6379/0"
|
390 | 442 | CELERY_ACCEPT_CONTENT = ['json']
|
391 | 443 | CELERY_RESULT_BACKEND = 'django-db' # Use 'django-cache' if you want to use your cache as your backend
|
392 | 444 | CELERY_TASK_SERIALIZER = 'json'
|
393 |
| - |
394 |
| - |
395 | 445 | CELERY_SEARCH_EXPORT_EXPIRES = 24 * 3600 # seconds
|
396 | 446 | CELERY_SEARCH_EXPORT_CHECK = 3600 # seconds
|
397 | 447 |
|
|
406 | 456 | # way of monitoring celery so you can detect the background task not being available.
|
407 | 457 | CELERY_CHECK_ONLY_INSPECT_BROKER = False
|
408 | 458 |
|
| 459 | +AUTO_REFRESH_GEOM_VIEW = True |
| 460 | +TILE_CACHE_TIMEOUT = 600 # seconds |
| 461 | +CLUSTER_DISTANCE_MAX = 5000 # meters |
| 462 | +GRAPH_MODEL_CACHE_TIMEOUT = None # seconds * hours * days = ~1mo |
| 463 | + |
409 | 464 | CANTALOUPE_DIR = os.path.join(ROOT_DIR, UPLOADED_FILES_DIR)
|
410 | 465 | CANTALOUPE_HTTP_ENDPOINT = "http://localhost:8182/"
|
411 | 466 |
|
412 | 467 | ACCESSIBILITY_MODE = False
|
413 | 468 |
|
| 469 | +COMPRESS_PRECOMPILERS = (("text/x-scss", "django_libsass.SassCompiler"),) |
| 470 | + |
| 471 | +# Dictionary containing any additional context items for customising email templates |
| 472 | +with suppress(NameError): # need to suppress i18n NameError for test runner |
| 473 | + EXTRA_EMAIL_CONTEXT = { |
| 474 | + "salutation": _("Hi"), |
| 475 | + "expiration":(datetime.now() + timedelta(seconds=CELERY_SEARCH_EXPORT_EXPIRES)).strftime("%A, %d %B %Y") |
| 476 | + } |
| 477 | + |
| 478 | +RENDERERS = [ |
| 479 | + { |
| 480 | + "name": "imagereader", |
| 481 | + "title": "Image Reader", |
| 482 | + "description": "Displays most image file types", |
| 483 | + "id": "5e05aa2e-5db0-4922-8938-b4d2b7919733", |
| 484 | + "iconclass": "fa fa-camera", |
| 485 | + "component": "views/components/cards/file-renderers/imagereader", |
| 486 | + "ext": "", |
| 487 | + "type": "image/*", |
| 488 | + "exclude": "tif,tiff,psd", |
| 489 | + }, |
| 490 | + { |
| 491 | + "name": "pdfreader", |
| 492 | + "title": "PDF Reader", |
| 493 | + "description": "Displays pdf files", |
| 494 | + "id": "09dec059-1ee8-4fbd-85dd-c0ab0428aa94", |
| 495 | + "iconclass": "fa fa-file", |
| 496 | + "component": "views/components/cards/file-renderers/pdfreader", |
| 497 | + "ext": "pdf", |
| 498 | + "type": "application/pdf", |
| 499 | + "exclude": "tif,tiff,psd", |
| 500 | + }, |
| 501 | +] |
| 502 | + |
414 | 503 | # By setting RESTRICT_MEDIA_ACCESS to True, media file requests outside of Arches will checked against nodegroup permissions.
|
415 | 504 | RESTRICT_MEDIA_ACCESS = False
|
416 | 505 |
|
|
0 commit comments