phase1: bootstrap containerized django stack and project scaffold
This commit is contained in:
0
apps/__init__.py
Normal file
0
apps/__init__.py
Normal file
0
apps/core/__init__.py
Normal file
0
apps/core/__init__.py
Normal file
6
apps/core/apps.py
Normal file
6
apps/core/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class CoreConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "apps.core"
|
||||
0
apps/core/migrations/__init__.py
Normal file
0
apps/core/migrations/__init__.py
Normal file
8
apps/core/urls.py
Normal file
8
apps/core/urls.py
Normal file
@ -0,0 +1,8 @@
|
||||
from django.urls import path
|
||||
|
||||
from .views import health, home
|
||||
|
||||
urlpatterns = [
|
||||
path("", home, name="home"),
|
||||
path("health/", health, name="health"),
|
||||
]
|
||||
10
apps/core/views.py
Normal file
10
apps/core/views.py
Normal file
@ -0,0 +1,10 @@
|
||||
from django.http import JsonResponse
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
def home(request):
|
||||
return render(request, "home.html")
|
||||
|
||||
|
||||
def health(request):
|
||||
return JsonResponse({"status": "ok"})
|
||||
Reference in New Issue
Block a user