From 6d1607511442c5a7ee70bbecb2c7e61440e9574f Mon Sep 17 00:00:00 2001 From: adilhan Date: Tue, 14 Oct 2025 18:30:25 +0600 Subject: [PATCH 01/27] commit --- Procfile.tailwind | 2 + config/settings.py | 14 + config/urls.py | 5 + templates/accounts/add_staff.html | 167 +- templates/accounts/add_student.html | 319 ++- templates/accounts/edit_lecturer.html | 309 ++- templates/accounts/edit_student.html | 146 +- templates/accounts/edit_student_program.html | 335 ++- templates/accounts/lecturer_list.html | 391 ++- templates/accounts/parent_form.html | 280 ++- templates/accounts/profile.html | 335 ++- templates/accounts/profile_single.html | 306 ++- templates/accounts/student_list.html | 402 +++- templates/base.html | 83 +- templates/core/dashboard.html | 942 ++++---- templates/core/index.html | 259 +- templates/core/post_add.html | 100 +- templates/core/semester_list.html | 408 +++- templates/core/semester_update.html | 100 +- templates/core/session_list.html | 175 +- templates/core/session_update.html | 125 +- templates/course/course_add.html | 344 ++- templates/course/course_allocation_form.html | 96 +- templates/course/course_allocation_view.html | 241 +- templates/course/course_registration.html | 527 ++-- templates/course/course_single.html | 478 ++-- templates/course/program_add.html | 335 ++- templates/course/program_list.html | 377 ++- templates/course/program_single.html | 269 ++- templates/course/user_course_list.html | 426 +++- templates/navbar.html | 284 ++- templates/payments/charge.html | 110 +- templates/registration/login.html | 183 +- templates/registration/password_reset.html | 125 +- .../registration/password_reset_complete.html | 94 +- .../registration/password_reset_confirm.html | 148 +- .../registration/password_reset_done.html | 217 +- templates/registration/register.html | 282 ++- templates/result/add_score.html | 314 ++- templates/result/add_score_for.html | 323 ++- templates/result/assessment_results.html | 295 ++- templates/result/grade_results.html | 426 ++-- templates/search/search_view.html | 319 ++- templates/setting/admin_panel.html | 20 +- templates/sidebar.html | 461 ++-- templates/snippets/filter_form.html | 76 +- templates/snippets/messages.html | 71 +- theme/__init__.py | 0 theme/apps.py | 5 + theme/static_src/.gitignore | 1 + theme/static_src/package-lock.json | 2119 +++++++++++++++++ theme/static_src/package.json | 26 + theme/static_src/postcss.config.js | 7 + theme/static_src/src/styles.css | 11 + theme/templates/base.html | 59 + 55 files changed, 11511 insertions(+), 2761 deletions(-) create mode 100644 Procfile.tailwind create mode 100644 theme/__init__.py create mode 100644 theme/apps.py create mode 100644 theme/static_src/.gitignore create mode 100644 theme/static_src/package-lock.json create mode 100644 theme/static_src/package.json create mode 100644 theme/static_src/postcss.config.js create mode 100644 theme/static_src/src/styles.css create mode 100644 theme/templates/base.html diff --git a/Procfile.tailwind b/Procfile.tailwind new file mode 100644 index 00000000..bd986290 --- /dev/null +++ b/Procfile.tailwind @@ -0,0 +1,2 @@ +django: python manage.py runserver +tailwind: python manage.py tailwind start \ No newline at end of file diff --git a/config/settings.py b/config/settings.py index 43f70b16..7435b16e 100644 --- a/config/settings.py +++ b/config/settings.py @@ -45,7 +45,15 @@ "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", + "tailwind", + "theme", ] +if DEBUG: + # Add django_browser_reload only in DEBUG mode + DJANGO_APPS += ['django_browser_reload'] + +TAILWIND_APP_NAME = 'theme' + # Third party apps THIRD_PARTY_APPS = [ @@ -79,6 +87,12 @@ "django.middleware.locale.LocaleMiddleware", "whitenoise.middleware.WhiteNoiseMiddleware", # whitenoise to serve static files ] +if DEBUG: + # Add django_browser_reload middleware only in DEBUG mode + MIDDLEWARE += [ + "django_browser_reload.middleware.BrowserReloadMiddleware", + ] + ROOT_URLCONF = "config.urls" diff --git a/config/urls.py b/config/urls.py index 74aa797b..1fcb4b0d 100644 --- a/config/urls.py +++ b/config/urls.py @@ -28,6 +28,11 @@ path("payments/", include("payments.urls")), ) +if settings.DEBUG: + # Include django_browser_reload URLs only in DEBUG mode + urlpatterns += [ + path("__reload__/", include("django_browser_reload.urls")), + ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) diff --git a/templates/accounts/add_staff.html b/templates/accounts/add_staff.html index 57861c23..4752be79 100644 --- a/templates/accounts/add_staff.html +++ b/templates/accounts/add_staff.html @@ -4,38 +4,173 @@ {% load crispy_forms_tags %} {% load static %} + {% block content %} -