-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
47 lines (36 loc) · 1.58 KB
/
__init__.py
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
# -*- coding: iso-8859-1 -*-
# Copyright (c) 2012 - 2015, GIS-Fachstelle des Amtes für Geoinformation des Kantons Basel-Landschaft
# All rights reserved.
#
# This program is free software and completes the GeoMapFish License for the geoview.bl.ch specific
# parts of the code. You can redistribute it and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# The above copyright notice and this permission notice shall be included in all copies or substantial
# portions of the Software.
__author__ = 'Karsten Deininger'
__create_date__ = '06.08.15'
from pyramid.config import Configurator
CERT_PATH = "/etc/ssl/certs/ca-certificates.crt"
def includeme(config):
"""
By including this in your pyramid web app you get access to connectors for remote file systems, like
WebDav or SFTP.
:param config: The pyramid apps config object
:type config: Configurator
"""
global CERT_PATH
settings = config.get_settings()
# Set cert path
cert = settings.get('rfs_cert_path')
if cert is not None:
CERT_PATH = cert
config.include('pyramid_mako')
config.add_static_view('pyramid_rfs_connector', 'pyramid_rfs_connector:static',
cache_max_age=int(settings["default_max_age"])
)