Domanda

I have downloaded django-filebrowser 3.4.3 (no grapelli) and all installation steps went OK. However when I add a FileBrowseField in my model, it shows as a CharField. I don't want that! It should show me a FileBrowseField

models.py

from django.db import models
from filebrowser.fields import FileBrowseField
class Logo(models.Model):
    logo = FileBrowseField(max_length=250)

admin.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)

please help!!

È stato utile?

Soluzione

So it seems that I was missing an image in the /static/filebrowser/img folder. It's the image you click on to open the browser. I've added the image and linked to it from the correct template: /templates/filebrowser/custom_field.html

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top