airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] 02/09: AIRAVATA-2868 Linting fixes
Date Thu, 04 Oct 2018 20:07:52 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit b5a70006448da53973c93e09a61ce7caccb46198
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Fri Sep 28 19:28:20 2018 -0400

    AIRAVATA-2868 Linting fixes
---
 django_airavata/apps/admin/admin.py                |   1 -
 django_airavata/apps/admin/apps.py                 |   1 -
 django_airavata/apps/admin/models.py               |   1 -
 django_airavata/apps/admin/tests.py                |   1 -
 django_airavata/apps/api/admin.py                  |   1 -
 django_airavata/apps/api/datastore.py              |   3 +-
 django_airavata/apps/api/exceptions.py             |   4 +-
 django_airavata/apps/api/models.py                 |   1 -
 django_airavata/apps/api/serializers.py            | 122 +++++---
 django_airavata/apps/api/tests.py                  |   1 -
 django_airavata/apps/api/thrift_utils.py           |   6 +-
 django_airavata/apps/api/view_utils.py             |   5 +-
 django_airavata/apps/api/views.py                  | 265 ++++++++++------
 django_airavata/apps/auth/admin.py                 |   1 -
 django_airavata/apps/auth/backends.py              |   5 +-
 django_airavata/apps/auth/models.py                |   1 -
 django_airavata/apps/auth/tests.py                 |   1 -
 django_airavata/apps/auth/urls.py                  |   2 +-
 django_airavata/apps/auth/views.py                 |   4 +-
 django_airavata/apps/groups/admin.py               |   1 -
 django_airavata/apps/groups/forms.py               |  19 +-
 django_airavata/apps/groups/models.py              |   1 -
 django_airavata/apps/groups/tests.py               |   1 -
 django_airavata/apps/groups/views.py               |  97 ++++--
 django_airavata/apps/workspace/admin.py            |   1 -
 django_airavata/apps/workspace/models.py           |   1 -
 django_airavata/apps/workspace/signals.py          |   4 +-
 django_airavata/apps/workspace/tests.py            |   1 -
 django_airavata/apps/workspace/views.py            |  11 +-
 django_airavata/context_processors.py              |   3 +-
 django_airavata/middleware.py                      |   9 +-
 django_airavata/settings.py                        |   4 +-
 django_airavata/urls.py                            |   9 +-
 django_airavata/views.py                           |   6 +-
 django_airavata/wagtailapps/base/blocks.py         | 190 ++++++++----
 django_airavata/wagtailapps/base/image_formats.py  |  12 +-
 .../management/commands/load_cybergateway_data.py  |   6 +-
 .../management/commands/load_default_gateway.py    |   6 +-
 .../management/commands/load_hpcgateway_data.py    |   6 +-
 .../commands/load_nanoconfinement_data.py          |   6 +-
 .../base/management/commands/load_osu_data.py      |   6 +-
 .../base/management/commands/load_phasta_data.py   |   6 +-
 .../base/management/commands/load_seagrid_data.py  |   6 +-
 .../management/commands/load_searching_sra_data.py |   6 +-
 .../base/management/commands/load_simccs_data.py   |   6 +-
 .../management/commands/load_simvascular_data.py   |   6 +-
 .../base/management/commands/load_siu_data.py      |   6 +-
 .../management/commands/load_south_dakota_data.py  |   6 +-
 django_airavata/wagtailapps/base/models.py         | 340 ++++++++++++---------
 .../base/templatetags/navigation_tags.py           |   6 +
 django_airavata/wagtailapps/base/wagtail_hooks.py  |  13 +-
 manage.py                                          |   2 +-
 52 files changed, 779 insertions(+), 450 deletions(-)

diff --git a/django_airavata/apps/admin/admin.py b/django_airavata/apps/admin/admin.py
index 8c38f3f..b97a94f 100644
--- a/django_airavata/apps/admin/admin.py
+++ b/django_airavata/apps/admin/admin.py
@@ -1,3 +1,2 @@
-from django.contrib import admin
 
 # Register your models here.
diff --git a/django_airavata/apps/admin/apps.py b/django_airavata/apps/admin/apps.py
index b557161..4e0591c 100644
--- a/django_airavata/apps/admin/apps.py
+++ b/django_airavata/apps/admin/apps.py
@@ -1,4 +1,3 @@
-from django.apps import AppConfig
 
 from django_airavata.app_config import AiravataAppConfig
 
diff --git a/django_airavata/apps/admin/models.py b/django_airavata/apps/admin/models.py
index 71a8362..35e0d64 100644
--- a/django_airavata/apps/admin/models.py
+++ b/django_airavata/apps/admin/models.py
@@ -1,3 +1,2 @@
-from django.db import models
 
 # Create your models here.
diff --git a/django_airavata/apps/admin/tests.py b/django_airavata/apps/admin/tests.py
index 7ce503c..4929020 100644
--- a/django_airavata/apps/admin/tests.py
+++ b/django_airavata/apps/admin/tests.py
@@ -1,3 +1,2 @@
-from django.test import TestCase
 
 # Create your tests here.
diff --git a/django_airavata/apps/api/admin.py b/django_airavata/apps/api/admin.py
index 8c38f3f..b97a94f 100644
--- a/django_airavata/apps/api/admin.py
+++ b/django_airavata/apps/api/admin.py
@@ -1,3 +1,2 @@
-from django.contrib import admin
 
 # Register your models here.
diff --git a/django_airavata/apps/api/datastore.py b/django_airavata/apps/api/datastore.py
index dc1d5f4..1e596f8 100644
--- a/django_airavata/apps/api/datastore.py
+++ b/django_airavata/apps/api/datastore.py
@@ -64,7 +64,8 @@ def save(username, project_name, experiment_name, file):
     data_replica_location.replicaPersistentType = \
         ReplicaPersistentType.TRANSIENT
     data_replica_location.filePath = \
-        "file://{}:{}".format(settings.GATEWAY_DATA_STORE_HOSTNAME, input_file_fullpath)
+        "file://{}:{}".format(settings.GATEWAY_DATA_STORE_HOSTNAME,
+                              input_file_fullpath)
     data_product.replicaLocations = [data_replica_location]
     return data_product
 
diff --git a/django_airavata/apps/api/exceptions.py b/django_airavata/apps/api/exceptions.py
index 4c217e7..a6435ae 100644
--- a/django_airavata/apps/api/exceptions.py
+++ b/django_airavata/apps/api/exceptions.py
@@ -1,12 +1,10 @@
-import json
 import logging
 
-from rest_framework import serializers, status
+from rest_framework import status
 from rest_framework.response import Response
 from rest_framework.views import exception_handler
 from thrift.Thrift import TException
 
-from airavata.api.error.ttypes import AiravataSystemException
 
 log = logging.getLogger(__name__)
 
diff --git a/django_airavata/apps/api/models.py b/django_airavata/apps/api/models.py
index 71a8362..35e0d64 100644
--- a/django_airavata/apps/api/models.py
+++ b/django_airavata/apps/api/models.py
@@ -1,3 +1,2 @@
-from django.db import models
 
 # Create your models here.
diff --git a/django_airavata/apps/api/serializers.py b/django_airavata/apps/api/serializers.py
index 58652dc..2ddeb44 100644
--- a/django_airavata/apps/api/serializers.py
+++ b/django_airavata/apps/api/serializers.py
@@ -19,8 +19,7 @@ from airavata.model.appcatalog.computeresource.ttypes import (BatchQueue,
                                                               ComputeResourceDescription)
 from airavata.model.appcatalog.groupresourceprofile.ttypes import \
     GroupResourceProfile
-from airavata.model.application.io.ttypes import (InputDataObjectType,
-                                                  OutputDataObjectType)
+from airavata.model.application.io.ttypes import InputDataObjectType
 from airavata.model.credential.store.ttypes import (CredentialSummary,
                                                     SummaryType)
 from airavata.model.data.replica.ttypes import (DataProductModel,
@@ -38,7 +37,8 @@ from . import datastore, thrift_utils
 log = logging.getLogger(__name__)
 
 
-class FullyEncodedHyperlinkedIdentityField(serializers.HyperlinkedIdentityField):
+class FullyEncodedHyperlinkedIdentityField(
+        serializers.HyperlinkedIdentityField):
     def get_url(self, obj, view_name, request, format):
         if hasattr(obj, self.lookup_field):
             lookup_value = getattr(obj, self.lookup_field)
@@ -56,7 +56,8 @@ class FullyEncodedHyperlinkedIdentityField(serializers.HyperlinkedIdentityField)
         # encode all characters including some like '/' that are used in URL
         # mappings.
         kwargs = {self.lookup_url_kwarg: "__PLACEHOLDER__"}
-        url = self.reverse(view_name, kwargs=kwargs, request=request, format=format)
+        url = self.reverse(view_name, kwargs=kwargs,
+                           request=request, format=format)
         return url.replace("__PLACEHOLDER__", encoded_lookup_value)
 
 
@@ -70,7 +71,7 @@ class UTCPosixTimestampDateTimeField(serializers.DateTimeField):
 
     def to_representation(self, obj):
         # Create datetime instance from milliseconds that is aware of timezon
-        dt = datetime.datetime.fromtimestamp(obj/1000, datetime.timezone.utc)
+        dt = datetime.datetime.fromtimestamp(obj / 1000, datetime.timezone.utc)
         return super().to_representation(dt)
 
     def to_internal_value(self, data):
@@ -162,8 +163,12 @@ class OrderedListField(serializers.ListField):
 
 
 class GroupSerializer(serializers.Serializer):
-    url = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:group-detail', lookup_field='id', lookup_url_kwarg='group_id')
-    id = serializers.CharField(default=GroupModel.thrift_spec[1][4], allow_null=True)
+    url = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:group-detail',
+        lookup_field='id',
+        lookup_url_kwarg='group_id')
+    id = serializers.CharField(
+        default=GroupModel.thrift_spec[1][4], allow_null=True)
     name = serializers.CharField(required=True)
     description = serializers.CharField(allow_null=True, allow_blank=True)
     ownerId = serializers.CharField(read_only=True)
@@ -176,12 +181,14 @@ class GroupSerializer(serializers.Serializer):
     isDefaultGatewayUsersGroup = serializers.SerializerMethodField()
 
     def create(self, validated_data):
-        validated_data['ownerId'] = self.context['request'].user.username + "@" + settings.GATEWAY_ID
+        validated_data['ownerId'] = self.context['request'].user.username + \
+            "@" + settings.GATEWAY_ID
         return GroupModel(**validated_data)
 
     def update(self, instance, validated_data):
         instance.name = validated_data.get('name', instance.name)
-        instance.description = validated_data.get('description', instance.description)
+        instance.description = validated_data.get(
+            'description', instance.description)
         # Calculate added and removed members
         old_members = set(instance.members)
         new_members = set(validated_data.get('members', instance.members))
@@ -227,13 +234,20 @@ class GroupSerializer(serializers.Serializer):
 
 
 class ProjectSerializer(serializers.Serializer):
-    url = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:project-detail', lookup_field='projectID', lookup_url_kwarg='project_id')
-    projectID = serializers.CharField(default=Project.thrift_spec[1][4], read_only=True)
+    url = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:project-detail',
+        lookup_field='projectID',
+        lookup_url_kwarg='project_id')
+    projectID = serializers.CharField(
+        default=Project.thrift_spec[1][4], read_only=True)
     name = serializers.CharField(required=True)
     description = serializers.CharField(allow_null=True)
     owner = GatewayUsernameDefaultField()
     gatewayId = GatewayIdDefaultField()
-    experiments = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:project-experiments', lookup_field='projectID', lookup_url_kwarg='project_id')
+    experiments = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:project-experiments',
+        lookup_field='projectID',
+        lookup_url_kwarg='project_id')
     creationTime = UTCPosixTimestampDateTimeField(allow_null=True)
 
     def create(self, validated_data):
@@ -241,15 +255,25 @@ class ProjectSerializer(serializers.Serializer):
 
     def update(self, instance, validated_data):
         instance.name = validated_data.get('name', instance.name)
-        instance.description = validated_data.get('description', instance.description)
+        instance.description = validated_data.get(
+            'description', instance.description)
         return instance
 
 
 class ApplicationModuleSerializer(
         thrift_utils.create_serializer_class(ApplicationModule)):
-    url = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:application-detail', lookup_field='appModuleId', lookup_url_kwarg='app_module_id')
-    applicationInterface = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:application-application-interface', lookup_field='appModuleId', lookup_url_kwarg='app_module_id')
-    applicationDeployments = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:application-application-deployments', lookup_field='appModuleId', lookup_url_kwarg='app_module_id')
+    url = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:application-detail',
+        lookup_field='appModuleId',
+        lookup_url_kwarg='app_module_id')
+    applicationInterface = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:application-application-interface',
+        lookup_field='appModuleId',
+        lookup_url_kwarg='app_module_id')
+    applicationDeployments = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:application-application-deployments',
+        lookup_field='appModuleId',
+        lookup_url_kwarg='app_module_id')
     userHasWriteAccess = serializers.SerializerMethodField()
 
     class Meta:
@@ -341,7 +365,8 @@ class ApplicationDeploymentDescriptionSerializer(
             ResourcePermissionType.WRITE)
 
 
-class ComputeResourceDescriptionSerializer(thrift_utils.create_serializer_class(ComputeResourceDescription)):
+class ComputeResourceDescriptionSerializer(
+        thrift_utils.create_serializer_class(ComputeResourceDescription)):
     pass
 
 
@@ -349,7 +374,8 @@ class BatchQueueSerializer(thrift_utils.create_serializer_class(BatchQueue)):
     pass
 
 
-class ExperimentStatusSerializer(thrift_utils.create_serializer_class(ExperimentStatus)):
+class ExperimentStatusSerializer(
+        thrift_utils.create_serializer_class(ExperimentStatus)):
     timeOfStateChange = UTCPosixTimestampDateTimeField()
 
 
