0

I'm trying to use django FilerFileField as explained in the doc http://django-filer.readthedocs.io/en/latest/usage.html. It renders well with a field and a hyperlink inviting to select the file like http://localhost:8000/fr/admin/filer/folder/?_pick=file. This opens the filer admin page where I can navigate.

After file selection, how can I go back to my form page with the appropriate file selected?

I never get back such example as explained in the doc enter image description here

Here is what I have in my main url pattern

urlpatterns = [
    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
        {'sitemaps': {'cmspages': CMSSitemap}}),
    url(r'^filer/', include('filer.urls')),
    url(r'^filebrowser_filer/', include('ckeditor_filebrowser_filer.urls')),    
]

I'm not using models.FileField() because I want to be able to point to my admin Filer images and files located in media/filer_public

The models.py is the same as described in the doc

from django.db import models
from filer.fields.image import FilerImageField
from filer.fields.file import FilerFileField

class Company(models.Model):
    name = models.CharField(max_length=255)
    logo = FilerImageField(null=True, blank=True,
                           related_name="logo_company")
    disclaimer = FilerFileField(null=True, blank=True,
                                related_name="disclaimer_company")
openHBP
  • 627
  • 4
  • 11

0 Answers0