我已经下载了 django-filebrowser 3.4.3(没有gratelli)并且所有安装步骤都正常。但是,当我在模型中添加 FileBrowseField 时,它显示为 CharField。我不想要那个!它应该显示一个 FileBrowseField
模型.py
from django.db import models
from filebrowser.fields import FileBrowseField
class Logo(models.Model):
logo = FileBrowseField(max_length=250)
管理员.py
from django.contrib import admin
from django.db import models
from models import Logo
class LogoAdmin(admin.ModelAdmin):
list_display = ['logo']
admin.site.register(Logo, LogoAdmin)
请帮忙!!