@@ -360,11 +386,26 @@ class ExperimentSerializer(
         required = ('projectId', 'experimentType', 'experimentName')
         read_only = ('experimentId',)
 
-    url = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:experiment-detail', lookup_field='experimentId', lookup_url_kwarg='experiment_id')
-    full_experiment = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:full-experiment-detail', lookup_field='experimentId', lookup_url_kwarg='experiment_id')
-    project = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:project-detail', lookup_field='projectId', lookup_url_kwarg='project_id')
-    jobs = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:experiment-jobs', lookup_field='experimentId', lookup_url_kwarg='experiment_id')
-    shared_entity = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:shared-entity-detail', lookup_field='experimentId', lookup_url_kwarg='entity_id')
+    url = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:experiment-detail',
+        lookup_field='experimentId',
+        lookup_url_kwarg='experiment_id')
+    full_experiment = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:full-experiment-detail',
+        lookup_field='experimentId',
+        lookup_url_kwarg='experiment_id')
+    project = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:project-detail',
+        lookup_field='projectId',
+        lookup_url_kwarg='project_id')
+    jobs = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:experiment-jobs',
+        lookup_field='experimentId',
+        lookup_url_kwarg='experiment_id')
+    shared_entity = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:shared-entity-detail',
+        lookup_field='experimentId',
+        lookup_url_kwarg='entity_id')
     userName = GatewayUsernameDefaultField()
     gatewayId = GatewayIdDefaultField()
     creationTime = UTCPosixTimestampDateTimeField(allow_null=True)
@@ -389,9 +430,9 @@ class DataProductSerializer(
         if datastore.exists(data_product):
             request = self.context['request']
             return (request.build_absolute_uri(
-                reverse('django_airavata_api:download_file'))
-                + '?'
-                + urlencode({'data-product-uri': data_product.productUri}))
+                reverse('django_airavata_api:download_file')) +
+                '?' +
+                urlencode({'data-product-uri': data_product.productUri}))
         return None
 
 
@@ -440,8 +481,14 @@ class ExperimentSummarySerializer(
         thrift_utils.create_serializer_class(ExperimentSummaryModel)):
     creationTime = UTCPosixTimestampDateTimeField()
     statusUpdateTime = UTCPosixTimestampDateTimeField()
-    url = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:experiment-detail', lookup_field='experimentId', lookup_url_kwarg='experiment_id')
-    project = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:project-detail', lookup_field='projectId', lookup_url_kwarg='project_id')
+    url = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:experiment-detail',
+        lookup_field='experimentId',
+        lookup_url_kwarg='experiment_id')
+    project = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:project-detail',
+        lookup_field='projectId',
+        lookup_url_kwarg='project_id')
 
 
 class UserProfileSerializer(
@@ -452,7 +499,10 @@ class UserProfileSerializer(
 
 class GroupResourceProfileSerializer(
         thrift_utils.create_serializer_class(GroupResourceProfile)):
-    url = FullyEncodedHyperlinkedIdentityField(view_name='django_airavata_api:group-resource-profile-detail', lookup_field='groupResourceProfileId', lookup_url_kwarg='group_resource_profile_id')
+    url = FullyEncodedHyperlinkedIdentityField(
+        view_name='django_airavata_api:group-resource-profile-detail',
+        lookup_field='groupResourceProfileId',
+        lookup_url_kwarg='group_resource_profile_id')
     creationTime = UTCPosixTimestampDateTimeField(allow_null=True)
     updatedTime = UTCPosixTimestampDateTimeField(allow_null=True)
     userHasWriteAccess = serializers.SerializerMethodField()
@@ -505,11 +555,11 @@ class GroupResourceProfileSerializer(
 
 
 class SharedGroups(serializers.Serializer):
-    groupList=serializers.ListField(child=serializers.CharField())
-    entityId=serializers.CharField()
+    groupList = serializers.ListField(child=serializers.CharField())
+    entityId = serializers.CharField()
 
     def update(self, instance, validated_data):
-        instance["groupList"]=validated_data["groupList"]
+        instance["groupList"] = validated_data["groupList"]
         return instance
 
 
@@ -538,8 +588,10 @@ class SharedEntitySerializer(serializers.Serializer):
         # Compute lists of ids to grant/revoke READ/WRITE
         existing_user_permissions = {user['user'].airavataInternalUserId: user['permissionType']
                                      for user in instance['userPermissions']}
-        new_user_permissions = {user['user']['airavataInternalUserId']: user['permissionType']
-                                for user in validated_data['userPermissions']}
+        new_user_permissions = {
+            user['user']['airavataInternalUserId']:
+            user['permissionType']
+                for user in validated_data['userPermissions']}
 
         (user_grant_read_permission, user_grant_write_permission,
          user_revoke_read_permission, user_revoke_write_permission) = \
@@ -605,7 +657,7 @@ class SharedEntitySerializer(serializers.Serializer):
                                     new_permission=None):
         read_permissions = set((ResourcePermissionType.READ,))
         write_permissions = set((ResourcePermissionType.READ,
-                                ResourcePermissionType.WRITE))
+                                 ResourcePermissionType.WRITE))
         current_permissions_set = set()
         new_permissions_set = set()
         if current_permission == ResourcePermissionType.READ:
diff --git a/django_airavata/apps/api/tests.py b/django_airavata/apps/api/tests.py
index 7ce503c..4929020 100644
--- a/django_airavata/apps/api/tests.py
+++ b/django_airavata/apps/api/tests.py
@@ -1,3 +1,2 @@
-from django.test import TestCase
 
 # Create your tests here.
diff --git a/django_airavata/apps/api/thrift_utils.py b/django_airavata/apps/api/thrift_utils.py
index be59ab9..0dd3d26 100644
--- a/django_airavata/apps/api/thrift_utils.py
+++ b/django_airavata/apps/api/thrift_utils.py
@@ -116,9 +116,11 @@ def create_serializer_class(thrift_data_type, enable_date_time_conversion=False)
                 if isinstance(serializer, ListField):
                     if (params[field_name] is not None or not serializer.allow_null):
                         if isinstance(serializer.child, Serializer):
-                            params[field_name] = [serializer.child.create(item) for item in params[field_name]]
+                            params[field_name] = [serializer.child.create(
+                                item) for item in params[field_name]]
                         else:
-                            params[field_name] = serializer.to_representation(params[field_name])
+                            params[field_name] = serializer.to_representation(
+                                params[field_name])
                 elif isinstance(serializer, Serializer):
                     params[field_name] = serializer.create(params[field_name])
             return params
diff --git a/django_airavata/apps/api/view_utils.py b/django_airavata/apps/api/view_utils.py
index 4278a1b..08dd955 100644
--- a/django_airavata/apps/api/view_utils.py
+++ b/django_airavata/apps/api/view_utils.py
@@ -115,7 +115,8 @@ class APIResultPagination(pagination.LimitOffsetPagination):
     default_limit = 10
 
     def paginate_queryset(self, queryset, request, view=None):
-        assert isinstance(queryset, APIResultIterator), "queryset is not an APIResultIterator: {}".format(queryset)
+        assert isinstance(
+            queryset, APIResultIterator), "queryset is not an APIResultIterator: {}".format(queryset)
         self.limit = self.get_limit(request)
         if self.limit is None:
             return None
@@ -171,4 +172,4 @@ class APIResultPagination(pagination.LimitOffsetPagination):
         if hasattr(self, 'viewname'):
             return self.request.build_absolute_uri(reverse(self.viewname))
         else:
-            return self.request.build_absolute_uri()
\ No newline at end of file
+            return self.request.build_absolute_uri()
diff --git a/django_airavata/apps/api/views.py b/django_airavata/apps/api/views.py
index 805c35d..3cbe804 100644
--- a/django_airavata/apps/api/views.py
+++ b/django_airavata/apps/api/views.py
@@ -6,31 +6,31 @@ from django.core.exceptions import ObjectDoesNotExist
 from django.http import FileResponse, Http404, JsonResponse
 from django.urls import reverse
 from rest_framework import mixins
-from rest_framework import status
-from rest_framework.decorators import action
-from rest_framework.decorators import detail_route
-from rest_framework.decorators import list_route
+from rest_framework.decorators import action, detail_route, list_route
 from rest_framework.exceptions import ParseError
-from rest_framework.parsers import JSONParser
 from rest_framework.renderers import JSONRenderer
 from rest_framework.response import Response
 from rest_framework.views import APIView
 
-from airavata.model.appcatalog.appdeployment.ttypes import ApplicationModule, ApplicationDeploymentDescription
-from airavata.model.appcatalog.appinterface.ttypes import ApplicationInterfaceDescription
-from airavata.model.appcatalog.computeresource.ttypes import ComputeResourceDescription, LOCALSubmission, \
-    CloudJobSubmission, SSHJobSubmission, GlobusJobSubmission, UnicoreJobSubmission
-from airavata.model.application.io.ttypes import DataType
-from airavata.model.credential.store.ttypes import SummaryType, CredentialSummary
-from airavata.model.data.movement.ttypes import GridFTPDataMovement, LOCALDataMovement, SCPDataMovement, \
-    UnicoreDataMovement
 from airavata.api.error.ttypes import ProjectNotFoundException
+from airavata.model.appcatalog.computeresource.ttypes import (CloudJobSubmission,
+                                                              GlobusJobSubmission,
+                                                              LOCALSubmission,
+                                                              SSHJobSubmission,
+                                                              UnicoreJobSubmission)
+from airavata.model.application.io.ttypes import DataType
+from airavata.model.credential.store.ttypes import SummaryType
+from airavata.model.data.movement.ttypes import (GridFTPDataMovement,
+                                                 LOCALDataMovement,
+                                                 SCPDataMovement,
+                                                 UnicoreDataMovement)
 from airavata.model.group.ttypes import ResourcePermissionType
-from django_airavata.apps.api.view_utils import GenericAPIBackedViewSet, APIBackedViewSet, APIResultIterator, \
-    APIResultPagination, ReadOnlyAPIBackedViewSet
-from . import datastore
-from . import serializers
-from . import thrift_utils
+from django_airavata.apps.api.view_utils import (APIBackedViewSet,
+                                                 APIResultIterator,
+                                                 APIResultPagination,
+                                                 GenericAPIBackedViewSet)
+
+from . import datastore, serializers, thrift_utils
 
 READ_PERMISSION_TYPE = '{}:READ'
 
@@ -48,17 +48,20 @@ class GroupViewSet(APIBackedViewSet):
 
         class GroupResultsIterator(APIResultIterator):
             def get_results(self, limit=-1, offset=0):
-                groups = view.request.profile_service['group_manager'].getGroups(view.authz_token)
+                groups = view.request.profile_service['group_manager'].getGroups(
+                    view.authz_token)
                 return groups[offset:offset + limit] if groups else []
 
         return GroupResultsIterator()
 
     def get_instance(self, lookup_value):
-        return self.request.profile_service['group_manager'].getGroup(self.authz_token, lookup_value)
+        return self.request.profile_service['group_manager'].getGroup(
+            self.authz_token, lookup_value)
 
     def perform_create(self, serializer):
         group = serializer.save()
-        group_id = self.request.profile_service['group_manager'].createGroup(self.authz_token, group)
+        group_id = self.request.profile_service['group_manager'].createGroup(
+            self.authz_token, group)
         group.id = group_id
 
     def perform_update(self, serializer):
@@ -105,33 +108,40 @@ class ProjectViewSet(APIBackedViewSet):
 
         class ProjectResultIterator(APIResultIterator):
             def get_results(self, limit=-1, offset=0):
-                return view.request.airavata_client.getUserProjects(view.authz_token, view.gateway_id, view.username,
-                                                                    limit, offset)
+                return view.request.airavata_client.getUserProjects(
+                    view.authz_token, view.gateway_id, view.username, limit, offset)
 
         return ProjectResultIterator()
 
     def get_instance(self, lookup_value):
-        return self.request.airavata_client.getProject(self.authz_token, lookup_value)
+        return self.request.airavata_client.getProject(
+            self.authz_token, lookup_value)
 
     def perform_create(self, serializer):
         project = serializer.save()
-        project_id = self.request.airavata_client.createProject(self.authz_token, self.gateway_id, project)
+        project_id = self.request.airavata_client.createProject(
+            self.authz_token, self.gateway_id, project)
         project.projectID = project_id
 
     def perform_update(self, serializer):
         project = serializer.save()
-        self.request.airavata_client.updateProject(self.authz_token, project.projectID, project)
+        self.request.airavata_client.updateProject(
+            self.authz_token, project.projectID, project)
 
     @list_route()
     def list_all(self, request):
-        projects = self.request.airavata_client.getUserProjects(self.authz_token, self.gateway_id, self.username, -1, 0)
-        serializer = serializers.ProjectSerializer(projects, many=True, context={'request': request})
+        projects = self.request.airavata_client.getUserProjects(
+            self.authz_token, self.gateway_id, self.username, -1, 0)
+        serializer = serializers.ProjectSerializer(
+            projects, many=True, context={'request': request})
         return Response(serializer.data)
 
     @detail_route()
     def experiments(self, request, project_id=None):
-        experiments = request.airavata_client.getExperimentsInProject(self.authz_token, project_id, -1, 0)
-        serializer = serializers.ExperimentSerializer(experiments, many=True, context={'request': request})
+        experiments = request.airavata_client.getExperimentsInProject(
+            self.authz_token, project_id, -1, 0)
+        serializer = serializers.ExperimentSerializer(
+            experiments, many=True, context={'request': request})
         return Response(serializer.data)
 
 
@@ -140,10 +150,12 @@ class ExperimentViewSet(APIBackedViewSet):
     lookup_field = 'experiment_id'
 
     def get_list(self):
-        return self.request.airavata_client.getUserExperiments(self.authz_token, self.gateway_id, self.username, -1, 0)
+        return self.request.airavata_client.getUserExperiments(
+            self.authz_token, self.gateway_id, self.username, -1, 0)
 
     def get_instance(self, lookup_value):
-        return self.request.airavata_client.getExperiment(self.authz_token, lookup_value)
+        return self.request.airavata_client.getExperiment(
+            self.authz_token, lookup_value)
 
     def perform_create(self, serializer):
         experiment = serializer.save()
