From 295e7f3c0e76307e79c7dcd0ef6cbca084b420c7 Mon Sep 17 00:00:00 2001 From: Vishal Singhania Date: Fri, 15 Oct 2021 16:59:24 +0530 Subject: [PATCH] Fixed trailing whitespaces --- NearBeach/models.py | 4 ++-- NearBeach/views/authentication_views.py | 2 +- NearBeach/views/document_views.py | 6 +++--- NearBeach/views/kanban_views.py | 2 +- NearBeach/views/object_data_views.py | 6 +++--- NearBeach/views/requirement_item_views.py | 2 +- NearBeach/views/requirement_views.py | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NearBeach/models.py b/NearBeach/models.py index 2308daf2c..da82bbcab 100755 --- a/NearBeach/models.py +++ b/NearBeach/models.py @@ -153,7 +153,7 @@ class Meta: Contact History is a simple form that user will fill out every time they have some form of contact with the customer. This table will store both contact history for customer and Organisations. The customer field in -this instance is not required, and implies that the contact history is +this instance is not required, and implies that the contact history is applied to the organisation. The organisation field will fill out automatically when a user applies it to a customer. :) """ @@ -2024,7 +2024,7 @@ class permission_set(models.Model): ADDITIVE permission ~~~~~~~~~~~~~~~~~~~~ Designed to add on extra abilities to those user who have "READ ONLY" for certain modules. - If a user has the ability to "EDIT" for any of these modules, then this section does not + If a user has the ability to "EDIT" for any of these modules, then this section does not need to be populated with data. """ document = models.IntegerField( diff --git a/NearBeach/views/authentication_views.py b/NearBeach/views/authentication_views.py index 85c0737d7..30daae77a 100644 --- a/NearBeach/views/authentication_views.py +++ b/NearBeach/views/authentication_views.py @@ -113,7 +113,7 @@ def check_recaptcha(post_data): The URL could contain a file. Which we do not want executed by mistake. So we just make sure that the URL starts with a http instead of ftp or file. - We place the at the end of the json_data because we have checked the field. This should be just a json + We place the at the end of the json_data because we have checked the field. This should be just a json response. If it is not at this point then it will produce a server issue. """ if url.lower().startswith('http'): diff --git a/NearBeach/views/document_views.py b/NearBeach/views/document_views.py index b2424bf79..80482d1b6 100644 --- a/NearBeach/views/document_views.py +++ b/NearBeach/views/document_views.py @@ -248,7 +248,7 @@ def document_upload(request, destination, location_id): if hasattr(settings, 'AWS_ACCESS_KEY_ID'): # Use boto to upload the file s3 = boto3.client( - 's3', + 's3', aws_access_key_id=settings.AWS_ACCESS_KEY_ID, aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY ) @@ -373,7 +373,7 @@ def private_download_file(request, document_key): if hasattr(settings, 'AWS_ACCESS_KEY_ID'): # Use boto3 to download s3 = boto3.client( - 's3', + 's3', aws_access_key_id=settings.AWS_ACCESS_KEY_ID, aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY ) @@ -386,7 +386,7 @@ def private_download_file(request, document_key): print(response['Body']) return FileResponse( - response['Body'], + response['Body'], as_attachment=True, filename=document_results.document_description, ) diff --git a/NearBeach/views/kanban_views.py b/NearBeach/views/kanban_views.py index 3754f6357..c05575ca3 100644 --- a/NearBeach/views/kanban_views.py +++ b/NearBeach/views/kanban_views.py @@ -220,7 +220,7 @@ def kanban_information(request, kanban_board_id, *args, **kwargs): # Get context c = get_context(kanban_board_id) - c['user_level'] = user_level + c['user_level'] = user_level c['kanban_card_results'] = serializers.serialize('json', kanban_card_results) # Get the template diff --git a/NearBeach/views/object_data_views.py b/NearBeach/views/object_data_views.py index c9aca67c7..4c11df786 100644 --- a/NearBeach/views/object_data_views.py +++ b/NearBeach/views/object_data_views.py @@ -441,7 +441,7 @@ def bug_list(request, destination, location_id): """ As explained on stack overflow here - https://stackoverflow.com/questions/7650448/django-serialize-queryset-values-into-json#31994176 - We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard + We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard json.dumps() and transforming your ValuesQuerySet to a list by using list().[sic] """ @@ -809,7 +809,7 @@ def object_link_list(request, destination, location_id): """ As explained on stack overflow here - https://stackoverflow.com/questions/7650448/django-serialize-queryset-values-into-json#31994176 - We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard + We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard json.dumps() and transforming your ValuesQuerySet to a list by using list().[sic] """ @@ -866,7 +866,7 @@ def query_bug_client(request, destination, location_id): The URL could contain a file. Which we do not want executed by mistake. So we just make sure that the URL starts with a http instead of ftp or file. - We place the at the end of the json_data because we have checked the field. This should be just a json + We place the at the end of the json_data because we have checked the field. This should be just a json response. If it is not at this point then it will produce a server issue. """ if url.lower().startswith('http'): diff --git a/NearBeach/views/requirement_item_views.py b/NearBeach/views/requirement_item_views.py index 2d9f9b96f..477bca60e 100644 --- a/NearBeach/views/requirement_item_views.py +++ b/NearBeach/views/requirement_item_views.py @@ -94,7 +94,7 @@ def get_requirement_item_links_list(request, requirement_item_id, *args, **kwarg """ As explained on stack overflow here - https://stackoverflow.com/questions/7650448/django-serialize-queryset-values-into-json#31994176 - We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard + We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard json.dumps() and transforming your ValuesQuerySet to a list by using list().[sic] """ diff --git a/NearBeach/views/requirement_views.py b/NearBeach/views/requirement_views.py index 949407da5..19440d7ed 100644 --- a/NearBeach/views/requirement_views.py +++ b/NearBeach/views/requirement_views.py @@ -94,7 +94,7 @@ def get_requirement_item_links(request, requirement_id, *args, **kwargs): """ As explained on stack overflow here - https://stackoverflow.com/questions/7650448/django-serialize-queryset-values-into-json#31994176 - We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard + We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard json.dumps() and transforming your ValuesQuerySet to a list by using list().[sic] """ @@ -176,7 +176,7 @@ def get_requirement_links_list(request, requirement_id, *args, **kwargs): """ As explained on stack overflow here - https://stackoverflow.com/questions/7650448/django-serialize-queryset-values-into-json#31994176 - We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard + We need to Django's serializers can't handle a ValuesQuerySet. However, you can serialize by using a standard json.dumps() and transforming your ValuesQuerySet to a list by using list().[sic] """