I use my own class for my model to ensure that images are downloaded through an application called django-filebrowser .
class Book(models.Model):
name = models.CharField(max_length=30)
image = FileBrowseField("Image", max_length=200, blank=True, null=True)
...
The model uses the custom filebrowser field "FileBrowserField", which adds a link to a separate download page (http: // site / admin / filebrowser / browse /? Ot = desc & o = date). What I would like to do is set up a custom form template to add the "dir" parameter, for example: (http: // site / admin / filebrowser / browse /? Ot = desc & o = date & dir = book1) . book1, in this case, will be extracted from the CharField "name" of this book.
I know that the template I want to change is displayed using filebrowser fields.py, and there is a variable that sets the "dir" parameter, but I don’t know how to get the string value from my own model for fields.py, so I I can set this variable . Anyone have any suggestions?
linqq source
share