@@ -162,12 +174,14 @@ class ExperimentViewSet(APIBackedViewSet):
 
     def perform_update(self, serializer):
         experiment = serializer.save()
-        self.request.airavata_client.updateExperiment(self.authz_token, experiment.experimentId, experiment)
+        self.request.airavata_client.updateExperiment(
+            self.authz_token, experiment.experimentId, experiment)
 
     @detail_route(methods=['post'])
     def launch(self, request, experiment_id=None):
         try:
-            request.airavata_client.launchExperiment(request.authz_token, experiment_id, self.gateway_id)
+            request.airavata_client.launchExperiment(
+                request.authz_token, experiment_id, self.gateway_id)
             return Response({'success': True})
         except Exception as e:
             return Response({'success': False, 'errorMessage': e.message})
@@ -216,18 +230,18 @@ class FullExperimentViewSet(mixins.RetrieveModelMixin,
             self.request.airavata_client.getDataProduct(self.authz_token,
                                                         output.value)
             for output in experimentModel.experimentOutputs
-            if (output.value.startswith('airavata-dp')
-                and output.type in (DataType.URI,
-                                    DataType.STDOUT,
-                                    DataType.STDERR))]
+            if (output.value.startswith('airavata-dp') and
+                output.type in (DataType.URI,
+                                DataType.STDOUT,
+                                DataType.STDERR))]
         inputDataProducts = [
             self.request.airavata_client.getDataProduct(self.authz_token,
                                                         inp.value)
             for inp in experimentModel.experimentInputs
-            if (inp.value.startswith('airavata-dp')
-                and inp.type in (DataType.URI,
-                                 DataType.STDOUT,
-                                 DataType.STDERR))]
+            if (inp.value.startswith('airavata-dp') and
+                inp.type in (DataType.URI,
+                             DataType.STDOUT,
+                             DataType.STDERR))]
         appInterfaceId = experimentModel.executionId
         applicationInterface = self.request.airavata_client \
             .getApplicationInterface(self.authz_token, appInterfaceId)
@@ -266,28 +280,32 @@ class ApplicationModuleViewSet(APIBackedViewSet):
     lookup_field = 'app_module_id'
 
     def get_list(self):
-        return self.request.airavata_client.getAccessibleAppModules(self.authz_token, self.gateway_id)
+        return self.request.airavata_client.getAccessibleAppModules(
+            self.authz_token, self.gateway_id)
 
     def get_instance(self, lookup_value):
-        return self.request.airavata_client.getApplicationModule(self.authz_token, lookup_value)
+        return self.request.airavata_client.getApplicationModule(
+            self.authz_token, lookup_value)
 
     def perform_create(self, serializer):
         app_module = serializer.save()
-        app_module_id = self.request.airavata_client.registerApplicationModule(self.authz_token, self.gateway_id,
-                                                                               app_module)
+        app_module_id = self.request.airavata_client.registerApplicationModule(
+            self.authz_token, self.gateway_id, app_module)
         app_module.appModuleId = app_module_id
 
     def perform_update(self, serializer):
         app_module = serializer.save()
-        self.request.airavata_client.updateApplicationModule(self.authz_token, app_module.appModuleId, app_module)
-    
+        self.request.airavata_client.updateApplicationModule(
+            self.authz_token, app_module.appModuleId, app_module)
+
     def perform_destroy(self, instance):
         self.request.airavata_client.deleteApplicationModule(
             self.authz_token, instance.appModuleId)
 
     @detail_route()
     def application_interface(self, request, app_module_id):
-        all_app_interfaces = request.airavata_client.getAllApplicationInterfaces(self.authz_token, self.gateway_id)
+        all_app_interfaces = request.airavata_client.getAllApplicationInterfaces(
+            self.authz_token, self.gateway_id)
         app_interfaces = []
         for app_interface in all_app_interfaces:
             if not app_interface.applicationModules:
@@ -312,10 +330,12 @@ class ApplicationModuleViewSet(APIBackedViewSet):
 
     @detail_route()
     def application_deployments(self, request, app_module_id):
-        all_deployments = self.request.airavata_client.getAllApplicationDeployments(self.authz_token, self.gateway_id)
-        app_deployments = [dep for dep in all_deployments if dep.appModuleId == app_module_id]
-        serializer = serializers.ApplicationDeploymentDescriptionSerializer(app_deployments, many=True,
-                                                                            context={'request': request})
+        all_deployments = self.request.airavata_client.getAllApplicationDeployments(
+            self.authz_token, self.gateway_id)
+        app_deployments = [
+            dep for dep in all_deployments if dep.appModuleId == app_module_id]
+        serializer = serializers.ApplicationDeploymentDescriptionSerializer(
+            app_deployments, many=True, context={'request': request})
         return Response(serializer.data)
 
     @list_route()
@@ -332,32 +352,35 @@ class ApplicationInterfaceViewSet(APIBackedViewSet):
     lookup_field = 'app_interface_id'
 
     def get_list(self):
-        return self.request.airavata_client.getAllApplicationInterfaces(self.authz_token, self.gateway_id)
+        return self.request.airavata_client.getAllApplicationInterfaces(
+            self.authz_token, self.gateway_id)
 
     def get_instance(self, lookup_value):
-        return self.request.airavata_client.getApplicationInterface(self.authz_token, lookup_value)
+        return self.request.airavata_client.getApplicationInterface(
+            self.authz_token, lookup_value)
 
     def perform_create(self, serializer):
         application_interface = serializer.save()
         log.debug("application_interface: {}".format(application_interface))
-        app_interface_id = self.request.airavata_client.registerApplicationInterface(self.authz_token, self.gateway_id,
-                                                                                     application_interface)
+        app_interface_id = self.request.airavata_client.registerApplicationInterface(
+            self.authz_token, self.gateway_id, application_interface)
         application_interface.applicationInterfaceId = app_interface_id
 
     def perform_update(self, serializer):
         application_interface = serializer.save()
-        self.request.airavata_client.updateApplicationInterface(self.authz_token,
-                                                                application_interface.applicationInterfaceId,
-                                                                application_interface)
-    
+        self.request.airavata_client.updateApplicationInterface(
+            self.authz_token,
+            application_interface.applicationInterfaceId,
+            application_interface)
+
     def perform_destroy(self, instance):
         self.request.airavata_client.deleteApplicationInterface(
             self.authz_token, instance.applicationInterfaceId)
 
     @detail_route()
     def compute_resources(self, request, app_interface_id):
-        compute_resources = request.airavata_client.getAvailableAppInterfaceComputeResources(self.authz_token,
-                                                                                             app_interface_id)
+        compute_resources = request.airavata_client.getAvailableAppInterfaceComputeResources(
+            self.authz_token, app_interface_id)
         return Response(compute_resources)
 
 
@@ -368,7 +391,8 @@ class ApplicationDeploymentViewSet(APIBackedViewSet):
 
     def get_list(self):
         app_module_id = self.request.query_params.get('appModuleId', None)
-        group_resource_profile_id = self.request.query_params.get('groupResourceProfileId', None)
+        group_resource_profile_id = self.request.query_params.get(
+            'groupResourceProfileId', None)
         if (app_module_id and not group_resource_profile_id)\
                 or (not app_module_id and group_resource_profile_id):
             raise ParseError("Query params appModuleId and "
@@ -381,20 +405,19 @@ class ApplicationDeploymentViewSet(APIBackedViewSet):
                 self.authz_token, self.gateway_id, ResourcePermissionType.READ)
 
     def get_instance(self, lookup_value):
-        return self.request.airavata_client.getApplicationDeployment(self.authz_token, lookup_value)
+        return self.request.airavata_client.getApplicationDeployment(
+            self.authz_token, lookup_value)
 
     def perform_create(self, serializer):
         application_deployment = serializer.save()
-        app_deployment_id = self.request.airavata_client.registerApplicationDeployment(self.authz_token,
-                                                                                       self.gateway_id,
-                                                                                       application_deployment)
+        app_deployment_id = self.request.airavata_client.registerApplicationDeployment(
+            self.authz_token, self.gateway_id, application_deployment)
         application_deployment.appDeploymentId = app_deployment_id
 
     def perform_update(self, serializer):
         application_deployment = serializer.save()
