Admin FileField current url incorrect

后端 未结 2 1101
孤城傲影
孤城傲影 2021-02-09 08:15

In the Django admin, wherever I have a FileField, there is a \"currently\" box on the edit page, with a hyperlink to the current file. However, this link is appended to the curr

2条回答
  •  再見小時候
    2021-02-09 08:22

    The answer to this question is fairly thoroughly covered by this answer. In brief however, the problem is that you probably haven't set up your MEDIA_ROOT and MEDIA in settings.py and in urls.py you haven't made it so that the media folder is being served.

    For the details of how to do those things check out the incredibly awesome answer by Akseli Palen.

提交回复
热议问题