Remove troublesome code

This commit is contained in:
2024-12-29 21:57:45 +01:00
parent 026ab06354
commit 0ea9978ffb
2 changed files with 2 additions and 3 deletions

View File

@@ -170,7 +170,7 @@ SITE_NAME = "Railroad Assets Manger"
# The file must be placed in the root of the 'static' folder # The file must be placed in the root of the 'static' folder
DEFAULT_CARD_IMAGE = "coming_soon.svg" DEFAULT_CARD_IMAGE = "coming_soon.svg"
CSV_SEPARATOR = "," # Second level ALT separator for CSV files (e.g. for properties)
CSV_SEPARATOR_ALT = ";" CSV_SEPARATOR_ALT = ";"
DECODER_INTERFACES = [ DECODER_INTERFACES = [

View File

@@ -3,7 +3,6 @@ import csv
import hashlib import hashlib
import subprocess import subprocess
from django.conf import settings
from django.http import HttpResponse from django.http import HttpResponse
from django.utils.html import format_html from django.utils.html import format_html
from django.utils.text import slugify as django_slugify from django.utils.text import slugify as django_slugify
@@ -62,7 +61,7 @@ def slugify(string, custom_separator=None):
return string return string
def generate_csv(header, data, filename, separator=settings.CSV_SEPARATOR): def generate_csv(header, data, filename):
response = HttpResponse(content_type="text/csv") response = HttpResponse(content_type="text/csv")
response["Content-Disposition"] = 'attachment; filename="{}"'.format( response["Content-Disposition"] = 'attachment; filename="{}"'.format(
filename filename