From 95d919ae59de021b70583dc5e1561d13eb50909a Mon Sep 17 00:00:00 2001 From: dnikolay-ebc Date: Fri, 15 Jul 2022 12:10:38 +0000 Subject: [PATCH 1/6] Create PR for #11 From dc46507c3240dda03f2c93a8150ff3b964d776bb Mon Sep 17 00:00:00 2001 From: dnikolay-ebc Date: Fri, 15 Jul 2022 14:18:14 +0200 Subject: [PATCH 2/6] chore: exclude js/css frameworks from language detection --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..2467a2e4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# Ignore in language detection +app/Entirety/static/bootstrap/* linguist-vendored +app/Entirety/static/htmx/* linguist-vendored From 1ff5acac1ded69eeef6a8b88d2a5475c79003dc8 Mon Sep 17 00:00:00 2001 From: dnikolay-ebc Date: Fri, 15 Jul 2022 14:23:08 +0200 Subject: [PATCH 3/6] chore: use lowercase branch names --- .github/issue-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/issue-branch.yml b/.github/issue-branch.yml index e462353d..b7cc7d9e 100644 --- a/.github/issue-branch.yml +++ b/.github/issue-branch.yml @@ -1,5 +1,5 @@ # configuration file for automatic issue branch creation -branchName: '${issue.number}-${issue.title}' +branchName: '${issue.number}-${issue.title,}' silent: true autoCloseIssue: true gitSafeReplacementChar: '-' From d4d862de39c808cb8b8a4d2a5744aca1679423c6 Mon Sep 17 00:00:00 2001 From: dnikolay-ebc Date: Fri, 15 Jul 2022 15:03:10 +0200 Subject: [PATCH 4/6] fix: use oidc auth in django admin --- README.md | 2 ++ app/Entirety/entirety/urls.py | 2 ++ app/Entirety/entirety/views.py | 11 +++++++++++ 3 files changed, 15 insertions(+) diff --git a/README.md b/README.md index 1e1cf320..bde4b6a5 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,8 @@ See [changelog](./docs/CHANGELOG.md) for detailed overview of changes. [@sbanoeon](https://github.com/sbanoeon) +[@djs0109](https://github.com/djs0109) + [@dnikolay-ebc](https://github.com/dnikolay-ebc) ## License diff --git a/app/Entirety/entirety/urls.py b/app/Entirety/entirety/urls.py index 84c7c751..308d0640 100644 --- a/app/Entirety/entirety/urls.py +++ b/app/Entirety/entirety/urls.py @@ -23,7 +23,9 @@ handler403 = "entirety.views.custom_permission_denied_view" handler400 = "entirety.views.custom_bad_request_view" + urlpatterns = [ + path("admin/login/", views.CustomLogin.as_view()), path("admin/", admin.site.urls), path("", views.home, name="home"), path("projects/", include("projects.urls")), diff --git a/app/Entirety/entirety/views.py b/app/Entirety/entirety/views.py index cb0c3dac..1c9e6557 100644 --- a/app/Entirety/entirety/views.py +++ b/app/Entirety/entirety/views.py @@ -1,6 +1,17 @@ import requests +from django.http import HttpResponseRedirect +from django.urls import reverse from django.shortcuts import render +from django.views.generic import View + + +class CustomLogin(View): + def get(self, request, **kwargs): + return HttpResponseRedirect( + reverse("oidc_authentication_init") + + ("?next={}".format(request.GET["next"]) if "next" in request.GET else "") + ) def home(request): From 11e84045048d9ae4285d092446ca2702815a0eba Mon Sep 17 00:00:00 2001 From: dnikolay-ebc Date: Fri, 15 Jul 2022 15:32:24 +0200 Subject: [PATCH 5/6] chore: exclude js/css frameworks from language detection --- .gitattributes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 2467a2e4..4843d9db 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,3 @@ # Ignore in language detection -app/Entirety/static/bootstrap/* linguist-vendored -app/Entirety/static/htmx/* linguist-vendored +app/Entirety/static/bootstrap/** linguist-vendored +app/Entirety/static/htmx/** linguist-vendored From f0ec3bad5c2db157af6e55aebbbb83acc07838fc Mon Sep 17 00:00:00 2001 From: dnikolay-ebc Date: Fri, 15 Jul 2022 15:33:31 +0200 Subject: [PATCH 6/6] chore: fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bde4b6a5..cf17ce89 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ pip ```bash - cd ./app/entirety + cd ./app/Entirety pip install -r requirements.txt ```