Django - Static file not found

前端 未结 13 801
旧巷少年郎
旧巷少年郎 2020-11-30 20:46

I\'ve seen several posts for this issue but didn\'t found my solution.

I\'m trying to serve static files within my Django 1.3 development environment.

Here a

13条回答
  •  萌比男神i
    2020-11-30 21:18

    1. You can remove the STATIC_ROOT line
    2. Or you can create another static folder in different directory. For suppose the directory is: project\static Now update:
        STATICFILES_DIRS = [
            os.path.join(BASE_DIR, 'project/static/')
        ]
        STATIC_ROOT = os.path.join(BASE_DIR, 'static')
    

    Whatever you do the main point is STATICFILES_DIRS and STATIC_ROOT should not contain same directory.

    I know it's been a long time but hope the new buddies can get help from it

提交回复
热议问题