-        self.request.airavata_client.updateApplicationDeployment(self.authz_token,
-                                                                 application_deployment.appDeploymentId,
-                                                                 application_deployment)
+        self.request.airavata_client.updateApplicationDeployment(
+            self.authz_token, application_deployment.appDeploymentId, application_deployment)
 
     def perform_destroy(self, instance):
         self.request.airavata_client.deleteApplicationDeployment(
@@ -403,13 +426,16 @@ class ApplicationDeploymentViewSet(APIBackedViewSet):
     @detail_route()
     def queues(self, request, app_deployment_id):
         """Return queues for this deployment with defaults overridden by deployment defaults if they exist"""
-        app_deployment = self.request.airavata_client.getApplicationDeployment(self.authz_token, app_deployment_id)
-        compute_resource = request.airavata_client.getComputeResource(request.authz_token, app_deployment.computeHostId)
+        app_deployment = self.request.airavata_client.getApplicationDeployment(
+            self.authz_token, app_deployment_id)
+        compute_resource = request.airavata_client.getComputeResource(
+            request.authz_token, app_deployment.computeHostId)
         # Override defaults with app deployment defaults
         batch_queues = []
         for batch_queue in compute_resource.batchQueues:
             if app_deployment.defaultQueueName:
-                batch_queue.isDefaultQueue = (app_deployment.defaultQueueName == batch_queue.queueName)
+                batch_queue.isDefaultQueue = (
+                    app_deployment.defaultQueueName == batch_queue.queueName)
             if app_deployment.defaultNodeCount:
                 batch_queue.defaultNodeCount = app_deployment.defaultNodeCount
             if app_deployment.defaultCPUCount:
@@ -417,7 +443,8 @@ class ApplicationDeploymentViewSet(APIBackedViewSet):
             if app_deployment.defaultWalltime:
                 batch_queue.defaultWalltime = app_deployment.defaultWalltime
             batch_queues.append(batch_queue)
-        serializer = serializers.BatchQueueSerializer(batch_queues, many=True, context={'request': request})
+        serializer = serializers.BatchQueueSerializer(
+            batch_queues, many=True, context={'request': request})
         return Response(serializer.data)
 
 
@@ -455,7 +482,8 @@ class ComputeResourceViewSet(mixins.RetrieveModelMixin,
 
     @detail_route()
     def queues(self, request, compute_resource_id, format=None):
-        details = request.airavata_client.getComputeResource(request.authz_token, compute_resource_id)
+        details = request.airavata_client.getComputeResource(
+            request.authz_token, compute_resource_id)
         serializer = self.serializer_class(instance=details,
                                            context={'request': request})
         data = serializer.data
@@ -467,8 +495,12 @@ class LocalJobSubmissionView(APIView):
 
     def get(self, request, format=None):
         job_submission_id = request.query_params["id"]
-        local_job_submission = request.airavata_client.getLocalJobSubmission(request.authz_token, job_submission_id)
-        return Response(thrift_utils.create_serializer(LOCALSubmission, instance=local_job_submission).data)
+        local_job_submission = request.airavata_client.getLocalJobSubmission(
+            request.authz_token, job_submission_id)
+        return Response(
+            thrift_utils.create_serializer(
+                LOCALSubmission,
+                instance=local_job_submission).data)
 
 
 class CloudJobSubmissionView(APIView):
@@ -476,8 +508,12 @@ class CloudJobSubmissionView(APIView):
 
     def get(self, request, format=None):
         job_submission_id = request.query_params["id"]
-        job_submission = request.airavata_client.getCloudJobSubmission(request.authz_token, job_submission_id)
-        return Response(thrift_utils.create_serializer(CloudJobSubmission, instance=job_submission).data)
+        job_submission = request.airavata_client.getCloudJobSubmission(
+            request.authz_token, job_submission_id)
+        return Response(
+            thrift_utils.create_serializer(
+                CloudJobSubmission,
+                instance=job_submission).data)
 
 
 class GlobusJobSubmissionView(APIView):
@@ -485,8 +521,12 @@ class GlobusJobSubmissionView(APIView):
 
     def get(self, request, format=None):
         job_submission_id = request.query_params["id"]
-        job_submission = request.airavata_client.getClo(request.authz_token, job_submission_id)
-        return Response(thrift_utils.create_serializer(GlobusJobSubmission, instance=job_submission).data)
+        job_submission = request.airavata_client.getClo(
+            request.authz_token, job_submission_id)
+        return Response(
+            thrift_utils.create_serializer(
+                GlobusJobSubmission,
+                instance=job_submission).data)
 
 
 class SshJobSubmissionView(APIView):
@@ -494,8 +534,12 @@ class SshJobSubmissionView(APIView):
 
     def get(self, request, format=None):
         job_submission_id = request.query_params["id"]
-        job_submission = request.airavata_client.getSSHJobSubmission(request.authz_token, job_submission_id)
-        return Response(thrift_utils.create_serializer(SSHJobSubmission, instance=job_submission).data)
+        job_submission = request.airavata_client.getSSHJobSubmission(
+            request.authz_token, job_submission_id)
+        return Response(
+            thrift_utils.create_serializer(
+                SSHJobSubmission,
+                instance=job_submission).data)
 
 
 class UnicoreJobSubmissionView(APIView):
@@ -503,8 +547,12 @@ class UnicoreJobSubmissionView(APIView):
 
     def get(self, request, format=None):
         job_submission_id = request.query_params["id"]
-        job_submission = request.airavata_client.getUnicoreJobSubmission(request.authz_token, job_submission_id)
-        return Response(thrift_utils.create_serializer(UnicoreJobSubmission, instance=job_submission).data)
+        job_submission = request.airavata_client.getUnicoreJobSubmission(
+            request.authz_token, job_submission_id)
+        return Response(
+            thrift_utils.create_serializer(
+                UnicoreJobSubmission,
+                instance=job_submission).data)
 
 
 class GridFtpDataMovementView(APIView):
@@ -512,8 +560,12 @@ class GridFtpDataMovementView(APIView):
 
     def get(self, request, format=None):
         data_movement_id = request.query_params["id"]
-        data_movement = request.airavata_client.getGridFTPDataMovement(request.authz_token, data_movement_id)
-        return Response(thrift_utils.create_serializer(GridFTPDataMovement, instance=data_movement).data)
+        data_movement = request.airavata_client.getGridFTPDataMovement(
+            request.authz_token, data_movement_id)
+        return Response(
+            thrift_utils.create_serializer(
+                GridFTPDataMovement,
+                instance=data_movement).data)
 
 
 class ScpDataMovementView(APIView):
@@ -521,8 +573,12 @@ class ScpDataMovementView(APIView):
 
     def get(self, request, format=None):
         data_movement_id = request.query_params["id"]
-        data_movement = request.airavata_client.getSCPDataMovement(request.authz_token, data_movement_id)
-        return Response(thrift_utils.create_serializer(SCPDataMovement, instance=data_movement).data)
+        data_movement = request.airavata_client.getSCPDataMovement(
+            request.authz_token, data_movement_id)
+        return Response(
+            thrift_utils.create_serializer(
+                SCPDataMovement,
+                instance=data_movement).data)
 
 
 class UnicoreDataMovementView(APIView):
@@ -530,8 +586,12 @@ class UnicoreDataMovementView(APIView):
 
     def get(self, request, format=None):
         data_movement_id = request.query_params["id"]
-        data_movement = request.airavata_client.getUnicoreDataMovement(request.authz_token, data_movement_id)
-        return Response(thrift_utils.create_serializer(UnicoreDataMovement, instance=data_movement).data)
+        data_movement = request.airavata_client.getUnicoreDataMovement(
+            request.authz_token, data_movement_id)
+        return Response(
+            thrift_utils.create_serializer(
+                UnicoreDataMovement,
+                instance=data_movement).data)
 
 
 class LocalDataMovementView(APIView):
@@ -539,8 +599,12 @@ class LocalDataMovementView(APIView):
 
     def get(self, request, format=None):
         data_movement_id = request.query_params["id"]
-        data_movement = request.airavata_client.getLocalDataMovement(request.authz_token, data_movement_id)
-        return Response(thrift_utils.create_serializer(LOCALDataMovement, instance=data_movement).data)
+        data_movement = request.airavata_client.getLocalDataMovement(
+            request.authz_token, data_movement_id)
+        return Response(
+            thrift_utils.create_serializer(
+                LOCALDataMovement,
+                instance=data_movement).data)
 
 
 @login_required
@@ -612,8 +676,8 @@ class GroupResourceProfileViewSet(APIBackedViewSet):
     def perform_create(self, serializer):
         group_resource_profile = serializer.save()
         group_resource_profile.gatewayId = self.gateway_id
-        group_resource_profile_id = self.request.airavata_client.createGroupResourceProfile(authzToken=self.authz_token,
-                                                                                            groupResourceProfile=group_resource_profile)
+        group_resource_profile_id = self.request.airavata_client.createGroupResourceProfile(
+            authzToken=self.authz_token, groupResourceProfile=group_resource_profile)
         group_resource_profile.groupResourceProfileId = group_resource_profile_id
 
     def perform_update(self, serializer):
@@ -682,7 +746,8 @@ class SharedEntityViewSet(mixins.RetrieveModelMixin,
                 'owner': self._load_user_profile(owner_id)}
 
     def _load_accessible_users(self, entity_id, permission_type):
-        users = self.request.airavata_client.getAllAccessibleUsers(self.authz_token, entity_id, permission_type)
+        users = self.request.airavata_client.getAllAccessibleUsers(
+            self.authz_token, entity_id, permission_type)
         return {user_id: permission_type for user_id in users}
 
     def _load_user_profile(self, user_id):
@@ -693,7 +758,8 @@ class SharedEntityViewSet(mixins.RetrieveModelMixin,
                                                       settings.GATEWAY_ID)
 
     def _load_accessible_groups(self, entity_id, permission_type):
-        groups = self.request.airavata_client.getAllAccessibleGroups(self.authz_token, entity_id, permission_type)
+        groups = self.request.airavata_client.getAllAccessibleGroups(
+            self.authz_token, entity_id, permission_type)
         return {group_id: permission_type for group_id in groups}
 
     def _load_group(self, group_id):
@@ -773,7 +839,8 @@ class SharedEntityViewSet(mixins.RetrieveModelMixin,
         # merged settings. This will calculate all permissions that need to be
         # granted and revoked to go from the exisitng settings to the merged
         # settings.
-        merged_serializer = self.get_serializer(existing_instance, data=merged_data)
+        merged_serializer = self.get_serializer(
+            existing_instance, data=merged_data)
         merged_serializer.is_valid(raise_exception=True)
         self.perform_update(merged_serializer)
         return Response(merged_serializer.data)
diff --git a/django_airavata/apps/auth/admin.py b/django_airavata/apps/auth/admin.py
index 8c38f3f..b97a94f 100644
--- a/django_airavata/apps/auth/admin.py
+++ b/django_airavata/apps/auth/admin.py
@@ -1,3 +1,2 @@
-from django.contrib import admin
 
 # Register your models here.
diff --git a/django_airavata/apps/auth/backends.py b/django_airavata/apps/auth/backends.py
index 3d7326a..de1cdb1 100644
--- a/django_airavata/apps/auth/backends.py
+++ b/django_airavata/apps/auth/backends.py
@@ -2,17 +2,14 @@
 import logging
 import time
 
+import requests
 from django.conf import settings
 from django.contrib.auth.models import User
-from django.urls import reverse
-
 from oauthlib.oauth2 import LegacyApplicationClient
-import requests
 from requests_oauthlib import OAuth2Session
 
 from . import utils
 
-
 logger = logging.getLogger(__name__)
 
 
diff --git a/django_airavata/apps/auth/models.py b/django_airavata/apps/auth/models.py
index 71a8362..35e0d64 100644
--- a/django_airavata/apps/auth/models.py
+++ b/django_airavata/apps/auth/models.py
@@ -1,3 +1,2 @@
-from django.db import models
 
 # Create your models here.
diff --git a/django_airavata/apps/auth/tests.py b/django_airavata/apps/auth/tests.py
index 7ce503c..4929020 100644
--- a/django_airavata/apps/auth/tests.py
+++ b/django_airavata/apps/auth/tests.py
@@ -1,3 +1,2 @@
-from django.test import TestCase
 
 # Create your tests here.
diff --git a/django_airavata/apps/auth/urls.py b/django_airavata/apps/auth/urls.py
index df83056..6a07f94 100644
--- a/django_airavata/apps/auth/urls.py
+++ b/django_airavata/apps/auth/urls.py
@@ -11,4 +11,4 @@ urlpatterns = [
     url(r'^logout$', views.start_logout, name='logout'),
     url(r'^callback', views.callback, name='callback'),
     url(r'^error', views.auth_error, name='error'),
-]
\ No newline at end of file
+]
diff --git a/django_airavata/apps/auth/views.py b/django_airavata/apps/auth/views.py
index 39f9213..e0d196e 100644
--- a/django_airavata/apps/auth/views.py
+++ b/django_airavata/apps/auth/views.py
@@ -68,8 +68,8 @@ def start_logout(request):
     logout(request)
     redirect_url = request.build_absolute_uri(
         reverse(settings.LOGOUT_REDIRECT_URL))
-    return redirect(settings.KEYCLOAK_LOGOUT_URL
-                    + "?redirect_uri=" + quote(redirect_url))
+    return redirect(settings.KEYCLOAK_LOGOUT_URL +
+                    "?redirect_uri=" + quote(redirect_url))
 
 
 def callback(request):
diff --git a/django_airavata/apps/groups/admin.py b/django_airavata/apps/groups/admin.py
index 8c38f3f..b97a94f 100755
--- a/django_airavata/apps/groups/admin.py
+++ b/django_airavata/apps/groups/admin.py
@@ -1,3 +1,2 @@
-from django.contrib import admin
 
 # Register your models here.
diff --git a/django_airavata/apps/groups/forms.py b/django_airavata/apps/groups/forms.py
index d3ba029..79ee8eb 100755
--- a/django_airavata/apps/groups/forms.py
+++ b/django_airavata/apps/groups/forms.py
@@ -1,6 +1,7 @@
 # Create your forms here.
 from django import forms
 
+
 class CreateForm(forms.Form):
     domain_id = forms.CharField(required=True, widget=forms.HiddenInput)
     group_name = forms.CharField(required=True)
@@ -10,22 +11,28 @@ class CreateForm(forms.Form):
     )
     group_owner = forms.CharField(required=True, widget=forms.HiddenInput)
     CHOICES1 = (('1', 'User Level',), ('2', 'Admin Level',))
-    group_type = forms.ChoiceField(widget=forms.HiddenInput, choices=CHOICES1, required=True)
+    group_type = forms.ChoiceField(
+        widget=forms.HiddenInput, choices=CHOICES1, required=True)
     CHOICES2 = (('0', 'Single User',), ('1', 'Multi User',))
-    group_cardinality = forms.ChoiceField(widget=forms.HiddenInput, choices=CHOICES2, required=True)
+    group_cardinality = forms.ChoiceField(
+        widget=forms.HiddenInput, choices=CHOICES2, required=True)
 
-#class AddForm(forms.Form):
+# class AddForm(forms.Form):
 #    users = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple, required=False)
 
-#class RemoveForm(forms.Form):
+# class RemoveForm(forms.Form):
 #    members = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple, required=False)
 
+
 class AddForm(forms.Form):
     def __init__(self, data=None, user_choices=None):
         super().__init__(data=data)
-        self.fields["users"] = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple, choices=user_choices)
+        self.fields["users"] = forms.MultipleChoiceField(
+            widget=forms.CheckboxSelectMultiple, choices=user_choices)
+
 
 class RemoveForm(forms.Form):
     def __init__(self, data=None, user_choices=None):
         super().__init__(data=data)
-        self.fields["members"] = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple, choices=user_choices)
+        self.fields["members"] = forms.MultipleChoiceField(
+            widget=forms.CheckboxSelectMultiple, choices=user_choices)
diff --git a/django_airavata/apps/groups/models.py b/django_airavata/apps/groups/models.py
index 71a8362..35e0d64 100755
--- a/django_airavata/apps/groups/models.py
+++ b/django_airavata/apps/groups/models.py
@@ -1,3 +1,2 @@
-from django.db import models
 
 # Create your models here.
diff --git a/django_airavata/apps/groups/tests.py b/django_airavata/apps/groups/tests.py
index 7ce503c..4929020 100755
--- a/django_airavata/apps/groups/tests.py
+++ b/django_airavata/apps/groups/tests.py
@@ -1,3 +1,2 @@
-from django.test import TestCase
 
 # Create your tests here.
diff --git a/django_airavata/apps/groups/views.py b/django_airavata/apps/groups/views.py
index 0054516..610442d 100755
--- a/django_airavata/apps/groups/views.py
+++ b/django_airavata/apps/groups/views.py
@@ -1,17 +1,17 @@
 # Create your views here.
+import datetime
+import logging
+import uuid
+
 from django.conf import settings
+from django.contrib import messages
 from django.contrib.auth.decorators import login_required
-from django.shortcuts import render, redirect
+from django.shortcuts import redirect, render
 from rest_framework.renderers import JSONRenderer
 
-from .forms import CreateForm, AddForm, RemoveForm
-from django.contrib import messages
-from airavata.model.sharing.ttypes import UserGroup
-from airavata.model.sharing.ttypes import GroupCardinality
-import datetime
-import uuid
+from airavata.model.sharing.ttypes import GroupCardinality, UserGroup
 
-import logging
+from .forms import CreateForm
 
 logger = logging.getLogger(__name__)
 
@@ -20,12 +20,12 @@ logger = logging.getLogger(__name__)
 def groups_manage(request):
 
     request.active_nav_item = "manage"
-    gateway_id = settings.GATEWAY_ID
     username = request.user.username
     authz_token = request.authz_token
 
     try:
-        owner_list = request.profile_service['group_manager'].getAllGroupsUserBelongs(authz_token, username)
+        owner_list = request.profile_service['group_manager'].getAllGroupsUserBelongs(
+            authz_token, username)
         # for group in owner_list:
         #     if group.groupCardinality == 0:
         #         owner_list.remove(group)
@@ -36,7 +36,8 @@ def groups_manage(request):
 
         owner = JSONRenderer().render(owner_list)
 
-        member_list = request.profile_service['group_manager'].getAllGroupsUserBelongs(authz_token, username)
+        member_list = request.profile_service['group_manager'].getAllGroupsUserBelongs(
+            authz_token, username)
         # member = []
         # for group in member_list:
         #     if group.ownerId != username:
@@ -48,42 +49,67 @@ def groups_manage(request):
             'groups_owners_data': owner, 'groups_members_data': member
         })
 
-    except:
+    except BaseException as e:
         logger.exception("Failed to load the Manage Groups page")
         return redirect('/')
 
+
 @login_required
 def groups_create(request):
 
     gateway_id = settings.GATEWAY_ID
     username = request.user.username
-    #If role = user
+    # If role = user
     group_type = 1
-    #Else if role = admin
-    #group_type = 2
+    # Else if role = admin
+    # group_type = 2
     group_cardinality = GroupCardinality.MULTI_USER
 
     if request.method == 'POST':
-        form = CreateForm(request.POST, request.FILES, initial={'domain_id': gateway_id, 'group_owner': username, 'group_type': group_type, 'group_cardinality': group_cardinality})
+        form = CreateForm(
+            request.POST,
+            request.FILES,
+            initial={
+                'domain_id': gateway_id,
+                'group_owner': username,
+                'group_type': group_type,
+                'group_cardinality': group_cardinality})
         if form.is_valid():
-            group_name = form.cleaned_data.get('group_name').replace(" ","-").lower()
+            group_name = form.cleaned_data.get(
+                'group_name').replace(" ", "-").lower()
             group_id = group_name + str(uuid.uuid4().hex)
