MCPcopy
hub / github.com/django/django / formfield

Method formfield

django/db/models/fields/__init__.py:2082–2093  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

2080 return str(value)
2081
2082 def formfield(self, **kwargs):
2083 return super().formfield(
2084 **{
2085 "path": self.path() if callable(self.path) else self.path,
2086 "match": self.match,
2087 "recursive": self.recursive,
2088 "form_class": forms.FilePathField,
2089 "allow_files": self.allow_files,
2090 "allow_folders": self.allow_folders,
2091 **kwargs,
2092 }
2093 )
2094
2095 def get_internal_type(self):
2096 return "FilePathField"

Callers 2

test_pathMethod · 0.95
test_callable_pathMethod · 0.95

Calls 3

callableFunction · 0.85
formfieldMethod · 0.45
pathMethod · 0.45

Tested by 2

test_pathMethod · 0.76
test_callable_pathMethod · 0.76