first commit
This commit is contained in:
0
config/__init__.py
Normal file
0
config/__init__.py
Normal file
16
config/asgi.py
Normal file
16
config/asgi.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
ASGI config for config project.
|
||||
|
||||
It exposes the ASGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
|
||||
|
||||
application = get_asgi_application()
|
||||
52
config/urls.py
Normal file
52
config/urls.py
Normal file
@@ -0,0 +1,52 @@
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from dashboard import views as dashboard_views
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
|
||||
# ─── DASHBOARD UTAMA ───
|
||||
path('', dashboard_views.dashboard_view, name='dashboard'),
|
||||
|
||||
# ─── API DATA KWH (ESP32 & Realtime) ───
|
||||
path('api/data/', dashboard_views.api_latest_data, name='api_data'),
|
||||
path('api/kwh/push/', dashboard_views.receive_kwh_data, name='receive_kwh_data'),
|
||||
|
||||
# ─── LOG KWH & EXPORT ───
|
||||
path('log-kwh/', dashboard_views.log_kwh_view, name='log_kwh'),
|
||||
path('api/log-data/', dashboard_views.api_log_data, name='api_log_data'),
|
||||
path('api/export-excel/', dashboard_views.export_kwh_excel, name='export_kwh_excel'),
|
||||
|
||||
# ─── ANALISIS GRAFIK ───
|
||||
path('analisis-grafik/', dashboard_views.analisis_grafik_view, name='analisis_grafik'),
|
||||
path('api/analysis-data/', dashboard_views.api_analysis_data, name='api_analysis_data'),
|
||||
path('api/export-analysis-excel/', dashboard_views.export_analysis_excel, name='export_analysis_excel'),
|
||||
|
||||
# ─── AUTENTIKASI / ACCOUNTS ───
|
||||
path('accounts/', include('accounts.urls')),
|
||||
path('login/', include('accounts.urls')),
|
||||
|
||||
# ─── MANAJEMEN MESIN & AREA ───
|
||||
path('manajemen-mesin/', dashboard_views.manajemen_mesin_view, name='manajemen_mesin'),
|
||||
path('api/mesin/add/', dashboard_views.add_mesin_api, name='add_mesin_api'),
|
||||
path('api/area/add/', dashboard_views.add_area_api, name='add_area_api'),
|
||||
path('dashboard/mesin/update-keterangan/<int:mesin_id>/', dashboard_views.update_keterangan_view, name='update_keterangan'),
|
||||
|
||||
# ─── REPORT PER AREA ───
|
||||
path('report-per-area/', dashboard_views.report_per_area_view, name='report_per_area'),
|
||||
path('api/report-area-data/', dashboard_views.api_report_per_area, name='api_report_area_data'),
|
||||
path('api/export-excel-area/', dashboard_views.export_report_area_excel, name='export_report_area_excel'),
|
||||
|
||||
# ─── REPORT ALL (SELURUH AREA) ───
|
||||
path('report-all/', dashboard_views.report_all_view, name='report_all'),
|
||||
path('api/report-all-data/', dashboard_views.api_report_all_data, name='api_report_all_data'),
|
||||
|
||||
# Jalur routing baru untuk update status mesin
|
||||
path('dashboard/mesin/update-status/<int:mesin_id>/', dashboard_views.update_status_view, name='update_status_mesin'),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
]
|
||||
16
config/wsgi.py
Normal file
16
config/wsgi.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
WSGI config for config project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
|
||||
|
||||
application = get_wsgi_application()
|
||||
Reference in New Issue
Block a user