1 Commits

Author SHA1 Message Date
25ae3626b7 Merge pull request #9 from ferdzo/feature/react-frontend
React frontend
2026-04-28 17:44:31 +02:00
5 changed files with 5 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'iotDashboard.settings')
# Import Django settings and configure password hasher manually
from django.conf import settings
if not settings.configured:
from iotDashboard.settings import SECRET_KEY
from iotDashboard.settings import *
settings.configure(
PASSWORD_HASHERS=[
'django.contrib.auth.hashers.PBKDF2PasswordHasher',

View File

@@ -10,6 +10,7 @@ PostgreSQL is chosen over Redis because:
"""
from django.db import models
from django.utils import timezone
class DashboardLayout(models.Model):

View File

@@ -7,7 +7,7 @@ Shows how weather and air quality affect health metrics.
from typing import Dict, List, Optional
from dataclasses import dataclass
from datetime import datetime
from datetime import datetime, timedelta
@dataclass

View File

@@ -5,7 +5,7 @@ Combines weather, air quality, and health data to determine if conditions are su
Provides time-based recommendations and personalized insights.
"""
from typing import List, Optional, Tuple
from typing import Dict, List, Optional, Tuple
from dataclasses import dataclass
from datetime import datetime, time

View File

@@ -405,7 +405,7 @@ Keep all text concise: summary under 50 words, each item under 20 words.""",
try:
dt = datetime.fromisoformat(current_time.replace('Z', '+00:00'))
time_str = dt.strftime("%A, %B %d at %I:%M %p")
except (ValueError, AttributeError):
except:
time_str = current_time
context_sections.append(f"Current Time: {time_str}")