-            group = UserGroup(groupId=group_id, domainId=gateway_id, name=form.cleaned_data.get('group_name'), description=form.cleaned_data.get('description'), ownerId=username, groupType=group_type, groupCardinality=group_cardinality, createdTime=None, updatedTime=None)
+            group = UserGroup(
+                groupId=group_id,
+                domainId=gateway_id,
+                name=form.cleaned_data.get('group_name'),
+                description=form.cleaned_data.get('description'),
+                ownerId=username,
+                groupType=group_type,
+                groupCardinality=group_cardinality,
+                createdTime=None,
+                updatedTime=None)
             try:
-                create = request.sharing_client.createGroup(group)
-                messages.success(request, 'Group '+group_id+' has been created successfully!')
+                create = request.sharing_client.createGroup(group)  # noqa
+                messages.success(request, 'Group ' + group_id +
+                                 ' has been created successfully!')
                 return redirect('/groups')
             except Exception as e:
                 logger.exception("Failed to create the group")
                 return redirect('/groups')
 
     else:
-        form = CreateForm(initial={'domain_id': gateway_id, 'group_owner': username, 'group_type': group_type, 'group_cardinality': group_cardinality})
+        form = CreateForm(
+            initial={
+                'domain_id': gateway_id,
+                'group_owner': username,
+                'group_type': group_type,
+                'group_cardinality': group_cardinality})
 
     return render(request, 'django_airavata_groups/groups_create.html', {
         'form': form
     })
 
+
 @login_required
 def view_group(request):
 
@@ -93,12 +119,17 @@ def view_group(request):
 
     try:
         details = request.sharing_client.getGroup(gateway_id, group_id)
-        members = request.sharing_client.getGroupMembersOfTypeUser(gateway_id, group_id, 0, -1)
-        c_time = datetime.datetime.fromtimestamp(details.createdTime/1000.0)
-        u_time = datetime.datetime.fromtimestamp(details.updatedTime/1000.0)
-        return render(request, 'django_airavata_groups/group_details.html', {
-            'group': details, 'c_time': c_time, 'u_time': u_time, 'members': members, 'u_id': user
-        })
+        members = request.sharing_client.getGroupMembersOfTypeUser(
+            gateway_id, group_id, 0, -1)
+        c_time = datetime.datetime.fromtimestamp(details.createdTime / 1000.0)
+        u_time = datetime.datetime.fromtimestamp(details.updatedTime / 1000.0)
+        return render(request,
+                      'django_airavata_groups/group_details.html',
+                      {'group': details,
+                       'c_time': c_time,
+                       'u_time': u_time,
+                       'members': members,
+                       'u_id': user})
     except Exception as e:
         logger.exception("Failed to load the group details")
         return redirect('/groups')
@@ -119,13 +150,15 @@ def delete_group(request):
     group_id = request.GET.get('group_id')
 
     try:
-        delete = request.sharing_client.deleteGroup(gateway_id, group_id)
-        messages.success(request, 'Group '+group_id+' has been deleted successfully!')
+        delete = request.sharing_client.deleteGroup(gateway_id, group_id)  # noqa
+        messages.success(request, 'Group ' + group_id +
+                         ' has been deleted successfully!')
         return redirect('/groups')
     except Exception as e:
         logger.exception("Failed to delete the group")
         return redirect('/groups')
 
+
 @login_required
 def leave_group(request):
 
@@ -134,8 +167,10 @@ def leave_group(request):
     user = request.user.username
 
     try:
-        leave = request.sharing_client.removeUsersFromGroup(gateway_id, [user], group_id)
-        messages.success(request, 'You are no longer a member of '+group_id+'.')
+        leave = request.sharing_client.removeUsersFromGroup(  # noqa
+            gateway_id, [user], group_id)
+        messages.success(
+            request, 'You are no longer a member of ' + group_id + '.')
         return redirect('/groups')
     except Exception as e:
         logger.exception("Failed to leave the group")
diff --git a/django_airavata/apps/workspace/admin.py b/django_airavata/apps/workspace/admin.py
index 8c38f3f..b97a94f 100644
--- a/django_airavata/apps/workspace/admin.py
+++ b/django_airavata/apps/workspace/admin.py
@@ -1,3 +1,2 @@
-from django.contrib import admin
 
 # Register your models here.
diff --git a/django_airavata/apps/workspace/models.py b/django_airavata/apps/workspace/models.py
index 71a8362..35e0d64 100644
--- a/django_airavata/apps/workspace/models.py
+++ b/django_airavata/apps/workspace/models.py
@@ -1,3 +1,2 @@
-from django.db import models
 
 # Create your models here.
diff --git a/django_airavata/apps/workspace/signals.py b/django_airavata/apps/workspace/signals.py
index 664b08f..da7c673 100644
--- a/django_airavata/apps/workspace/signals.py
+++ b/django_airavata/apps/workspace/signals.py
@@ -52,8 +52,8 @@ def create_user_profile_for_new_user(sender, request, user, **kwargs):
             log.debug("UserProfile doesn't exist for {username}, "
                       "creating...".format(username=user.username))
             new_user_profile = UserProfile()
-            new_user_profile.airavataInternalUserId = (user.username + "@"
-                                                       + settings.GATEWAY_ID)
+            new_user_profile.airavataInternalUserId = (user.username + "@" +
+                                                       settings.GATEWAY_ID)
             new_user_profile.userId = user.username
             new_user_profile.gatewayId = settings.GATEWAY_ID
             new_user_profile.emails = [user.email]
diff --git a/django_airavata/apps/workspace/tests.py b/django_airavata/apps/workspace/tests.py
index 7ce503c..4929020 100644
--- a/django_airavata/apps/workspace/tests.py
+++ b/django_airavata/apps/workspace/tests.py
@@ -1,3 +1,2 @@
-from django.test import TestCase
 
 # Create your tests here.
diff --git a/django_airavata/apps/workspace/views.py b/django_airavata/apps/workspace/views.py
index fda96ca..6a217ff 100644
--- a/django_airavata/apps/workspace/views.py
+++ b/django_airavata/apps/workspace/views.py
@@ -6,14 +6,11 @@ from urllib.parse import urlparse
 
 from django.conf import settings
 from django.contrib.auth.decorators import login_required
-from django.core.exceptions import SuspiciousFileOperation
 from django.core.files.storage import FileSystemStorage
-from django.http import HttpResponse, JsonResponse, FileResponse
-from django.http.response import HttpResponseBadRequest
+from django.http import JsonResponse
 from django.shortcuts import render
 from rest_framework.renderers import JSONRenderer
 
