Impostazioni¶
Le variabile seguenti possono essere aggiunte/modificate nel local_settings.py
Impostazioni di base¶
G3WADMIN_PROJECT_APPS
¶
Lista di moduli “custom” che forniscono servizi di map serving oltre il modulo qdjango
G3WADMIN_LOCAL_MORE_APPS
¶
Custom django modules that is possible to add, i.e. g3w-admin-frontend
(https://github.com/g3w-suite/g3w-admin-frontend) module and other third part django modules.
G3W-SUITE accessory modules:
g3w-admin-frontend
(https://github.com/g3w-suite/g3w-admin-frontend)
caching
filemanager
editing
DATASOURCE_PATH
¶
Path alla cartella locale dei dati geografici (shp, Spatialite, raster, ecc..).
G3WFILE_FORM_UPLOAD_FORMATS
¶
List of formats file that file form ajax uploader can manage at global level. Default is [“qgs”, “qgz”, “png”, “jpg”, “jpeg”, “pdf”, “doc”, “docx”, “xls”, “xlsx”, “ods”]
Importante
L’ultima parte del path deve essere a comune con il datasource del dato dentro al progetto QGIS. P.e.:
QGIS project: <datasource>/<path>/<to>/project_data/<geodata>.shp</datasource>
local_settings.py: DATASOURCE_PATH = /<local_server_<path>/<to>/project_data
Richiesto.
G3WADMIN_VECTOR_LAYER_DOWNLOAD_FORMATS
¶
- Di default è uguale a [“shp”, “xls”], imposta il formato di download dei dati. Valori possibili:
shp: download nel formato Esri Shapefile
xls: download nel formato Excel
gpx: download nel formatp GPS (solo per i layer di tipo Punto o Linea)
RESET_USER_PASSWORD
¶
Default is False, set tot True to activate reset user password by email workflow. If set to True remember to set Django emailing settings (https://docs.djangoproject.com/en/2.2/topics/email/).
CLIENT_OWS_METHOD
¶
Default is “GET”, set to “POST” to change default http call method.
Database logging¶
With v3.6.x version G3W-SUITE can save message logs inside the database. To activate it is sufficient add a new log handler inside Django LOGGING settings and use it for a logger:
LOGGING = {
...
'handlers': {
...
'db_log': {
'level': 'DEBUG',
'class': 'core.utils.logs.db_handler.DatabaseLogHandler'
},
...
}
...
'loggers': {
...
'': {
'handlers': ['db_log'],
'level': 'DEBUG',
},
...
}
}
Importante
This logging system continues to save log records with no upper limit. To keep the table from getting too big, there is a django command that deletes records older than a set number of days. Is possible set a cronjob with the follow command:
python3 manage.py clear_db_logs –days 30
In this case records older than 30 days will be deleted.
Impostazioni per il portale fi frontend¶
FRONTEND
¶
Di default è False
, impostare a True
per attivare il portale frontend di G3W-SUITE come g3w-admin-frontend
. Se impostato a True
la url di base della sezione admin di G3W-SUITE diventerà /admin/.
FRONTEND_APP
¶
Nome del modulo aggiunto a G3WADMIN_LOCAL_MORE_APPS
t da usare come portale-frontend. P.e.:
G3WADMIN_LOCAL_MORE_APPS = [
...
'frontend',
...
]
FRONTEND = True
FRONTEND_APP = 'frontend'
Impostazioni generali di layout¶
G3WSUITE_POWERD_BY
¶
Di base è True
, impostare a False
per non mostrare le informazioni di attribuzione nella parte bassa della sezione admin.
G3WSUITE_CUSTOM_STATIC_URL
¶
A custom url from to load custom static files as images, css, etc..
G3WSUITE_MAIN_LOGO
¶
Immagine del logo principale. Perché l’impostazione abbia effetto è necessario impostare G3WSUITE_CUSTOM_STATIC_URL
G3WSUITE_RID_LOGO
¶
Immagine ridotta del logo principale. Perché l’impostazione abbia effetto è necessario impostare G3WSUITE_CUSTOM_STATIC_URL
G3WSUITE_LOGIN_LOGO
¶
Immageine ella pagina di login. Perché l’impostazione abbia effetto è necessario impostare G3WSUITE_CUSTOM_STATIC_URL
G3WSUITE_CUSTOM_TITLE
¶
Titolo html delle paginde di G3W-SUITE. Se non impostato, il titolo è: g3w-admin per la sezione di admin e g3w-client per il client webgis
G3WSUITE_FAVICON
¶
Immagine fovorite icon. Perché l’impostazione abbia effetto è necessario impostare G3WSUITE_CUSTOM_STATIC_URL
G3WSUITE_CUSTOM_CSS
¶
Una lista di url a file css che saranno aggiutne alla pagine della sezione admin a al client. Perché l’impostazione abbia effetto è necessario impostare G3WSUITE_CUSTOM_STATIC_URL
. P.e.:
G3WSUITE_CUSTOM_CSS = [
G3WSUITE_CUSTOM_STATIC_URL +'css/custom.css'
]
G3WSUITE_CUSTOM_JS
¶
A list of custom js files added to admin pages and to the client.
Mandatory is set G3WSUITE_CUSTOM_STATIC_URL
.
I.e.:
G3WSUITE_CUSTOM_JS = [
G3WSUITE_CUSTOM_STATIC_URL +'js/custom.js'
]
Client layout settings¶
G3W_CLIENT_SEARCH_TITLE
¶
Ttitolo personalizzato della sezione search del client webgis.
G3W_CLIENT_SEARCH_ENDPOINT
¶
- Search url endpoint for “searches calling”, default ows.
ows: by wms search;
api: by g3w-suite layer vector API.
G3W_CLIENT_HEADER_CUSTOM_LINKS
¶
A list of dict of custom links to add into main top bar of webgis client. I.e.:
G3W_CLIENT_HEADER_CUSTOM_LINKS = [
{
'url': 'https://gis3w.it',
'title': 'Gis3W company',
'i18n': True, #(False as default value)
'target': '_blank'
'img': 'https://gis3w.it/wp-content/uploads/2016/10/logo_qgis-1-100x100.png?x22227'
},
{
'title': 'Modal 1',
'content': '<p>Html example content to show in modal</p>',
'type': 'modal',
'position': 10
},
]
i18n (optional) set True if you want lent client try to translate title.
G3W_CLIENT_LEGEND
¶
Un dizionario python di paramentri per personalizzare il layout della immagine di legenda generata dal servizio WMS GetLegendGraphics di QGIS-server, P.e.:
G3W_CLIENT_LEGEND = {
'color': 'red',
'fontsize': 8,
'transparent': True,
'boxspace': 4,
'layerspace': 4,
'layertitle': True,
'layertitlespace': 4,
'symbolspace': None,
'iconlabelspace': 2,
'symbolwidth': 8,
'symbolheight': 4
}
G3W_CLIENT_RIGHT_PANEL
¶
Custom properties settings for webgis right panel section (default, width 33%). A the moment only width is managed. I.e.:
G3W_CLIENT_RIGHT_PANEL = {
'width': 33
}
G3W_CLIENT_NOT_SHOW_EMPTY_VECTORLAYER
¶
Default is False
. Set to True
for remove from webgis TOC vector layer empty, without data.
Editing settings¶
Settings params for editing
module.
EDITING_SHOW_ACTIVE_BUTTON
¶
Di base è True`, Impostare a ``False
per non mostrare i bottoni di attivazione/disattivazione editing nella pagina della lista dei layer di un progetto.
EDITING_ANONYMOUS
¶
Di base è False
. Impostare a True
per dare al apossibilità di editing anche all’utente anonymous.
EDITING_LOGGING
¶
Di base è False
: Impostare a True
per attivare il logging delle azione di editing di ogni singolo utente.
Caching settings¶
Settings params for caching
module
TILESTACHE_CACHE_NAME
¶
A name to identify caching
TILESTACHE_CACHE_TYPE
¶
Default is Disk
to save tile on a disk. Set to Memcache
for to use Memcached caching framework (https://www.memcached.org/)
TILESTACHE_CACHE_DISK_PATH
¶
Path to disk space where to save tile created by tilestache if TILESTAHCE_CACHE_TYEPE
is se to Disk
.
TILESTACHE_CACHE_TOKEN
¶
Mandatory, strign to use as token for internal WMS call for caching module.
Filemanger settings¶
Settings params for filemanager
module.
FILEMANAGER_ROOT_PATH
¶
Mandatory, path to disk space where to CRUD geo data files i.e. Shp Raster, etc.
FILEMANAGER_MAX_UPLOAD_N_FILES
¶
Default is 5, max number files to upload simultaneously.
Qplotly settings¶
LOAD_QPLOTLY_FROM_PROJECT
¶
Default is False
, set to True
to import DataPlotly settings from QGIS project.
Openrouteservice settings¶
ORS_API_ENDPOINT
¶
Default is http://localhost:8080/ors/v2/
, this is the endpoint for Openrouteservice API.
ORS_API_KEY
¶
Openrouteservice API key, optional, can be blank if the key is not required by the endpoint.
ORS_PROFILES
¶
List of available Openrouteservice profiles, default: ("driving-car", "driving-hgv")
Vendors settings¶
Settings variables about third part services, i.e. Google API etc..
VENDOR_KEYS
¶
A list with services API keys. I.e.:
VENDOR_KEYS = {
'google': 'fhgnrjwipòflsjhjjdhjdhashhabs',
'bing': 'agbsgtrkADgstejaaklkklkds8irncdfk'
}
At the moment only Google and Bing services are supported, for background base map and for google geoconding service plus of Nominatim default service.