diff --git a/accounts/settings.py b/accounts/settings.py index 23fe864..f01c377 100644 --- a/accounts/settings.py +++ b/accounts/settings.py @@ -204,6 +204,7 @@ MEDIA_ROOT = BASE_DIR / 'media' STATIC_URL = '/static/' + if DEBUG == True: STATICFILES_DIRS = ( BASE_DIR / 'static', @@ -221,7 +222,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' LOGIN_URL = '/users/login/' -# LOGIN_REDIRECT_URL = '/' +# LOGIN_DEFAULT_REDIRECT_URL = '/' CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5" CRISPY_TEMPLATE_PACK = "bootstrap5" diff --git a/apps/users/urls.py b/apps/users/urls.py index 78b6ae9..0ada535 100644 --- a/apps/users/urls.py +++ b/apps/users/urls.py @@ -8,8 +8,8 @@ app_name = "users" urlpatterns = [ path('login/', OTPLoginView.as_view(), name='login'), path('logout/', LogoutView.as_view(), name='logout'), - path('profile/', ProfileDetailView.as_view(), name='profile_detail'), - path('profile/update/', ProfileUpdateView.as_view(), name='profile_update'), + path('account/', ProfileDetailView.as_view(), name='account_detail'), + path('account/update/', ProfileUpdateView.as_view(), name='account_update'), path('api/account/', AccountView.as_view(), name='account_api'), path('api/users/', UserListView.as_view(), name='user_list_api'), path('api/users//', UserDetailView.as_view(), name='user_detail_api'), diff --git a/apps/users/views.py b/apps/users/views.py index a364032..c0dddf3 100644 --- a/apps/users/views.py +++ b/apps/users/views.py @@ -122,6 +122,9 @@ class OTPLoginView(LoginView): """ form_class = OTPAuthenticationForm + def post(self, request, *args, **kwargs): + return super().post(request, *args, **kwargs) + @method_decorator(login_required, name='dispatch') class ProfileDetailView(DetailView): diff --git a/static/main.css b/static/main.css index 738e0d6..f8c88d1 100644 --- a/static/main.css +++ b/static/main.css @@ -1,102 +1,42 @@ -/*------------Fonts-------------*/ - -:root { - --bs-dark-rgb: 123, 21, 59; +.bd-placeholder-img { + font-size: 1.125rem; + text-anchor: middle; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } -html, body, h1, h2, h3, h4, h5, a, p, ul li, ol li, span, textarea, input { - font-family: 'pelak', serif !important; - text-decoration: none; +@media (min-width: 768px) { + .bd-placeholder-img-lg { + font-size: 3.5rem; + } +} + + +.b-example-divider { + height: 3rem; + background-color: rgba(0, 0, 0, .1); + border: solid rgba(0, 0, 0, .15); + border-width: 1px 0; + box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); } .bi { - vertical-align: -.125em; - fill: currentColor; + vertical-align: -.125em; + fill: currentColor; } body { - min-height: 100vh; + font-family: "Vazirmatn UI FD"; +} +.title { + font-family: "pelak"; + /*font-size: 110%;*/ + font-weight: bold; } -.right-bidi { - direction: rtl; - text-align: right; +jdp-container { + left: unset; + right: auto; } -.btn { - background-color: #7b153b; - border-color: #7b153b; -} - -.btn:hover { - background-color: #99546c; - border-color: #7b153b; -} - -.btn.btn-primary:active, -.btn.btn-primary:focus{ - background-color: #7b153b; !important; - border-color: #7b153b; !important; -} - -.btn-primary.disabled, .btn-primary:disabled { - color: #fff; - background-color: #99546c; - border-color: #7b153b; -} - - -.bg-dark { - --bs-bg-opacity: 1; - background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important; -} - -a, .nav-link, .page-link { - color: #7b153b; -} - -a:hover, .nav-link:focus, .nav-link:hover, .page-link:hover, .accordion-button:not(.collapsed) { - color: #99546c; -} - -.accordion-button:not(.collapsed) { - background-color: inherit; -} - -/* .ml-auto { - left: auto !important; - right: 0px; -} */ - -.rounded-5 { - border-radius: 1rem; -} - -hr.white { - width: 100%; - height: 1px; - border: 0; - opacity: 50%; -} - -.card-footer.home { - background: unset; - border-top: unset; -} - - -/*.rounded-top-home {*/ -/* border-top-right-radius: 0.75rem;*/ -/* border-top-left-radius: 0.75rem !important*/ -/*}*/ - -/*.rounded-bottom-home {*/ -/* border-bottom-right-radius: 0.75rem;*/ -/* border-bottom-left-radius: 0.75rem !important*/ -/*}*/ - -.nav-pills .nav-link.active, .nav-pills .show > .nav-link { - color: black!important; - background-color: white; - border-radius: 1.5rem; -} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 4169ee2..972b2d9 100644 --- a/templates/base.html +++ b/templates/base.html @@ -96,15 +96,15 @@
کلیه حقوق متعلق به - گروه وصال + گویال است.
توسعه - {# #} - بوستان - {# #} + + گویال +
diff --git a/templates/include/top_bar.html b/templates/include/top_bar.html index d816170..bb427d1 100644 --- a/templates/include/top_bar.html +++ b/templates/include/top_bar.html @@ -14,10 +14,6 @@
account
-
-
- -
@@ -26,7 +22,7 @@
{% if not user.is_authenticated %}
- + {% else %} {% endif %} diff --git a/templates/registration/logged_out.html b/templates/registration/logged_out.html index 3efee21..41049fd 100644 --- a/templates/registration/logged_out.html +++ b/templates/registration/logged_out.html @@ -1,4 +1,4 @@ -{% extends "base_generic.html" %} +{% extends "base.html" %} {% block content %} diff --git a/templates/users/login.html b/templates/users/login.html index 296f176..afed3b4 100755 --- a/templates/users/login.html +++ b/templates/users/login.html @@ -6,10 +6,10 @@ Login - - + + - + @@ -25,7 +25,7 @@ {#
#}
-
+ {% csrf_token %}