mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #29529 -- Allowed models.fields.FilePathField to accept a callable path.
This commit is contained in:
committed by
Mariusz Felisiak
parent
11971cd87c
commit
ef082ebb84
@@ -1709,7 +1709,7 @@ class FilePathField(Field):
|
||||
|
||||
def formfield(self, **kwargs):
|
||||
return super().formfield(**{
|
||||
'path': self.path,
|
||||
'path': self.path() if callable(self.path) else self.path,
|
||||
'match': self.match,
|
||||
'recursive': self.recursive,
|
||||
'form_class': forms.FilePathField,
|
||||
|
||||
Reference in New Issue
Block a user