-from airavata.model.application.io.ttypes import DataType
 from airavata.model.data.replica.ttypes import (DataProductModel,
                                                 DataProductType,
                                                 DataReplicaLocationModel,
@@ -59,9 +56,9 @@ def projects_list(request):
 def create_experiment(request, app_module_id):
     request.active_nav_item = 'dashboard'
 
-    return render(request, 'django_airavata_workspace/create_experiment.html', {
-        'app_module_id': app_module_id
-    })
+    return render(request,
+                  'django_airavata_workspace/create_experiment.html',
+                  {'app_module_id': app_module_id})
 
 
 @login_required
diff --git a/django_airavata/context_processors.py b/django_airavata/context_processors.py
index 5989a83..f1ad0fc 100644
--- a/django_airavata/context_processors.py
+++ b/django_airavata/context_processors.py
@@ -11,7 +11,8 @@ def airavata_app_registry(request):
     airavata_apps.sort(
         key=lambda app: "{:09}-{}".format(app.app_order,
                                           app.verbose_name.lower()))
-    current_airavata_app = [app for app in airavata_apps if app.url_app_name == request.resolver_match.app_name]
+    current_airavata_app = [
+        app for app in airavata_apps if app.url_app_name == request.resolver_match.app_name]
     current_airavata_app = current_airavata_app[0]\
         if len(current_airavata_app) > 0 else None
     return {
diff --git a/django_airavata/middleware.py b/django_airavata/middleware.py
index a49ce87..f7e31a6 100644
--- a/django_airavata/middleware.py
+++ b/django_airavata/middleware.py
@@ -18,7 +18,8 @@ def airavata_client(get_response):
                     request.airavata_client = airavata_client
                     response = get_response(request)
             except utils.ThriftConnectionException as e:
-                logger.exception("Failed to open thrift connection to API server")
+                logger.exception(
+                    "Failed to open thrift connection to API server")
                 # if request.airavata_client is None, this will indicate to view
                 # code that the API server is down
                 request.airavata_client = None
@@ -70,9 +71,9 @@ def profile_service_client(get_response):
         if request.user.is_authenticated:
             try:
                 with utils.get_group_manager_client() as group_manager_client, \
-                     utils.get_iam_admin_client() as iam_admin_client, \
-                     utils.get_tenant_profile_client() as tenant_profile_client, \
-                     utils.get_user_profile_client() as user_profile_client:
+                        utils.get_iam_admin_client() as iam_admin_client, \
+                        utils.get_tenant_profile_client() as tenant_profile_client, \
+                        utils.get_user_profile_client() as user_profile_client:
                     request.profile_service = {
                         'group_manager': group_manager_client,
                         'iam_admin': iam_admin_client,
diff --git a/django_airavata/settings.py b/django_airavata/settings.py
index ed05acf..dab69a5 100644
--- a/django_airavata/settings.py
+++ b/django_airavata/settings.py
@@ -76,14 +76,14 @@ MIDDLEWARE = [
     'django.middleware.clickjacking.XFrameOptionsMiddleware',
     'django_airavata.apps.auth.middleware.authz_token_middleware',
     'django_airavata.middleware.airavata_client',
-     'django_airavata.middleware.sharing_client',
+    'django_airavata.middleware.sharing_client',
     'django_airavata.middleware.profile_service_client',
     # Needs to come after authz_token_middleware, airavata_client and
     # profile_service_client
     'django_airavata.apps.auth.middleware.gateway_groups_middleware',
     # Wagtail related middleware
     'wagtail.core.middleware.SiteMiddleware',
-    'wagtail.contrib.redirects.middleware.RedirectMiddleware',  
+    'wagtail.contrib.redirects.middleware.RedirectMiddleware',
 ]
 
 ROOT_URLCONF = 'django_airavata.urls'
diff --git a/django_airavata/urls.py b/django_airavata/urls.py
index 8be375b..fe9b2a9 100644
--- a/django_airavata/urls.py
+++ b/django_airavata/urls.py
@@ -13,15 +13,12 @@ Including another URLconf
     1. Import the include() function: from django.conf.urls import url, include
     2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
 """
-from django.conf.urls import url, include
-from django.contrib import admin
 from django.conf import settings
+from django.conf.urls import include, url
 from django.conf.urls.static import static
-
-# wagtail related imports
 from wagtail.admin import urls as wagtailadmin_urls
-from wagtail.documents import urls as wagtaildocs_urls
 from wagtail.core import urls as wagtail_urls
+from wagtail.documents import urls as wagtaildocs_urls
 
 from . import views
 
@@ -35,4 +32,4 @@ urlpatterns = [
     url(r'^cms/', include(wagtailadmin_urls)),
     url(r'^documents/', include(wagtaildocs_urls)),
     url(r'', include(wagtail_urls)),
-]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
diff --git a/django_airavata/views.py b/django_airavata/views.py
index ba2fc8c..c7c334e 100644
--- a/django_airavata/views.py
+++ b/django_airavata/views.py
@@ -1,8 +1,4 @@
-
-from django.http import HttpResponse
-from django.shortcuts import render, redirect
-
-import logging
+from django.shortcuts import render
 
 
 def home(request):
diff --git a/django_airavata/wagtailapps/base/blocks.py b/django_airavata/wagtailapps/base/blocks.py
index 63c2d1e..750632b 100644
--- a/django_airavata/wagtailapps/base/blocks.py
+++ b/django_airavata/wagtailapps/base/blocks.py
@@ -1,9 +1,9 @@
-from wagtail.images.blocks import ImageChooserBlock
+from wagtail.core.blocks import (BooleanBlock, CharBlock, ChoiceBlock,
+                                 IntegerBlock, RawHTMLBlock, RichTextBlock,
+                                 StreamBlock, StructBlock, TextBlock)
 from wagtail.embeds.blocks import EmbedBlock
-from wagtail.snippets.blocks import SnippetChooserBlock
-from wagtail.core.blocks import (
-    CharBlock, ChoiceBlock, RichTextBlock, StreamBlock, StructBlock, TextBlock, ListBlock, BooleanBlock, StaticBlock, IntegerBlock, RawHTMLBlock
-)
+from wagtail.images.blocks import ImageChooserBlock
+
 
 class ImageBlock(StructBlock):
     """
@@ -14,8 +14,15 @@ class ImageBlock(StructBlock):
     caption = CharBlock(required=False)
     width = CharBlock(required=False)
     height = IntegerBlock(required=False)
-    redirect_url = TextBlock(required=False,null=True,blank=True,help_text="Give a redirect link on clicking the image")
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    redirect_url = TextBlock(
+        required=False,
+        null=True,
+        blank=True,
+        help_text="Give a redirect link on clicking the image")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = 'image'
@@ -26,20 +33,32 @@ class FontAwesomeIcon(StructBlock):
     """
     Custom 'StructBlock' for utilizing images with associated caption and attribution django_airavata
     """
-    icon_tag = TextBlock(required=True, blank=False, help_text = "Provide a font awesome icon class text")
-    icon_size = IntegerBlock(required=False,default=2,null=True, blank=True, help_text = "Provide a icon size in number type")
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    icon_tag = TextBlock(required=True, blank=False,
+                         help_text="Provide a font awesome icon class text")
+    icon_size = IntegerBlock(
+        required=False,
+        default=2,
+        null=True,
+        blank=True,
+        help_text="Provide a icon size in number type")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = 'fa-flag'
         template = "blocks/font_awesome_icon_block.html"
 
 
-class ParagraphBlock(StructBlock) :
+class ParagraphBlock(StructBlock):
     """
     Custom 'StructBlock' for creating rich text content
     """
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
     body = RichTextBlock()
 
     class Meta:
@@ -52,7 +71,10 @@ class IuFooter(StructBlock):
     """
     Custom 'StructBlock' for creating IU Footer
     """
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
     footer_links = RichTextBlock()
 
     class Meta:
@@ -73,17 +95,24 @@ class HeadingBlock(StructBlock):
         ('h3', 'H3'),
         ('h4', 'H4')
     ], blank=True, required=False)
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "title"
         template = "blocks/heading_block.html"
 
+
 class PlaceholderBlock(StructBlock):
     """
     Custom 'StructBlock' that acts as a placeholder
     """
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-map-marker"
@@ -95,7 +124,10 @@ class CustomEmbedBlock(StructBlock):
     Custom 'StructBlock' that allows you to embed videos
     """
     embed = EmbedBlock()
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-link"
@@ -107,20 +139,30 @@ class CssCommentBlock(StructBlock):
     """
     CSS Comment block
     """
-    message = TextBlock(required=True, help_text="Write some comment to mark the css")
+    message = TextBlock(
+        required=True, help_text="Write some comment to mark the css")
 
     class Meta:
         icon = "fa-comment"
         template = "blocks/css_comment.html"
         help_text = "Css Comment"
 
+
 class HorizontalRule(StructBlock):
     """
     HorizontalRule
     """
-    thickness = IntegerBlock(required=False,blank=True,help_text="Enter a thickness integer value. Eg(10)")
-    bg_color = TextBlock(required=True,help_text="Enter a hexcode color for the rule Eg(#000000)")
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    thickness = IntegerBlock(
+        required=False,
+        blank=True,
+        help_text="Enter a thickness integer value. Eg(10)")
+    bg_color = TextBlock(
+        required=True,
+        help_text="Enter a hexcode color for the rule Eg(#000000)")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-long-arrow-right"
@@ -139,18 +181,21 @@ class BootstrapJumbotron(StructBlock):
     button_text = TextBlock(required=False)
     button_link = TextBlock(required=False)
     button_color = ChoiceBlock(choices=[
-        ('btn-primary','DEFAULT'),
-        ('btn-danger', 'RED' ),
+        ('btn-primary', 'DEFAULT'),
+        ('btn-danger', 'RED'),
         ('btn-secondary', 'GREY'),
         ('btn-success', 'GREEN'),
         ('btn-warning', 'ORANGE')
     ], blank=True, required=False, help_text="select a button color")
     button_size = ChoiceBlock(choices=[
-        ('','DEFAULT'),
+        ('', 'DEFAULT'),
         ('btn-lg', 'LARGE'),
         ('btn-sm', 'SMALL')
     ], blank=True, required=False, help_text="select a button size")
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-indent"
@@ -165,18 +210,21 @@ class BootstrapButton(StructBlock):
     button_text = TextBlock()
     button_link = TextBlock()
     button_color = ChoiceBlock(choices=[
-        ('btn-primary','DEFAULT'),
+        ('btn-primary', 'DEFAULT'),
         ('btn-danger', 'RED'),
         ('btn-secondary', 'GREY'),
         ('btn-success', 'GREEN'),
         ('btn-warning', 'ORANGE')
     ], blank=True, required=False, help_text="select a button color")
     button_size = ChoiceBlock(choices=[
-        ('','DEFAULT'),
+        ('', 'DEFAULT'),
         ('btn-lg', 'LARGE'),
         ('btn-sm', 'SMALL')
     ], blank=True, required=False, help_text="select a button size")
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-bold"
@@ -200,23 +248,30 @@ class BootstrapAlert(StructBlock):
     ], blank=True, required=False, help_text="select a background color")
     is_link = BooleanBlock(required=False)
     alert_link = TextBlock(required=False)
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-bell"
         template = "blocks/bootstrap/alert.html"
         help_text = "Create a bootstrap alert"
 
+
 class BootstrapCard(StructBlock):
     """
     Custom 'StructBlock' that allows the user to make a bootstrap card
     """
 
-    card_width = IntegerBlock(help_text="18 works best for card", required=False, blank=True)
+    card_width = IntegerBlock(
+        help_text="18 works best for card", required=False, blank=True)
     is_card_img = BooleanBlock(required=False)
     card_img = ImageChooserBlock(required=False)
-    card_img_width = IntegerBlock(required=False, help_text="provide an image width")
-    card_img_height = IntegerBlock(required=False, help_text="provide an image height")
+    card_img_width = IntegerBlock(
+        required=False, help_text="provide an image width")
+    card_img_height = IntegerBlock(
+        required=False, help_text="provide an image height")
     card_title = TextBlock(required=False, null=True, blank=True)
     card_text = RichTextBlock(required=False, null=True, blank=True)
     card_bg_color = ChoiceBlock(choices=[
@@ -237,16 +292,19 @@ class BootstrapCard(StructBlock):
         ('text-dark', 'DARK'),
         ('text-light', 'LIGHT'),
     ], blank=True, required=False, help_text="select a text color")
-    btn_text = TextBlock(required = False)
+    btn_text = TextBlock(required=False)
     btn_color = ChoiceBlock(choices=[
-        ('btn-primary','DEFAULT'),
+        ('btn-primary', 'DEFAULT'),
         ('btn-danger', 'RED'),
         ('btn-secondary', 'GREY'),
         ('btn-success', 'GREEN'),
         ('btn-warning', 'ORANGE')
     ], blank=True, required=False, help_text="select a button color")
     btn_link = TextBlock(required=False)
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-id-card"
@@ -259,21 +317,34 @@ class BootstrapCarousel(StructBlock):
     Custom 'StructBlock' that allows the user to make a bootstrap carousel
     """
     c_image1 = ImageChooserBlock(required=True)
-    c_image1_title = TextBlock(required=False, blank=True, help_text="Give a title for image 1")
-    c_image1_body = TextBlock(required=False, blank=True, help_text="Give a body for image 1")
+    c_image1_title = TextBlock(
+        required=False, blank=True, help_text="Give a title for image 1")
+    c_image1_body = TextBlock(
+        required=False, blank=True, help_text="Give a body for image 1")
     c_image2 = ImageChooserBlock(required=False)
-    c_image2_title = TextBlock(required=False, blank=True, help_text="Give a title for image 2")
-    c_image2_body = TextBlock(required=False, blank=True, help_text="Give a body for image 2")
+    c_image2_title = TextBlock(
+        required=False, blank=True, help_text="Give a title for image 2")
+    c_image2_body = TextBlock(
+        required=False, blank=True, help_text="Give a body for image 2")
     c_image3 = ImageChooserBlock(required=False)
-    c_image3_title = TextBlock(required=False, blank=True, help_text="Give a title for image 3")
-    c_image3_body = TextBlock(required=False, blank=True, help_text="Give a body for image 3")
+    c_image3_title = TextBlock(
+        required=False, blank=True, help_text="Give a title for image 3")
+    c_image3_body = TextBlock(
+        required=False, blank=True, help_text="Give a body for image 3")
     c_image4 = ImageChooserBlock(required=False)
-    c_image4_title = TextBlock(required=False, blank=True, help_text="Give a title for image 4")
-    c_image4_body = TextBlock(required=False, blank=True, help_text="Give a body for image 4")
+    c_image4_title = TextBlock(
+        required=False, blank=True, help_text="Give a title for image 4")
+    c_image4_body = TextBlock(
+        required=False, blank=True, help_text="Give a body for image 4")
     c_image5 = ImageChooserBlock(required=False)
-    c_image5_title = TextBlock(required=False, blank=True, help_text="Give a title for image 5")
-    c_image5_body = TextBlock(required=False, blank=True, help_text="Give a body for image 5")
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    c_image5_title = TextBlock(
+        required=False, blank=True, help_text="Give a title for image 5")
+    c_image5_body = TextBlock(
+        required=False, blank=True, help_text="Give a body for image 5")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-film"
@@ -295,7 +366,10 @@ class BootstrapWell(StructBlock):
         ('bg-dark', 'DARK'),
         ('bg-light', 'LIGHT'),
     ], blank=True, required=False, help_text="select a background color")
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-window-minimize"
@@ -308,11 +382,24 @@ class BootstrapMediaObject(StructBlock):
     """
     media_img = ImageChooserBlock(required=True)
     media_img_alt = TextBlock(required=True)
-    media_img_width = IntegerBlock(required=False,blank=True,help_text="Enter an image width as an integer value. Eg(50)")
-    media_img_height = IntegerBlock(required=False,blank=True,help_text="Enter an image height as an integer value Eg(50)")
-    heading_text = TextBlock(required=False,blank=True,help_text = "enter some heading text for media object")
-    body_text = RichTextBlock(required=True,help_text="Enter some message for the media object")
-    custom_class = TextBlock(required=False,blank=True, help_text="control this element by giving unique class names separated by space and styling the class in css")
+    media_img_width = IntegerBlock(
+        required=False,
+        blank=True,
+        help_text="Enter an image width as an integer value. Eg(50)")
+    media_img_height = IntegerBlock(
+        required=False,
+        blank=True,
+        help_text="Enter an image height as an integer value Eg(50)")
+    heading_text = TextBlock(
+        required=False,
+        blank=True,
+        help_text="enter some heading text for media object")
+    body_text = RichTextBlock(
+        required=True, help_text="Enter some message for the media object")
+    custom_class = TextBlock(
+        required=False,
+        blank=True,
+        help_text="control this element by giving unique class names separated by space and styling the class in css")
 
     class Meta:
         icon = "fa-align-right"
@@ -340,6 +427,7 @@ class BaseStreamBlock(StreamBlock):
     font_awesome_icon_block = FontAwesomeIcon()
     iu_footer_block = IuFooter()
 
+
 class CssStreamBlock(StreamBlock):
     """
     Define the custom blocks for css that 'StreamField' will utilize
diff --git a/django_airavata/wagtailapps/base/image_formats.py b/django_airavata/wagtailapps/base/image_formats.py
index 6259060..8a18081 100644
--- a/django_airavata/wagtailapps/base/image_formats.py
+++ b/django_airavata/wagtailapps/base/image_formats.py
@@ -1,4 +1,10 @@
-from wagtail.images.formats import unregister_image_format,register_image_format,Format
+from wagtail.images.formats import Format, register_image_format
 
-register_image_format(Format('brand-logo', 'Brand Logo', 'richtext-image seagrid-logo', 'max-140x43'))
-register_image_format(Format('footer-image', 'Footer Image', 'richtext-image original img-responsive', 'max-250x250'))
+register_image_format(Format('brand-logo', 'Brand Logo',
+                             'richtext-image seagrid-logo', 'max-140x43'))
+register_image_format(
+    Format(
+        'footer-image',
+        'Footer Image',
+        'richtext-image original img-responsive',
+        'max-250x250'))
diff --git a/django_airavata/wagtailapps/base/management/commands/load_cybergateway_data.py b/django_airavata/wagtailapps/base/management/commands/load_cybergateway_data.py
index 1ce2a4b..a6f92b3 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_cybergateway_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_cybergateway_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'cybergateway.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_default_gateway.py b/django_airavata/wagtailapps/base/management/commands/load_default_gateway.py
index 88b07b3..0e4afef 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_default_gateway.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_default_gateway.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'default.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_hpcgateway_data.py b/django_airavata/wagtailapps/base/management/commands/load_hpcgateway_data.py
index 39c25ab..7ef07d0 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_hpcgateway_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_hpcgateway_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'hpcgateway.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_nanoconfinement_data.py b/django_airavata/wagtailapps/base/management/commands/load_nanoconfinement_data.py
index c019cd6..c1421e5 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_nanoconfinement_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_nanoconfinement_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'nanoconfinement.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_osu_data.py b/django_airavata/wagtailapps/base/management/commands/load_osu_data.py
index a393491..efe49c3 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_osu_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_osu_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'osu.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_phasta_data.py b/django_airavata/wagtailapps/base/management/commands/load_phasta_data.py
index 3a2ab46..e026d70 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_phasta_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_phasta_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'phasta.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_seagrid_data.py b/django_airavata/wagtailapps/base/management/commands/load_seagrid_data.py
index f0178e8..e8523a1 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_seagrid_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_seagrid_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'seagrid.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_searching_sra_data.py b/django_airavata/wagtailapps/base/management/commands/load_searching_sra_data.py
index 8e86deb..e007335 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_searching_sra_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_searching_sra_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'searchingsra.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_simccs_data.py b/django_airavata/wagtailapps/base/management/commands/load_simccs_data.py
index 0120eff..c4b5324 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_simccs_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_simccs_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'simccs.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_simvascular_data.py b/django_airavata/wagtailapps/base/management/commands/load_simvascular_data.py
index 21d666e..0e9d90d 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_simvascular_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_simvascular_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'simvascular.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_siu_data.py b/django_airavata/wagtailapps/base/management/commands/load_siu_data.py
index bfd8438..20f5af9 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_siu_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_siu_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'siu.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/management/commands/load_south_dakota_data.py b/django_airavata/wagtailapps/base/management/commands/load_south_dakota_data.py
index f5b5dfd..c18c71b 100644
--- a/django_airavata/wagtailapps/base/management/commands/load_south_dakota_data.py
+++ b/django_airavata/wagtailapps/base/management/commands/load_south_dakota_data.py
@@ -9,7 +9,8 @@ from wagtail.core.models import Site, Page
 
 class Command(BaseCommand):
     def handle(self, **options):
-        fixtures_dir = os.path.join(settings.BASE_DIR, 'django_airavata','wagtailapps', 'base','fixtures')
+        fixtures_dir = os.path.join(
+            settings.BASE_DIR, 'django_airavata', 'wagtailapps', 'base', 'fixtures')
         fixture_file = os.path.join(fixtures_dir, 'southdakota.json')
 
         # Wagtail creates default Site and Page instances during install, but we already have
@@ -17,7 +18,8 @@ class Command(BaseCommand):
         if Site.objects.filter(hostname='localhost').exists():
             Site.objects.get(hostname='localhost').delete()
         if Page.objects.filter(title='Welcome to your new Wagtail site!').exists():
-            Page.objects.get(title='Welcome to your new Wagtail site!').delete()
+            Page.objects.get(
+                title='Welcome to your new Wagtail site!').delete()
 
         call_command('loaddata', fixture_file, verbosity=0)
 
