diff --git a/config/settings/base.py b/config/settings/base.py index 8ff8bbf..e84e3bd 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -45,6 +45,10 @@ PROJECT_APPS = [ INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + PROJECT_APPS + +if DEBUG: + INSTALLED_APPS += ["django_browser_reload"] + PROJECT_MIDDLEWARE = [] DJANGO_MIDDLEWARE = [ @@ -62,7 +66,7 @@ MIDDLEWARE = DJANGO_MIDDLEWARE + PROJECT_MIDDLEWARE if DEBUG: INSTALLED_APPS += ["silk"] - MIDDLEWARE += ["silk.middleware.SilkyMiddleware"] + MIDDLEWARE += ["silk.middleware.SilkyMiddleware", "django_browser_reload.middleware.BrowserReloadMiddleware",] ROOT_URLCONF = "config.urls" diff --git a/config/urls.py b/config/urls.py index 729307d..e1ce1f6 100644 --- a/config/urls.py +++ b/config/urls.py @@ -16,4 +16,4 @@ urlpatterns = [ if settings.DEBUG: urlpatterns.append(path("__debug__/", include(debug_toolbar.urls))) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) - urlpatterns += [path("silk/", include("silk.urls"))] + urlpatterns += [path("silk/", include("silk.urls")), path("__reload__/", include("django_browser_reload.urls")),] diff --git a/requirements.test.txt b/requirements.test.txt index 63ab765..e75a7c9 100644 --- a/requirements.test.txt +++ b/requirements.test.txt @@ -3,3 +3,4 @@ pytest==7.3.0 pytest-django==4.8.0 coverage==7.2.3 pytest-cov==4.0.0 +django-browser-reload==1.17.0 diff --git a/users/forms/login.py b/users/forms/login.py index 0b1be59..e969454 100644 --- a/users/forms/login.py +++ b/users/forms/login.py @@ -8,9 +8,9 @@ class LoginForm(AuthenticationForm): widget=forms.TextInput( attrs={ "autofocus": True, - "class": "my-2 bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600" + "class": "my-2 bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 " "focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600" - "dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500", + "dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500", } ) ) @@ -22,7 +22,7 @@ class LoginForm(AuthenticationForm): "autocomplete": "current-password", "class": "my-2 bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 " "focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 " - "dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500", + "dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500", } ), ) diff --git a/web/templates/components/cart/add_to_cart.html b/web/templates/components/cart/add_to_cart.html index e37169f..2a18cfa 100644 --- a/web/templates/components/cart/add_to_cart.html +++ b/web/templates/components/cart/add_to_cart.html @@ -2,7 +2,12 @@
{% csrf_token %} - + +
+