22 lines
648 B
Python
22 lines
648 B
Python
|
from django_registries.registry import Interface
|
||
|
from django_registries.registry import Registry
|
||
|
|
||
|
|
||
|
class ServiceRegistry(Registry):
|
||
|
"""Registry for services"""
|
||
|
|
||
|
implementations_module = "services"
|
||
|
|
||
|
|
||
|
class ServiceInterface(Interface):
|
||
|
"""Interface for services"""
|
||
|
|
||
|
registry = ServiceRegistry
|
||
|
|
||
|
public: bool = False
|
||
|
|
||
|
# TODO: add a way to add a something which defines the required fields for a service
|
||
|
# - maybe a list of tuples with the field name and the type of the field
|
||
|
# this could be used to generate a form for the service, and also to validate
|
||
|
# the data saved in a JSONField on the ServiceAccess model
|