chore(core): scaffold Django core structure with settings, urls, asgi, wsgi
- New Features - Add core project entry points (asgi.py, wsgi.py, urls.py) - Create settings hierarchy (base.py, production.py) with environment parsing - Configure DRF, JWT, Swagger, Tailwind, and HTMX defaults out‑of‑the‑box- Enhancements - Set up CORS and security defaults for dev and prod environments - Enable WhiteNoise and Tailwind CLI for static file handling
This commit is contained in:
8 files changed
+369
No files matched your search
@@ -0,0 +1,30 @@
|
||||
"""generated with djinit"""
|
||||
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.urls import include
|
||||
from django.conf import settings
|
||||
from drf_spectacular.views import (
|
||||
SpectacularAPIView,
|
||||
SpectacularSwaggerView,
|
||||
)
|
||||
from rest_framework_simplejwt.views import (
|
||||
TokenObtainPairView,
|
||||
TokenRefreshView,
|
||||
TokenBlacklistView,
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
# JWT tokens
|
||||
path("token/", TokenObtainPairView.as_view(), name="token_obtain_pair"),
|
||||
path("token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
|
||||
path("token/blacklist/", TokenBlacklistView.as_view(), name="token_blacklist"),
|
||||
]
|
||||
|
||||
# Don't show schema in production
|
||||
if settings.DEBUG:
|
||||
urlpatterns += [
|
||||
path("schema/", SpectacularAPIView.as_view(), name="schema"),
|
||||
path("docs/", SpectacularSwaggerView.as_view(url_name="schema")),
|
||||
]
|
||||
Reference in new issue
Block a user