2
0
Эх сурвалжийг харах

no flake8 errors for testproject

Kevin Cummings 5 жил өмнө
parent
commit
0396ecaee1

+ 1 - 1
coderedcms/project_template/project_name/settings/base.py

@@ -78,7 +78,7 @@ MIDDLEWARE = [
     'django.middleware.security.SecurityMiddleware',
 
     # Error reporting. Uncomment this to recieve emails when a 404 is triggered.
-    #'django.middleware.common.BrokenLinkEmailsMiddleware',
+    # 'django.middleware.common.BrokenLinkEmailsMiddleware',
 
     # CMS functionality
     'wagtail.core.middleware.SiteMiddleware',

+ 2 - 2
coderedcms/project_template/project_name/settings/dev.py

@@ -1,4 +1,4 @@
-from .base import *
+from .base import *  # noqa: F401, F403
 
 # SECURITY WARNING: don't run with debug turned on in production!
 DEBUG = True
@@ -13,6 +13,6 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
 WAGTAIL_CACHE = False
 
 try:
-    from .local_settings import *
+    from .local_settings import *  # noqa: F401, F403
 except ImportError:
     pass

+ 6 - 6
coderedcms/project_template/project_name/settings/prod.py

@@ -1,4 +1,4 @@
-from .base import *
+from .base import *  # noqa: F401, F403
 
 # SECURITY WARNING: don't run with debug turned on in production!
 DEBUG = False
@@ -29,7 +29,7 @@ MANAGERS = ADMINS
 # Email address used to send error messages to ADMINS.
 SERVER_EMAIL = DEFAULT_FROM_EMAIL
 
-#DATABASES = {
+# DATABASES = {
 #    'default': {
 #        'ENGINE': 'django.db.backends.mysql',
 #        'HOST': 'localhost',
@@ -39,7 +39,7 @@ SERVER_EMAIL = DEFAULT_FROM_EMAIL
 #        # If using SSL to connect to a cloud mysql database, spedify the CA as so.
 #        'OPTIONS': { 'ssl': { 'ca': '/path/to/certificate-authority.pem' } },
 #    }
-#}
+# }
 
 # Use template caching to speed up wagtail admin and front-end.
 # Requires reloading web server to pick up template changes.
@@ -67,13 +67,13 @@ TEMPLATES = [
 CACHES = {
     'default': {
         'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
-        'LOCATION': os.path.join(BASE_DIR, 'cache'),
+        'LOCATION': os.path.join(BASE_DIR, 'cache'),  # noqa: F405
         'KEY_PREFIX': 'coderedcms',
-        'TIMEOUT': 14400, # in seconds
+        'TIMEOUT': 14400,  # in seconds
     }
 }
 
 try:
-    from .local_settings import *
+    from .local_settings import *  # noqa: F401, F403
 except ImportError:
     pass

+ 2 - 1
coderedcms/project_template/website/models.py

@@ -18,7 +18,7 @@ class ArticlePage(CoderedArticlePage):
     """
     class Meta:
         verbose_name = 'Article'
-        ordering = ['-first_published_at',]
+        ordering = ['-first_published_at', ]
 
     # Only allow this page to be created beneath an ArticleIndexPage.
     parent_page_types = ['website.ArticleIndexPage']
@@ -63,6 +63,7 @@ class FormPageField(CoderedFormField):
 
     page = ParentalKey('FormPage', related_name='form_fields')
 
+
 class FormConfirmEmail(CoderedEmail):
     """
     Sends a confirmation email after submitting a FormPage.