项目结构
urls.py 配置内容
from django.urls import path
from . import views
urlpatterns = [
path('',views.index),
path('test/',views.csv_view)
]
方法一:
from django.http import HttpResponse
import csv
def index(request):
response = HttpResponse(</