diff --git a/embark/dashboard/urls.py b/embark/dashboard/urls.py
index 4eb798af..17b87a88 100644
--- a/embark/dashboard/urls.py
+++ b/embark/dashboard/urls.py
@@ -9,6 +9,7 @@
# view routing
urlpatterns = [
+ path('', views.main_dashboard, name='embark-MainDashboard'),
path('dashboard/main/', views.main_dashboard, name='embark-MainDashboard'),
path('dashboard/service/', views.service_dashboard, name='embark-dashboard-service'),
path('dashboard/report/', views.report_dashboard, name='embark-ReportDashboard'),
diff --git a/embark/embark/settings/dev.py b/embark/embark/settings/dev.py
index beb66775..9de31948 100644
--- a/embark/embark/settings/dev.py
+++ b/embark/embark/settings/dev.py
@@ -82,6 +82,7 @@
SESSION_COOKIE_SAMESITE = 'Strict'
SESSION_COOKIE_HTTPONLY = True
+SESSION_COOKIE_SECURE = False
WSGI_APPLICATION = 'embark.wsgi.application'
@@ -187,16 +188,19 @@
AUTH_PASSWORD_VALIDATORS = [
{
- 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
+ "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
- 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
+ "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
+ "OPTIONS": {
+ "min_length": 8,
+ },
},
{
- 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
+ "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
- 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
+ "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]
@@ -226,10 +230,10 @@
# STATICFILES_FINDERS
# URL of Login-Page
-LOGIN_URL = ''
+LOGIN_URL = 'user/login/'
# URL of Logout-Page
-LOGOUT_REDIRECT_URL = ''
+LOGOUT_REDIRECT_URL = 'user/logout'
# Added for FIle storage to get the path to save Firmware images.
MEDIA_ROOT = os.path.join(BASE_DIR.parent, 'media')
@@ -272,6 +276,7 @@
},
},
}
+# TODO check this https://docs.djangoproject.com/en/5.1/topics/cache/
TEMP_DIR = Path("/tmp/")
try:
diff --git a/embark/templates/user/accountDelete.html b/embark/templates/user/accountDelete.html
index 6e673b50..b601123f 100644
--- a/embark/templates/user/accountDelete.html
+++ b/embark/templates/user/accountDelete.html
@@ -6,21 +6,21 @@
{% block maincontent %}
{% endblock maincontent %}
\ No newline at end of file
diff --git a/embark/templates/user/email_template.html b/embark/templates/user/email_template_activation.html
similarity index 68%
rename from embark/templates/user/email_template.html
rename to embark/templates/user/email_template_activation.html
index e3e99f33..bad556a5 100644
--- a/embark/templates/user/email_template.html
+++ b/embark/templates/user/email_template_activation.html
@@ -2,7 +2,7 @@
Dear {{ username }},
Please follow the link to confirm your registration,
-http://{{ domain }}{% url 'activate' user_id=uid activation_token=token %}
+http://{{ domain }}{% url 'embark-activate-user' user_id=uid token=token %}
OR manually input the following token: {{ token }}
{% endautoescape %}
\ No newline at end of file
diff --git a/embark/templates/user/email_template_deactivation.html b/embark/templates/user/email_template_deactivation.html
new file mode 100644
index 00000000..0c005dec
--- /dev/null
+++ b/embark/templates/user/email_template_deactivation.html
@@ -0,0 +1,8 @@
+{% autoescape off %}
+Dear {{ username }},
+
+Please follow the link to confirm the account deletion,
+http://{{ domain }}{% url 'embark-deactivate-user' user_id=uid activation_token=token %}
+
+OR manually input the following token: {{ token }}
+{% endautoescape %}
\ No newline at end of file
diff --git a/embark/templates/user/index.html b/embark/templates/user/index.html
index 3bd3389c..1fdbe3f0 100644
--- a/embark/templates/user/index.html
+++ b/embark/templates/user/index.html
@@ -5,6 +5,14 @@
{% block navigation %}{% include "navigation.html" %}{% endblock navigation %}
{% block maincontent %}
+{% if user.is_staff %}
+
+{% endif %}
{% block timezone %}{% include "user/timezone.html" %}{% endblock timezone %}
diff --git a/embark/templates/user/login.html b/embark/templates/user/login.html
index cdb37bc9..e2489889 100644
--- a/embark/templates/user/login.html
+++ b/embark/templates/user/login.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load static %}
+{% load django_bootstrap5 %}
{% block style %}{% endblock style %}
{% block title %}EMBArk login{% endblock title %}
{% block maincontent %}
@@ -15,24 +16,23 @@ New Version 0.1
New New Buttons everywhere
+
{% endblock maincontent %}
\ No newline at end of file
diff --git a/embark/templates/user/register.html b/embark/templates/user/register.html
index cd4d4500..ec70bf3c 100644
--- a/embark/templates/user/register.html
+++ b/embark/templates/user/register.html
@@ -6,9 +6,9 @@
{% block maincontent %}