[extensions-web/backports: 3/6] Formatted code




commit 9f4fc11c97d5f41db58a895b8fe349e6aeb8e426
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sun Nov 22 12:03:34 2020 +0400

    Formatted code

 sweettooth/auth/urls.py | 6 ++++--
 sweettooth/settings.py  | 9 ++++++---
 sweettooth/urls.py      | 1 +
 3 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/sweettooth/auth/urls.py b/sweettooth/auth/urls.py
index ca5f5d3..89dcd8e 100644
--- a/sweettooth/auth/urls.py
+++ b/sweettooth/auth/urls.py
@@ -1,10 +1,12 @@
 
-from django.views.generic.base import TemplateView
 from django.conf.urls import include
-from django_registration.backends.activation.views import RegistrationView
 from django.contrib.auth import views as auth_views
 from django.contrib.auth.views import LoginView, LogoutView
 from django.urls import re_path
+from django.views.generic.base import TemplateView
+
+from django_registration.backends.activation.views import RegistrationView
+
 from sweettooth.auth import views, forms
 
 urlpatterns = [
diff --git a/sweettooth/settings.py b/sweettooth/settings.py
index d84cec0..6e3644c 100644
--- a/sweettooth/settings.py
+++ b/sweettooth/settings.py
@@ -6,8 +6,8 @@ https://docs.djangoproject.com/en/stable/ref/settings/
 """
 
 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
-import dj_database_url
 import os
+import dj_database_url
 
 SITE_ROOT = os.path.dirname(os.path.abspath(__file__))
 
@@ -122,7 +122,10 @@ USE_L10N = True
 USE_TZ = False
 
 ADMINS = (
-    (os.getenv('EGO_ADMINISTRATOR_NAME') or 'Administrator', os.getenv('EGO_ADMINISTRATOR_EMAIL') or 
'admin@localhost.local'),
+    (
+        os.getenv('EGO_ADMINISTRATOR_NAME') or 'Administrator',
+        os.getenv('EGO_ADMINISTRATOR_EMAIL') or 'admin@localhost.local'
+    ),
 )
 
 MANAGERS = ADMINS
@@ -197,5 +200,5 @@ if not DEBUG and not NO_SECURE_SETTINGS:
 if DEBUG and not NO_STATICFILES_SETTINGS:
     STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
     STATIC_ROOT = None
-elif not 'STATIC_ROOT' in locals():
+elif 'STATIC_ROOT' not in locals():
     STATIC_ROOT = os.getenv('EGO_STATIC_ROOT')
diff --git a/sweettooth/urls.py b/sweettooth/urls.py
index d106ba2..f3ec200 100644
--- a/sweettooth/urls.py
+++ b/sweettooth/urls.py
@@ -16,6 +16,7 @@ admin.autodiscover()
 urlpatterns = [
     # 'login' and 'register'
     re_path(r'^accounts/', include('sweettooth.auth.urls')),
+
     re_path(r'^', include('sweettooth.extensions.urls'), name='index'),
 
     re_path(r'^review/', include('sweettooth.review.urls')),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]