diff --git a/django_airavata/wagtailapps/base/models.py b/django_airavata/wagtailapps/base/models.py
index 18c4d87..74d932c 100644
--- a/django_airavata/wagtailapps/base/models.py
+++ b/django_airavata/wagtailapps/base/models.py
@@ -1,30 +1,17 @@
 from __future__ import unicode_literals
 
 from django.db import models
-
 from modelcluster.fields import ParentalKey
-from modelcluster.models import ClusterableModel
-
-from wagtail.admin.edit_handlers import (
-    FieldPanel,
-    FieldRowPanel,
-    InlinePanel,
-    MultiFieldPanel,
-    PageChooserPanel,
-    StreamFieldPanel,
-    TabbedInterface,
-    ObjectList
-)
+from wagtail.admin.edit_handlers import (FieldPanel,
+                                         InlinePanel, MultiFieldPanel,
+                                         ObjectList, PageChooserPanel,
+                                         StreamFieldPanel, TabbedInterface)
 from wagtail.core.fields import RichTextField, StreamField
-from wagtail.core.models import Collection, Page, Orderable
-from wagtail.core.blocks import RawHTMLBlock
+from wagtail.core.models import Orderable, Page
 from wagtail.images.edit_handlers import ImageChooserPanel
-from wagtail.search import index
 from wagtail.snippets.models import register_snippet
 
-from .blocks import BaseStreamBlock
-from .blocks import CssStreamBlock
-from wagtail.snippets.blocks import SnippetChooserBlock
+from .blocks import BaseStreamBlock, CssStreamBlock
 
 
 @register_snippet
@@ -37,13 +24,13 @@ class Announcements(models.Model):
     """
     announcement_text = models.CharField(
         max_length=255,
-        help_text = 'Provide an announcement text',
-        default = 'Announcement Text'
+        help_text='Provide an announcement text',
+        default='Announcement Text'
     )
     announcement_link = models.CharField(
         max_length=255,
-        help_text = 'Give a redirect link for announcement',
-        default = 'Announcement Link'
+        help_text='Give a redirect link for announcement',
+        default='Announcement Link'
     )
 
     panels = [
@@ -58,7 +45,6 @@ class Announcements(models.Model):
         verbose_name_plural = 'Announcement'
 
 
-
 @register_snippet
 class NavExtra(models.Model):
     """
@@ -75,19 +61,57 @@ class NavExtra(models.Model):
         related_name='+',
         help_text='Nav Extra Logo'
     )
-    nav_logo_width = models.IntegerField(null=True,blank=True, help_text="Navbar Logo width")
-    nav_logo_height = models.IntegerField(null=True,blank=True, help_text="Navbar Logo height")
-    nav_logo_link = models.CharField(max_length=255, default="#", help_text="Give a redirect link for the Logo")
-    nav_text1 = models.CharField(max_length=25, help_text = "Give a text for link 1")
-    faicon1 = models.CharField(max_length = 50, help_text="Provide a class name of icon from font awesome website")
-    nav_link1 = models.CharField(max_length=255, help_text = "Provide a link address for link 1")
-    nav_text2 = models.CharField(max_length=25, help_text = "Give a text for link 2", null=True, blank=True)
-    faicon2 = models.CharField(max_length = 50, help_text="Provide a class name of icon from font awesome website", null=True,blank=True)
-    nav_link2 = models.CharField(max_length=255, help_text = "Provide a link address for link 2", null=True, blank=True)
-    nav_text3 = models.CharField(max_length=25, help_text = "Give a text for link 3", null=True, blank=True)
-    faicon3 = models.CharField(max_length = 50, help_text="Provide a class name of icon from font awesome website", null=True,blank=True)
-    nav_link3 = models.CharField(max_length=255, help_text = "Provide a link address for link 3", null=True, blank=True)
-    custom_class = models.CharField(max_length=255, help_text = "Provide custom class names separated by space to gain extra control of nav", null=True, blank=True,)
+    nav_logo_width = models.IntegerField(
+        null=True, blank=True, help_text="Navbar Logo width")
+    nav_logo_height = models.IntegerField(
+        null=True, blank=True, help_text="Navbar Logo height")
+    nav_logo_link = models.CharField(
+        max_length=255,
+        default="#",
+        help_text="Give a redirect link for the Logo")
+    nav_text1 = models.CharField(
+        max_length=25, help_text="Give a text for link 1")
+    faicon1 = models.CharField(
+        max_length=50,
+        help_text="Provide a class name of icon from font awesome website")
+    nav_link1 = models.CharField(
+        max_length=255, help_text="Provide a link address for link 1")
+    nav_text2 = models.CharField(
+        max_length=25,
+        help_text="Give a text for link 2",
+        null=True,
+        blank=True)
+    faicon2 = models.CharField(
+        max_length=50,
+        help_text="Provide a class name of icon from font awesome website",
+        null=True,
+        blank=True)
+    nav_link2 = models.CharField(
+        max_length=255,
+        help_text="Provide a link address for link 2",
+        null=True,
+        blank=True)
+    nav_text3 = models.CharField(
+        max_length=25,
+        help_text="Give a text for link 3",
+        null=True,
+        blank=True)
+    faicon3 = models.CharField(
+        max_length=50,
+        help_text="Provide a class name of icon from font awesome website",
+        null=True,
+        blank=True)
+    nav_link3 = models.CharField(
+        max_length=255,
+        help_text="Provide a link address for link 3",
+        null=True,
+        blank=True)
+    custom_class = models.CharField(
+        max_length=255,
+        help_text="Provide custom class names separated by space to gain extra control of nav",
+        null=True,
+        blank=True,
+    )
 
     panels = [
         ImageChooserPanel('nav_logo'),
@@ -119,7 +143,13 @@ class CustomCss(models.Model):
     Custom CSS
     """
 
-    css = StreamField(CssStreamBlock(), verbose_name="CSS block", blank=True, null=True, help_text="Write custom css and give comments as necessary",default="")
+    css = StreamField(
+        CssStreamBlock(),
+        verbose_name="CSS block",
+        blank=True,
+        null=True,
+        help_text="Write custom css and give comments as necessary",
+        default="")
 
     panels = [
         StreamFieldPanel('css'),
@@ -141,8 +171,10 @@ class FooterText(models.Model):
     navigation_tags.py
     """
     footer = StreamField(
-        BaseStreamBlock(), verbose_name="Footer content block", blank=True, null=True
-    )
+        BaseStreamBlock(),
+        verbose_name="Footer content block",
+        blank=True,
+        null=True)
 
     panels = [
         StreamFieldPanel('footer'),
@@ -173,11 +205,11 @@ class Navbar(models.Model):
     )
 
     logo_redirect_link = models.CharField(
-        max_length = 255,
-        help_text = 'Provide a redirection link for the logo or logo text Eg. (https://www.google.com/)',
+        max_length=255,
+        help_text='Provide a redirection link for the logo or logo text Eg. (https://www.google.com/)',
         null=True,
         blank=True,
-        default = '#',
+        default='#',
     )
 
     boolean_choices = (
@@ -186,44 +218,45 @@ class Navbar(models.Model):
     )
 
     logo_with_text = models.CharField(
-        choices=boolean_choices, max_length=5, help_text="Choose yes if you want to display the text next to the logo", default="no"
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want to display the text next to the logo",
+        default="no")
 
     logo_width = models.IntegerField(
-        help_text = 'Provide a width for the logo',
+        help_text='Provide a width for the logo',
         null=True,
         blank=True,
-        default = '144',
+        default='144',
     )
 
     logo_height = models.IntegerField(
-        help_text = 'Provide a height for the logo',
+        help_text='Provide a height for the logo',
         null=True,
-        blank = True,
-        default = '43'
+        blank=True,
+        default='43'
     )
 
     logo_text = models.CharField(
         max_length=255,
-        help_text = 'Give a title text as an alternative to logo. Eg.(SEAGRID)',
+        help_text='Give a title text as an alternative to logo. Eg.(SEAGRID)',
         null=True,
         blank=True,
     )
 
     logo_text_color = models.CharField(
         max_length=100,
-        help_text = 'Give a color for logo text if you have a logo text Eg.(#FFFFFF)',
+        help_text='Give a color for logo text if you have a logo text Eg.(#FFFFFF)',
         null=True,
         blank=True,
     )
 
     logo_text_size = models.IntegerField(
-        help_text = 'Give a text size as number of pixels Eg.(30)',
+        help_text='Give a text size as number of pixels Eg.(30)',
         null=True,
         blank=True,
     )
 
-
     panels = [
         ImageChooserPanel('logo'),
         FieldPanel('logo_redirect_link'),
@@ -242,7 +275,6 @@ class Navbar(models.Model):
         verbose_name_plural = 'Navbar'
 
 
-
 @register_snippet
 class CustomHeaderLinks(models.Model):
     """
@@ -250,75 +282,75 @@ class CustomHeaderLinks(models.Model):
     """
     header_link_text = models.CharField(
         max_length=25,
-        help_text = 'Give a Link text',
+        help_text='Give a Link text',
     )
 
     header_link = models.CharField(
         max_length=255,
-        help_text = 'Provide a redirect Link',
+        help_text='Provide a redirect Link',
         null=True,
         blank=True,
     )
 
     header_sub_link_text1 = models.CharField(
         max_length=25,
-        help_text = 'Give a Sub Link 1 text',
+        help_text='Give a Sub Link 1 text',
         null=True,
         blank=True,
     )
 
     header_sub_link_text2 = models.CharField(
         max_length=25,
-        help_text = 'Give a Sub Link 2 text',
+        help_text='Give a Sub Link 2 text',
         null=True,
         blank=True,
     )
 
     header_sub_link_text3 = models.CharField(
         max_length=25,
-        help_text = 'Give a Sub Link 3 text',
+        help_text='Give a Sub Link 3 text',
         null=True,
         blank=True,
     )
 
     header_sub_link_text4 = models.CharField(
         max_length=25,
-        help_text = 'Give a Sub Link 4 text',
+        help_text='Give a Sub Link 4 text',
         null=True,
         blank=True,
     )
 
     header_sub_link1 = models.CharField(
         max_length=255,
-        help_text = 'Provide a redirect Link for sublink 1',
+        help_text='Provide a redirect Link for sublink 1',
         null=True,
         blank=True,
     )
 
     header_sub_link2 = models.CharField(
         max_length=255,
-        help_text = 'Provide a redirect Link for sublink 2',
+        help_text='Provide a redirect Link for sublink 2',
         null=True,
         blank=True,
     )
 
     header_sub_link3 = models.CharField(
         max_length=255,
-        help_text = 'Provide a redirect Link for sublink 3',
+        help_text='Provide a redirect Link for sublink 3',
         null=True,
         blank=True,
     )
 
     header_sub_link4 = models.CharField(
         max_length=255,
-        help_text = 'Provide a redirect Link for sublink 4',
+        help_text='Provide a redirect Link for sublink 4',
         null=True,
         blank=True,
     )
 
     body = models.CharField(
         max_length=255,
-        help_text = 'Give a title text',
+        help_text='Give a title text',
         null=True,
         blank=True,
     )
@@ -330,19 +362,19 @@ class CustomHeaderLinks(models.Model):
             MultiFieldPanel([
                 FieldPanel('header_sub_link_text1'),
                 FieldPanel('header_sub_link1'),
-                ]),
+            ]),
             MultiFieldPanel([
                 FieldPanel('header_sub_link_text2'),
                 FieldPanel('header_sub_link2'),
-                ]),
+            ]),
             MultiFieldPanel([
                 FieldPanel('header_sub_link_text3'),
                 FieldPanel('header_sub_link3'),
-                ]),
+            ]),
             MultiFieldPanel([
                 FieldPanel('header_sub_link_text4'),
                 FieldPanel('header_sub_link4'),
-                ])
+            ])
         ], heading="Sub Links section", classname="collapsible"),
     ]
 
@@ -406,6 +438,7 @@ class GatewayTitle(models.Model):
     class Meta:
         verbose_name_plural = 'Gateway Title'
 
+
 class HomePage(Page):
     """
     The Home Page. This looks slightly more complicated than it is. You can
@@ -431,14 +464,14 @@ class HomePage(Page):
         help_text='Write an introduction for the bakery',
         null=True,
         blank=True,
-        )
+    )
     hero_cta = models.CharField(
         verbose_name='Hero CTA',
         max_length=255,
         help_text='Text to display on Call to Action',
         null=True,
         blank=True,
-        )
+    )
     hero_cta_link = models.ForeignKey(
         'wagtailcore.Page',
         null=True,
@@ -451,8 +484,10 @@ class HomePage(Page):
 
     # Body section of the HomePage
     body = StreamField(
-        BaseStreamBlock(), verbose_name="Home content block", blank=True, null=True
-    )
+        BaseStreamBlock(),
+        verbose_name="Home content block",
+        blank=True,
+        null=True)
 
     # Promo section of the HomePage
     site_logo = models.ForeignKey(
@@ -481,7 +516,7 @@ class HomePage(Page):
 
     feature_1_title = models.CharField(
         max_length=255,
-        help_text = 'Feature Title 1'
+        help_text='Feature Title 1'
     )
 
     feature_1_text = RichTextField(
@@ -501,7 +536,7 @@ class HomePage(Page):
 
     feature_2_title = models.CharField(
         max_length=255,
-        help_text = 'Feature Title 2'
+        help_text='Feature Title 2'
     )
 
     feature_2_text = RichTextField(
@@ -521,7 +556,7 @@ class HomePage(Page):
 
     feature_3_title = models.CharField(
         max_length=255,
-        help_text = 'Feature Title 3'
+        help_text='Feature Title 3'
     )
 
     feature_3_text = RichTextField(
@@ -541,7 +576,7 @@ class HomePage(Page):
 
     feature_4_title = models.CharField(
         max_length=255,
-        help_text = 'Feature Title 4'
+        help_text='Feature Title 4'
     )
 
     feature_4_text = RichTextField(
@@ -571,16 +606,22 @@ class HomePage(Page):
     )
 
     show_navbar = models.CharField(
-        choices=boolean_choices, max_length=5, help_text="Choose yes if you want to display the navbar on home page and no if you don't want to.", default=True
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want to display the navbar on home page and no if you don't want to.",
+        default=True)
 
     show_nav_extra = models.CharField(
-        choices = boolean_choices, max_length=5, help_text = "Choose yes if you want the secondary navbar to show on home page or no if you don't want to", default=True
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want the secondary navbar to show on home page or no if you don't want to",
+        default=True)
 
     show_footer = models.CharField(
-        choices = boolean_choices, max_length=5, help_text = "Choose yes if you want the Footer to show on home page or no if you don't want to", default="yes"
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want the Footer to show on home page or no if you don't want to",
+        default="yes")
 
     content_panels = Page.content_panels + [
         MultiFieldPanel([
@@ -589,8 +630,8 @@ class HomePage(Page):
             MultiFieldPanel([
                 FieldPanel('hero_cta'),
                 PageChooserPanel('hero_cta_link'),
-                ])
-            ], heading="Hero section"),
+            ])
+        ], heading="Hero section"),
         StreamFieldPanel('body'),
         MultiFieldPanel([
             ImageChooserPanel('site_logo'),
@@ -599,22 +640,22 @@ class HomePage(Page):
                 ImageChooserPanel('feature_logo_1'),
                 FieldPanel('feature_1_title'),
                 FieldPanel('feature_1_text'),
-                ]),
+            ]),
             MultiFieldPanel([
                 ImageChooserPanel('feature_logo_2'),
                 FieldPanel('feature_2_title'),
                 FieldPanel('feature_2_text'),
-                ]),
+            ]),
             MultiFieldPanel([
                 ImageChooserPanel('feature_logo_3'),
                 FieldPanel('feature_3_title'),
                 FieldPanel('feature_3_text'),
-                ]),
+            ]),
             MultiFieldPanel([
                 ImageChooserPanel('feature_logo_4'),
                 FieldPanel('feature_4_title'),
                 FieldPanel('feature_4_text'),
-                ])
+            ])
         ], heading="Feature section", classname="collapsible"),
         FieldPanel('custom_body_message'),
         ImageChooserPanel('banner_image')
@@ -630,7 +671,8 @@ class HomePage(Page):
         ObjectList(content_panels, heading='Content'),
         ObjectList(customization_panels, heading='Customization'),
         ObjectList(Page.promote_panels, heading='Promote'),
-        ObjectList(Page.settings_panels, heading='Settings', classname="settings"),
+        ObjectList(Page.settings_panels, heading='Settings',
+                   classname="settings"),
     ])
 
     def __str__(self):
@@ -651,7 +693,8 @@ class Row(models.Model):
 
 
 class RowBlankPageRelation(Orderable, Row):
-    page = ParentalKey('django_airavata_wagtail_base.BlankPage', on_delete=models.CASCADE, related_name='row')
+    page = ParentalKey('django_airavata_wagtail_base.BlankPage',
+                       on_delete=models.CASCADE, related_name='row')
 
 
 class BlankPage(Page):
@@ -665,20 +708,28 @@ class BlankPage(Page):
     )
 
     show_navbar = models.CharField(
-        choices=boolean_choices, max_length=5, help_text="Choose yes if you want to display the navbar on home page and no if you don't want to.", default="yes"
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want to display the navbar on home page and no if you don't want to.",
+        default="yes")
 
     show_nav_extra = models.CharField(
-        choices = boolean_choices, max_length=5, help_text = "Choose yes if you want the secondary navbar to show on home page or no if you don't want to", default="yes"
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want the secondary navbar to show on home page or no if you don't want to",
+        default="yes")
 
     show_footer = models.CharField(
-        choices = boolean_choices, max_length=5, help_text = "Choose yes if you want the Footer to show on home page or no if you don't want to", default="yes"
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want the Footer to show on home page or no if you don't want to",
+        default="yes")
 
     show_announcements = models.CharField(
-        choices = boolean_choices, max_length=5, help_text = "Choose yes if you want the Announcements to show up on home page or no if you don't want to", default="yes"
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want the Announcements to show up on home page or no if you don't want to",
+        default="yes")
 
     content_panels = Page.content_panels + [
         InlinePanel("row", label="row")
@@ -695,7 +746,8 @@ class BlankPage(Page):
         ObjectList(content_panels, heading='Content'),
         ObjectList(customization_panels, heading='Customization'),
         ObjectList(Page.promote_panels, heading='Promote'),
-        ObjectList(Page.settings_panels, heading='Settings', classname="settings"),
+        ObjectList(Page.settings_panels, heading='Settings',
+                   classname="settings"),
     ])
 
     def __str__(self):
@@ -703,7 +755,8 @@ class BlankPage(Page):
 
 
 class RowCybergatewayHomePageRelation(Orderable, Row):
-    page = ParentalKey('django_airavata_wagtail_base.CybergatewayHomePage', on_delete=models.CASCADE, related_name='row')
+    page = ParentalKey('django_airavata_wagtail_base.CybergatewayHomePage',
+                       on_delete=models.CASCADE, related_name='row')
 
 
 class CybergatewayHomePage(Page):
@@ -722,63 +775,67 @@ class CybergatewayHomePage(Page):
     )
 
     site_link = models.CharField(
-    max_length=255,
-    default="#",
-    help_text = 'Give a site redirect link',
+        max_length=255,
+        default="#",
+        help_text='Give a site redirect link',
     )
 
     site_text = models.CharField(
-    max_length=50,
-    default="#",
-    help_text = 'Give a Site Name',
+        max_length=50,
+        default="#",
+        help_text='Give a Site Name',
     )
 
     site_header = models.CharField(
-    max_length=70,
-    default="#",
-    help_text = 'Give a Site Header Name',
+        max_length=70,
+        default="#",
+        help_text='Give a Site Header Name',
     )
 
     site_link1 = models.CharField(
-    max_length=70,
-    default="#",
-    help_text = 'Give a Site Nav Link [1]',
+        max_length=70,
+        default="#",
+        help_text='Give a Site Nav Link [1]',
     )
 
     site_link_text1 = models.CharField(
-    max_length=70,
-    help_text = 'Give a Site Nav Link Text [1]',
+        max_length=70,
+        help_text='Give a Site Nav Link Text [1]',
     )
 
     site_link2 = models.CharField(
-    max_length=70,
-    default='#',
-    help_text = 'Give a Site Nav Link [2]',
+        max_length=70,
+        default='#',
+        help_text='Give a Site Nav Link [2]',
     )
 
     site_link_text2 = models.CharField(
-    max_length=70,
-    help_text = 'Give a Site Nav Link Text [2]',
+        max_length=70,
+        help_text='Give a Site Nav Link Text [2]',
     )
 
     site_link3 = models.CharField(
-    max_length=70,
-    default="#",
-    help_text = 'Give a Site Nav Link [3]',
+        max_length=70,
+        default="#",
+        help_text='Give a Site Nav Link [3]',
     )
 
     site_link_text3 = models.CharField(
-    max_length=70,
-    help_text = 'Give a Site Nav Link Text [3]',
+        max_length=70,
+        help_text='Give a Site Nav Link Text [3]',
     )
 
     contact = StreamField(
-        BaseStreamBlock(), verbose_name="Contact Info Block", blank=True, null=True
-    )
+        BaseStreamBlock(),
+        verbose_name="Contact Info Block",
+        blank=True,
+        null=True)
 
     footer = StreamField(
-        BaseStreamBlock(), verbose_name="Footer Content Block", blank=True, null=True
-    )
+        BaseStreamBlock(),
+        verbose_name="Footer Content Block",
+        blank=True,
+        null=True)
 
     boolean_choices = (
         ("yes", "Yes"),
@@ -786,16 +843,22 @@ class CybergatewayHomePage(Page):
     )
 
     show_navbar = models.CharField(
-        choices=boolean_choices, max_length=5, help_text="Choose yes if you want to display the navbar on home page and no if you don't want to.", default="yes"
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want to display the navbar on home page and no if you don't want to.",
+        default="yes")
 
     show_nav_extra = models.CharField(
-        choices = boolean_choices, max_length=5, help_text = "Choose yes if you want the secondary navbar to show on home page or no if you don't want to", default="yes"
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want the secondary navbar to show on home page or no if you don't want to",
+        default="yes")
 
     show_footer = models.CharField(
-        choices = boolean_choices, max_length=5, help_text = "Choose yes if you want the Footer to show on home page or no if you don't want to", default="yes"
-    )
+        choices=boolean_choices,
+        max_length=5,
+        help_text="Choose yes if you want the Footer to show on home page or no if you don't want to",
+        default="yes")
 
     content_panels = Page.content_panels + [
         MultiFieldPanel([
@@ -809,7 +872,7 @@ class CybergatewayHomePage(Page):
             FieldPanel('site_link_text2'),
             FieldPanel('site_link3'),
             FieldPanel('site_link_text3'),
-            ], heading="Navbar Section"),
+        ], heading="Navbar Section"),
         InlinePanel("row", label="row"),
         StreamFieldPanel('contact'),
         StreamFieldPanel('footer'),
@@ -825,7 +888,8 @@ class CybergatewayHomePage(Page):
         ObjectList(content_panels, heading='Content'),
         ObjectList(customization_panels, heading='Customization'),
         ObjectList(Page.promote_panels, heading='Promote'),
-        ObjectList(Page.settings_panels, heading='Settings', classname="settings"),
+        ObjectList(Page.settings_panels, heading='Settings',
+                   classname="settings"),
     ])
 
     def __str__(self):
diff --git a/django_airavata/wagtailapps/base/templatetags/navigation_tags.py b/django_airavata/wagtailapps/base/templatetags/navigation_tags.py
index ba0dbac..00e06fc 100644
--- a/django_airavata/wagtailapps/base/templatetags/navigation_tags.py
+++ b/django_airavata/wagtailapps/base/templatetags/navigation_tags.py
@@ -126,6 +126,7 @@ def get_footer_text(context):
         'footer_text': footer_text,
     }
 
+
 @register.inclusion_tag('django_airavata_wagtail_base/includes/navbar.html', takes_context=True)
 def get_navbar(context):
     navbar = None
@@ -136,6 +137,7 @@ def get_navbar(context):
         'navbar': navbar,
     }
 
+
 @register.inclusion_tag('django_airavata_wagtail_base/includes/custom_header_links.html', takes_context=True)
 def get_custom_header_links(context):
     custom_header_links = ""
@@ -146,6 +148,7 @@ def get_custom_header_links(context):
         'custom_header_links': custom_header_links,
     }
 
+
 @register.inclusion_tag('django_airavata_wagtail_base/includes/custom_css.html', takes_context=True)
 def get_css(context):
     custom_css = ""
@@ -156,6 +159,7 @@ def get_css(context):
         'custom_css': custom_css,
     }
 
+
 @register.inclusion_tag('django_airavata_wagtail_base/includes/nav_extra.html', takes_context=True)
 def get_nav_extra(context):
     nav_extra = ""
@@ -166,6 +170,7 @@ def get_nav_extra(context):
         'navextra': nav_extra,
     }
 
+
 @register.inclusion_tag('django_airavata_wagtail_base/includes/gateway_icon.html', takes_context=True)
 def gateway_icon(context):
     gateway_icon = GatewayIcon.objects.first()
@@ -174,6 +179,7 @@ def gateway_icon(context):
         'gateway_icon': gateway_icon
     }
 
+
 @register.inclusion_tag('django_airavata_wagtail_base/includes/gateway_title.html', takes_context=True)
 def gateway_title(context):
     gateway_title = GatewayTitle.objects.first()
diff --git a/django_airavata/wagtailapps/base/wagtail_hooks.py b/django_airavata/wagtailapps/base/wagtail_hooks.py
index 4adcd22..5c195d5 100644
--- a/django_airavata/wagtailapps/base/wagtail_hooks.py
+++ b/django_airavata/wagtailapps/base/wagtail_hooks.py
@@ -2,20 +2,24 @@ import wagtail.admin.rich_text.editors.draftail.features as draftail_features
 from wagtail.admin.rich_text.converters.html_to_contentstate import InlineStyleElementHandler
 from wagtail.core import hooks
 
+
 @hooks.register('register_rich_text_features')
 def register_custom_style_feature(features):
 
     feature_name = 'purple'
     type_ = feature_name.upper()
     tag = 'span'
-    detection = '{tag}[class="{feature_name}"]'.format(tag=tag, feature_name=feature_name)
+    detection = '{tag}[class="{feature_name}"]'.format(
+        tag=tag, feature_name=feature_name)
 
     control = {
         'type': type_,
         'description': 'Purple Color',
-        'icon': ['M100 100 H 900 V 900 H 100 Z'],   # This should be an svg which will occupy a 1024x1024 viewbox
+        # This should be an svg which will occupy a 1024x1024 viewbox
+        'icon': ['M100 100 H 900 V 900 H 100 Z'],
         'label': 'purple',
-        'style': {'color': 'purple'}, # .purple is the class which is defined in draft-colors.css . It is necessary to get this style working.
+        # .purple is the class which is defined in draft-colors.css . It is necessary to get this style working.
+        'style': {'color': 'purple'},
     }
 
     features.register_editor_plugin(
@@ -27,6 +31,7 @@ def register_custom_style_feature(features):
         'to_database_format': {'style_map': {type_: {'element': tag, 'props': {'class': feature_name}}}},
     }
 
-    features.register_converter_rule('contentstate', feature_name, db_conversion)
+    features.register_converter_rule(
+        'contentstate', feature_name, db_conversion)
 
     features.default_features.append(feature_name)
diff --git a/manage.py b/manage.py
index edfdda9..8dc5cad 100755
--- a/manage.py
+++ b/manage.py
@@ -11,7 +11,7 @@ if __name__ == "__main__":
         # issue is really that Django is missing to avoid masking other
         # exceptions on Python 2.
         try:
-            import django
+            import django  # noqa: F401
         except ImportError:
             raise ImportError(
                 "Couldn't import Django. Are you sure it's installed and "


Mime
View raw message