Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def env_list(name, default=None):
# No models. Installed so its AppConfig runs and registers the session checks.
LOCAL_APPS = [
"fusion_auth",
"modules.elm",
]

# Each module is an independent Django app: own tables, migrations and contract.
Expand Down
1 change: 1 addition & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from core.api.health import healthz, readyz

urlpatterns = [
path("elm/", include("modules.elm.api.urls")),
path("healthz", healthz, name="healthz"),
path("readyz", readyz, name="readyz"),
path("api/v1/", include("fusion_auth.urls")),
Expand Down
1 change: 1 addition & 0 deletions modules/elm/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file marks the directory as a Python package
1 change: 1 addition & 0 deletions modules/elm/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file marks the directory as a Python package
1 change: 1 addition & 0 deletions modules/elm/api/serializers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# No serializer needed for this read-only endpoint
6 changes: 6 additions & 0 deletions modules/elm/api/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.urls import path
from .views import ELMDataViewSet

urlpatterns = [
path('', ELMDataViewSet.as_view({'get': 'list'})),
]
12 changes: 12 additions & 0 deletions modules/elm/api/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework import status

class ELMDataViewSet(viewsets.ViewSet):
def list(self, request):
metadata = {
"label": "elm",
"description": "ELM module metadata",
"version": "1.0.0"
}
return Response(metadata, status=status.HTTP_200_OK)
5 changes: 5 additions & 0 deletions modules/elm/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig

class ElmConfig(AppConfig):
name = 'modules.elm'
verbose_name = 'ELM'
4 changes: 4 additions & 0 deletions modules/elm/registry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from modules.elm.apps import ElmConfig

def register():
return ElmConfig.name