From 889bde7ba67f8d4dfe62991fba22a750e3d00f69 Mon Sep 17 00:00:00 2001 From: Furkan Date: Mon, 29 May 2023 13:54:06 +0300 Subject: [PATCH] Refactored settings route --- .gitignore | 2 ++ ozgursozluk/configs.py | 7 +++++ ozgursozluk/templates/settings.html | 11 +++++++ ozgursozluk/views.py | 47 +++++++---------------------- 4 files changed, 31 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index 68bc17f..a6c8d34 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,5 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + +Pipfile* \ No newline at end of file diff --git a/ozgursozluk/configs.py b/ozgursozluk/configs.py index 9c6e596..8487e10 100644 --- a/ozgursozluk/configs.py +++ b/ozgursozluk/configs.py @@ -9,6 +9,13 @@ DEFAULT_DISPLAY_PINNED_TOPICS: Final = "true" DEFAULT_DISPLAY_AUTHOR_NICKNAMES: Final = "false" DEFAULT_EKSI_SOZLUK_BASE_URL: Final = "https://eksisozluk.com" +DEFAULT_COOKIES: Final = { + "theme": DEFAULT_THEME, + "display_pinned_topics": DEFAULT_DISPLAY_PINNED_TOPICS, + "display_author_nicknames": DEFAULT_DISPLAY_AUTHOR_NICKNAMES, + "eksi_sozluk_base_url": DEFAULT_EKSI_SOZLUK_BASE_URL +} + themes: Final = [ "light", "dark", diff --git a/ozgursozluk/templates/settings.html b/ozgursozluk/templates/settings.html index 2852236..479da64 100644 --- a/ozgursozluk/templates/settings.html +++ b/ozgursozluk/templates/settings.html @@ -40,6 +40,17 @@ {% endfor %} +
+ display entry favorite count: + +
ekşi sözlük base url: