2021-12-08 21:45:42 +01:00
|
|
|
# This file is part of Radicale - CalDAV and CardDAV server
|
2019-06-17 04:13:24 +02:00
|
|
|
# Copyright © 2017-2018 Unrud <unrud@outlook.com>
|
2017-05-31 13:18:40 +02:00
|
|
|
#
|
|
|
|
# This library is free software: 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 library 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.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with Radicale. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2020-01-12 23:32:28 +01:00
|
|
|
"""
|
|
|
|
The default web backend.
|
|
|
|
|
|
|
|
Features:
|
|
|
|
|
|
|
|
- Create and delete address books and calendars.
|
|
|
|
- Edit basic metadata of existing address books and calendars.
|
|
|
|
- Upload address books and calendars from files.
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
2022-04-04 18:17:01 +02:00
|
|
|
from radicale import httputils, types, web
|
2022-01-18 22:35:49 +01:00
|
|
|
|
|
|
|
MIMETYPES = httputils.MIMETYPES # deprecated
|
|
|
|
FALLBACK_MIMETYPE = httputils.FALLBACK_MIMETYPE # deprecated
|
2017-05-31 13:18:40 +02:00
|
|
|
|
2017-05-31 13:18:42 +02:00
|
|
|
|
2018-08-28 16:19:36 +02:00
|
|
|
class Web(web.BaseWeb):
|
2021-07-26 20:56:46 +02:00
|
|
|
|
|
|
|
def get(self, environ: types.WSGIEnviron, base_prefix: str, path: str,
|
|
|
|
user: str) -> types.WSGIResponse:
|
2022-04-04 18:17:01 +02:00
|
|
|
return httputils.serve_resource("radicale.web", "internal_data",
|
|
|
|
base_prefix, path)
|