2025-09-07 20:52:19 +02:00
|
|
|
from api.views import ping, secure_ping
|
2025-09-05 12:02:41 +02:00
|
|
|
from django.conf import settings
|
|
|
|
from django.contrib import admin
|
|
|
|
from django.urls import path, include
|
Add FontAwesome webfonts and update templates for Risiko Management
- Added FontAwesome webfont files: fa-brands-400.woff2, fa-regular-400.woff2, fa-solid-900.woff2, and fa-v4compatibility.woff2.
- Updated base.html to include FontAwesome stylesheet.
- Renamed the application title from "Risiko Management" to "ISO27001 Management".
- Enhanced navigation menu with dynamic active states for Dashboard, Statistics, Risks, Controls, and Incidents.
- Created new templates for dashboard, controls, incidents, risks, and statistics with breadcrumb navigation.
2025-09-07 23:07:56 +02:00
|
|
|
from django.shortcuts import render, redirect
|
2025-09-07 20:52:19 +02:00
|
|
|
from rest_framework import routers
|
|
|
|
from risks.views import RiskViewSet, ControlViewSet, ResidualRiskViewSet, UserViewSet, AuditViewSet
|
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
|
|
|
router.register(r"risks", RiskViewSet)
|
|
|
|
router.register(r"controls", ControlViewSet)
|
|
|
|
router.register(r"residual-risks", ResidualRiskViewSet)
|
|
|
|
router.register(r"users", UserViewSet)
|
|
|
|
router.register(r"logs", AuditViewSet)
|
2025-09-05 12:02:41 +02:00
|
|
|
|
|
|
|
urlpatterns = [
|
2025-09-22 07:34:49 +02:00
|
|
|
# Risk Management
|
|
|
|
path("", include("risks.urls", namespace="risks")),
|
|
|
|
# Admin
|
2025-09-05 12:02:41 +02:00
|
|
|
path("admin/", admin.site.urls),
|
2025-09-22 07:34:49 +02:00
|
|
|
# Login/Logout
|
Refactor risk management application with enhanced localization, user authentication, and UI improvements
- Added verbose names for Incident and ResidualRisk models for better clarity in admin interface.
- Updated impact choices for ResidualRisk and Risk models to ensure consistency and clarity.
- Implemented gettext_lazy for translatable strings in models and choices.
- Enhanced the Risk, ResidualRisk, Control, AuditLog, and Incident models with Meta options for better admin representation.
- Added login required decorators to views for improved security.
- Introduced new CSS variables and classes for better visual representation of risk levels.
- Created custom template tags for dynamic CSS class assignment based on risk likelihood and impact.
- Improved dashboard and statistics views with user authentication checks.
- Updated templates for risks, controls, incidents, and admin interface to include edit and delete options for staff users.
- Added new login and logout templates for user authentication.
- Enhanced list views for risks, controls, and incidents to include action buttons for staff users.
- Improved overall UI/UX with Bulma CSS framework for a more modern look and feel.
2025-09-09 14:25:59 +02:00
|
|
|
path("accounts/", include("django.contrib.auth.urls")),
|
2025-09-22 07:34:49 +02:00
|
|
|
# Language Switch
|
|
|
|
path("i18n/", include("django.conf.urls.i18n")),
|
|
|
|
# API
|
|
|
|
path("api/", include(router.urls)),
|
|
|
|
path("api/ping/", ping),
|
|
|
|
path("api/secure-ping/", secure_ping),
|
2025-09-05 12:02:41 +02:00
|
|
|
]
|
|
|
|
|
2025-09-05 15:32:33 +02:00
|
|
|
# Add OIDC routes only if Single Sign-On is enabled
|
2025-09-05 12:02:41 +02:00
|
|
|
if settings.SSO_ENABLED:
|
|
|
|
urlpatterns += [
|
|
|
|
path("oidc/", include("mozilla_django_oidc.urls")),
|
2025-09-05 15:32:33 +02:00
|
|
|
]
|