Initialize Fonrey Django multi-tenant project skeleton

Set up the required directory layout, app scaffolding, core settings, templates, static assets, and Docker/Tailwind tooling to establish a standardized development baseline.
This commit is contained in:
2026-04-26 17:12:09 +08:00
commit 4aba6dfa77
170 changed files with 1220 additions and 0 deletions

15
core/htmx.py Normal file
View File

@@ -0,0 +1,15 @@
from django.http import HttpResponse
def htmx_response(content="", status=200, toast=None, redirect=None):
"""
toast: {"type": "success|error|warning|info", "message": "..."}
"""
response = HttpResponse(content, status=status)
if toast:
import json
response["HX-Trigger"] = json.dumps({"fonrey:toast": toast})
if redirect:
response["HX-Redirect"] = redirect
return response