diff --git a/tin/apps/assignments/forms.py b/tin/apps/assignments/forms.py index bca6c406..94eb055f 100644 --- a/tin/apps/assignments/forms.py +++ b/tin/apps/assignments/forms.py @@ -178,7 +178,7 @@ class Meta: } def __str__(self) -> str: - return f"AssignmentForm(\"{self['name'].value()}\")" + return f'AssignmentForm("{self["name"].value()}")' class GraderScriptUploadForm(forms.Form): diff --git a/tin/apps/assignments/views.py b/tin/apps/assignments/views.py index 72673068..68abd79a 100644 --- a/tin/apps/assignments/views.py +++ b/tin/apps/assignments/views.py @@ -372,7 +372,7 @@ def download_grader_view(request, assignment_id): with grader_file.open() as f_obj: response = http.HttpResponse(f_obj.read(), content_type="text/plain") - filename = f'{assignment.name.replace(" ", "_")}_{grader_file.name.split("/")[-1]}' + filename = f"{assignment.name.replace(' ', '_')}_{grader_file.name.split('/')[-1]}" response["Content-Disposition"] = f'attachment; filename="{filename}"' return response