forked from OCA/rest-framework
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcore.py
More file actions
21 lines (13 loc) · 685 Bytes
/
core.py
File metadata and controls
21 lines (13 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- coding: utf-8 -*-
# Copyright 2018 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
import collections
class RestServicesDatabases(dict):
""" Holds a registry of REST services for each database """
_rest_services_databases = RestServicesDatabases()
_rest_controllers_per_module = collections.defaultdict(list)
class RestServicesRegistry(dict):
""" Holds a registry of REST services where key is the root of the path on
which the methods of your ` RestController`` are registred and value is the
name of the collection on which your ``RestServiceComponent`` implementing
the business logic of your service is registered."""