Django REST Framework and FileField absolute url

前端 未结 11 812
不知归路
不知归路 2020-12-13 02:10

I\'ve defined a simple Django app that includes the following model:

class Project(models.Model):
    name = models.CharField(max_length=200)
    thumbnail =         


        
11条回答
  •  我在风中等你
    2020-12-13 02:56

    Check you settings.py

    media settings.

    I had same error and found that:

    MEDIA_URL = '/media/' did the trick.

    Before i only had:

    MEDIA_URL = 'media/'

提交回复
热议问题