From a4c1a92cc84f362237a4e009051e2ee9e2f7369b Mon Sep 17 00:00:00 2001 From: yuangyaa Date: Mon, 27 Oct 2025 05:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E5=92=8C?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ crawler_project/settings.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 34e8a05..1894393 100644 --- a/.gitignore +++ b/.gitignore @@ -176,3 +176,6 @@ cython_debug/ media/ +staticfiles/ +__pycache__/ +*.pyc diff --git a/crawler_project/settings.py b/crawler_project/settings.py index b261270..f4cb844 100644 --- a/crawler_project/settings.py +++ b/crawler_project/settings.py @@ -117,6 +117,10 @@ USE_TZ = True # https://docs.djangoproject.com/en/5.2/howto/static-files/ STATIC_URL = 'static/' +STATICFILES_DIRS = [ + BASE_DIR / "crawler" / "static", +] +STATIC_ROOT = BASE_DIR / "staticfiles" # Media files (用户上传的文件) MEDIA_URL = '/media/'