-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from nuest/main
- Loading branch information
Showing
45 changed files
with
702 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,3 +134,6 @@ geodjango/ | |
tests-ui/screenshots/ | ||
|
||
static/ | ||
|
||
|
||
static/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,18 +9,22 @@ processes = [] | |
dockerfile = "Dockerfile" | ||
|
||
[deploy] | ||
release_command = "python manage.py migrate" | ||
release_command = "sh release_command.sh" | ||
|
||
[env] | ||
OPTIMAP_ALLOWED_HOST = "*" | ||
OPTIMAP_ALLOWED_HOST = "optimap.science,optimap.fly.dev" | ||
PORT = "8000" | ||
OPTIMAP_DEBUG = false | ||
OPTIMAP_EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" | ||
OPTIMAP_EMAIL_HOST= "smtp.ionos.com" | ||
OPTIMAP_EMAIL_PORT = "587" | ||
OPTIMAP_EMAIL_HOST= "smtp.ionos.de" | ||
OPTIMAP_EMAIL_PORT_SMTP = "587" | ||
OPTIMAP_EMAIL_HOST_USER = "[email protected]" | ||
OPTIMAP_EMAIL_USE_TLS= true | ||
OPTIMAP_EMAIL_HOST_IMAP = "imap.ionos.de" | ||
OPTIMAP_EMAIL_PORT_IMAP = "993" | ||
OPTIMAP_EMAIL_IMAP_SENT_FOLDER = "\"Gesendete Objekte\"" | ||
CSRF_TRUSTED_ORIGINS = "https://optimap.science" | ||
OPTIMAP_LOGGING_CONSOLE_LEVEL = "DEBUG" | ||
|
||
[experimental] | ||
allowed_public_ports = [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,15 +31,17 @@ | |
|
||
|
||
# SECURITY WARNING: keep the secret key used in production secret! | ||
SECRET_KEY = env('SECRET_KEY', default='django-insecure-@(y&etxu!n5qkeyim8ineufd*c*0o20k6$q^$89md-i%qcdk57') | ||
SECRET_KEY = env('SECRET_KEY', default='django-insecure') | ||
|
||
# SECURITY WARNING: don't run with debug turned on in production! | ||
DEBUG = env('OPTIMAP_DEBUG', default=True) | ||
|
||
ALLOWED_HOSTS = env('OPTIMAP_ALLOWED_HOST', default=[]) | ||
ALLOWED_HOSTS = [i.strip('[]') for i in env('OPTIMAP_ALLOWED_HOST', default='*').split(',')] | ||
|
||
OPTIMAP_SUPERUSER_EMAILS = [i.strip('[]') for i in env('OPTIMAP_SUPERUSER_EMAILS', default='').split(',')] | ||
|
||
TEST_HARVESTING_ONLINE = env('OPTIMAP_TEST_HARVESTING_ONLINE', default=False) | ||
|
||
ROOT_URLCONF = 'optimetaPortal.urls' | ||
|
||
AUTHENTICATION_BACKENDS = [ | ||
|
@@ -61,10 +63,13 @@ | |
'django_q', | ||
'drf_spectacular', | ||
'drf_spectacular_sidecar', | ||
'leaflet' # used in admin site | ||
] | ||
|
||
REST_FRAMEWORK = { | ||
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema', | ||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', | ||
'PAGE_SIZE': 999, | ||
} | ||
|
||
# https://github.com/tfranzel/drf-spectacular | ||
|
@@ -139,10 +144,10 @@ | |
} | ||
|
||
CACHES = { | ||
# defaults to local-memory caching, see https://docs.djangoproject.com/en/4.1/topics/cache/#local-memory-caching | ||
# defaults to database caching to persist across processes, see https://docs.djangoproject.com/en/4.1/topics/cache/#local-memory-caching | ||
'default': { | ||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', | ||
'LOCATION': 'unique-snowflake', | ||
'BACKEND': 'django.core.cache.backends.db.DatabaseCache', | ||
'LOCATION': 'cache', | ||
}, | ||
|
||
# use for development | ||
|
@@ -166,11 +171,15 @@ | |
|
||
# for testing email sending EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' | ||
EMAIL_BACKEND = env('OPTIMAP_EMAIL_BACKEND', default='django.core.mail.backends.console.EmailBackend') | ||
EMAIL_HOST = env('OPTIMAP_EMAIL_HOST', default='smtp.gmail.com') | ||
EMAIL_PORT = env('OPTIMAP_EMAIL_PORT', default=587) | ||
EMAIL_HOST_USER = env('OPTIMAP_EMAIL_HOST_USER', default=False) | ||
EMAIL_HOST_PASSWORD = env('OPTIMAP_EMAIL_HOST_PASSWORD', default=False) | ||
EMAIL_USE_TLS = env('OPTIMAP_EMAIL_USE_TLS', default=True) | ||
EMAIL_HOST = env('OPTIMAP_EMAIL_HOST', default='optimeta.dev') | ||
EMAIL_PORT = env('OPTIMAP_EMAIL_PORT_SMTP', default=587) | ||
EMAIL_HOST_IMAP = env('OPTIMAP_EMAIL_HOST_IMAP', default='optimeta.imap') | ||
EMAIL_PORT_IMAP = env('OPTIMAP_EMAIL_PORT_IMAP', default=993) | ||
EMAIL_HOST_USER = env('OPTIMAP_EMAIL_HOST_USER', default='optimap@dev') | ||
EMAIL_HOST_PASSWORD = env('OPTIMAP_EMAIL_HOST_PASSWORD', default='') | ||
EMAIL_USE_TLS = env('OPTIMAP_EMAIL_USE_TLS', default=False) | ||
EMAIL_USE_SSL = env('OPTIMAP_EMAIL_USE_SSL', default=False) | ||
EMAIL_IMAP_SENT_FOLDER = env('OPTIMAP_EMAIL_IMAP_SENT_FOLDER', default='') | ||
|
||
MIDDLEWARE = [ | ||
'django.middleware.cache.UpdateCacheMiddleware', | ||
|
@@ -273,7 +282,7 @@ | |
}, | ||
'handlers': { | ||
'console': { | ||
'level': 'INFO', | ||
'level': 'DEBUG', | ||
'filters': ['require_debug_true'], | ||
'class': 'logging.StreamHandler', | ||
'formatter': 'simple' | ||
|
@@ -290,12 +299,18 @@ | |
'handlers': ['console', 'mail_admins'], | ||
'level': 'INFO', | ||
}, | ||
'publications': { | ||
'handlers': ['console', 'mail_admins'], | ||
'level': env('OPTIMAP_LOGGING_CONSOLE_LEVEL', default='INFO'), | ||
}, | ||
'django.request': { | ||
'handlers': ['mail_admins'], | ||
'level': 'WARNING', | ||
'propagate': False, | ||
}, | ||
} | ||
} | ||
} | ||
|
||
CSRF_TRUSTED_ORIGINS = [i.strip('[]') for i in env('CSRF_TRUSTED_ORIGINS', default='https://localhost:8000').split(',')] | ||
|
||
ADMINS = [('OPTIMAP', '[email protected]')] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
from django.contrib import admin | ||
"""Markers admin.""" | ||
|
||
from django.contrib.gis import admin | ||
|
||
from leaflet.admin import LeafletGeoAdmin | ||
from publications.models import Publication | ||
|
||
|
||
@admin.register(Publication) | ||
class PublicationAdmin(admin.OSMGeoAdmin): | ||
class PublicationAdmin(LeafletGeoAdmin): | ||
"""Publication Admin.""" | ||
|
||
list_display = ("title", "publicationDate", "creationDate", "lastUpdate") | ||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.