|
@@ -13,15 +13,18 @@ from tracim.lib.utils.authentification import basic_auth_check_credentials
|
13
|
13
|
from tracim.lib.utils.authentification import BASIC_AUTH_WEBUI_REALM
|
14
|
14
|
from tracim.lib.utils.authorization import AcceptAllAuthorizationPolicy
|
15
|
15
|
from tracim.lib.utils.authorization import TRACIM_DEFAULT_PERM
|
|
16
|
+from tracim.lib.webdav import WebdavAppFactory
|
16
|
17
|
from tracim.views import BASE_API_V2
|
17
|
18
|
from tracim.views.core_api.session_controller import SessionController
|
18
|
19
|
from tracim.views.errors import ErrorSchema
|
19
|
20
|
from tracim.lib.utils.cors import add_cors_support
|
20
|
21
|
|
21
|
22
|
|
22
|
|
-def main(global_config, **settings):
|
|
23
|
+def web(global_config, **local_settings):
|
23
|
24
|
""" This function returns a Pyramid WSGI application.
|
24
|
25
|
"""
|
|
26
|
+ settings = global_config
|
|
27
|
+ settings.update(local_settings)
|
25
|
28
|
# set CFG object
|
26
|
29
|
app_config = CFG(settings)
|
27
|
30
|
app_config.configure_filedepot()
|
|
@@ -64,3 +67,12 @@ def main(global_config, **settings):
|
64
|
67
|
'API of Tracim v2',
|
65
|
68
|
)
|
66
|
69
|
return configurator.make_wsgi_app()
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+def webdav(global_config, **local_settings):
|
|
73
|
+ settings = global_config
|
|
74
|
+ settings.update(local_settings)
|
|
75
|
+ app_factory = WebdavAppFactory(
|
|
76
|
+ tracim_config_file_path=settings['__file__'],
|
|
77
|
+ )
|
|
78
|
+ return app_factory.get_wsgi_app()
|