Django - Static file not found

前端 未结 13 769
旧巷少年郎
旧巷少年郎 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条回答
  • 2020-11-30 21:25

    If you've have added the django-storages module (to support uploading files to S3 in your django app for instance), and if like me you did not read correctly the documentation of this module, just remove this line from your settings.py:

    STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
    

    Otherwise it will cause your static assets to be looked NOT on your local machine but remotely in the S3 bucket, including admin panel CSS, and thus effectively breaking admin panel CSS.

    0 讨论(0)
提交回复
热议问题