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/'