From 88fef5e3c4cf88c7cf911ca0088e512dffe5cece Mon Sep 17 00:00:00 2001 From: Felix Sargent Date: Thu, 25 Jul 2024 11:04:16 -0700 Subject: [PATCH] Removed email confirmation, fixed alert styling. --- approval_polls/settings.py | 8 ++------ approval_polls/staticfiles/scss/custom.scss | 3 +-- approval_polls/staticfiles/style.css | 0 approval_polls/templates/base.html | 6 +++++- approval_polls/templates/my_info.html | 19 ++----------------- approval_polls/templates/my_polls.html | 4 ++-- 6 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 approval_polls/staticfiles/style.css diff --git a/approval_polls/settings.py b/approval_polls/settings.py index ceef30a..0c422d3 100644 --- a/approval_polls/settings.py +++ b/approval_polls/settings.py @@ -13,6 +13,7 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__)) environ.Env.read_env(os.path.join(os.path.dirname(BASE_DIR), ".env")) DEBUG = env("DEBUG") +print(DEBUG) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ @@ -33,9 +34,6 @@ if DEBUG: db_path = os.path.join(BASE_DIR, "db.sqlite3") - CSRF_TRUSTED_ORIGINS = ["http://localhost:8000", "http://127.0.0.1:8000"] - CSRF_ALLOWED_ORIGINS = ["http://localhost:8000", "http://127.0.0.1:8000"] - CORS_ORIGINS_WHITELIST = ["http://localhost:8000", "http://127.0.0.1:8000"] ALLOWED_HOSTS.extend(["localhost", "0.0.0.0", "127.0.0.1"]) # trunk-ignore(bandit) if not DEBUG: @@ -276,7 +274,7 @@ ACCOUNT_USERNAME_REQUIRED = True SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = True SOCIALACCOUNT_EMAIL_AUTHENTICATION = True -ACCOUNT_EMAIL_VERIFICATION = "optional" +ACCOUNT_EMAIL_VERIFICATION = "none" ACCOUNT_CONFIRM_EMAIL_ON_GET = True ACCOUNT_AUTHENTICATION_METHOD = "username_email" ACCOUNT_EMAIL_REQUIRED = True @@ -285,6 +283,4 @@ ACCOUNT_DEFAULT_HTTP_PROTOCOL = env( "ACCOUNT_DEFAULT_HTTP_PROTOCOL", str, default="https" ) -# ACCOUNT_LOGIN_ATTEMPTS_LIMIT = 5 # or any reasonable number -ACCOUNT_RATE_LIMITS = False ACCOUNT_FORMS = {"signup": "approval_polls.forms.CustomSignupForm"} diff --git a/approval_polls/staticfiles/scss/custom.scss b/approval_polls/staticfiles/scss/custom.scss index c94a3f9..7c64c60 100644 --- a/approval_polls/staticfiles/scss/custom.scss +++ b/approval_polls/staticfiles/scss/custom.scss @@ -2,7 +2,7 @@ $primary: #000000; $secondary: #ffffff; $success: #000000; -$info: #ffffff; +$info: #f8f9fa; // Light gray for info messages. $warning: #aa4a44; $danger: #aa4a44; $light: #ffffff; @@ -133,7 +133,6 @@ body { @each $color, $value in $theme-colors { .alert-#{$color} { color: $primary; - background-color: $value; border-color: $primary; } } diff --git a/approval_polls/staticfiles/style.css b/approval_polls/staticfiles/style.css deleted file mode 100644 index e69de29..0000000 diff --git a/approval_polls/templates/base.html b/approval_polls/templates/base.html index 050d62b..c46dc4f 100644 --- a/approval_polls/templates/base.html +++ b/approval_polls/templates/base.html @@ -37,7 +37,6 @@ integrity="sha512-pZ0i46J1zsMwPd2NQZ4IaL427jXE2RVHMk3uv/wPTNlBVp9AbB1L65/4YdrXRPLEmyZCkY9qYOOsQp44V4orHg==" crossorigin="anonymous" referrerpolicy="no-referrer"> - {% load compress %} {% compress css %}
+ {% if messages %} +
+ {% for message in messages %}
{{ message }}
{% endfor %} +
+ {% endif %} {% block content %} {% endblock content %}
diff --git a/approval_polls/templates/my_info.html b/approval_polls/templates/my_info.html index 55057b8..f8068eb 100644 --- a/approval_polls/templates/my_info.html +++ b/approval_polls/templates/my_info.html @@ -11,14 +11,6 @@

My User Profile

Personal Information

-
First Name:
-
- {{ current_user.first_name }} -
-
Last Name:
-
- {{ current_user.last_name }} -
Username:
{{ current_user.username }} @@ -50,13 +42,6 @@

Personal Information

My Polls

- {% if messages %} -
- {% for message in messages %} -
{{ message }}
- {% endfor %} -
- {% endif %} {% if latest_poll_list %} {% for poll in latest_poll_list %}
@@ -84,7 +69,7 @@

- Previous + Previous {% endif %} @@ -96,7 +81,7 @@

- Next + Next {% endif %} diff --git a/approval_polls/templates/my_polls.html b/approval_polls/templates/my_polls.html index 5eb506c..87b2296 100644 --- a/approval_polls/templates/my_polls.html +++ b/approval_polls/templates/my_polls.html @@ -33,7 +33,7 @@

- Previous + Previous {% endif %} @@ -45,7 +45,7 @@
- Next + Next {% endif %}