misc: expose _raw and _url suffixes to file fields (#58140)

This commit is contained in:
Frédéric Péters 2021-10-24 15:48:00 +02:00
parent 203cd20146
commit a120489331
1 changed files with 3 additions and 0 deletions

View File

@ -1059,6 +1059,9 @@ class LazyFieldVarPassword(LazyFieldVar):
class LazyFieldVarFile(LazyFieldVar):
def inspect_keys(self):
return ['raw', 'url']
@property
def url(self):
return self._field.get_download_url(formdata=self._formdata, **self._field_kwargs)