django-s3direct
django-s3direct copied to clipboard
Add support for dynamically overriding key_args on a form field level
I found that hard coding key_args in the django settings files isn't very useful. Lots of use cases require dynamic s3 keys. This solutions allows to override key_args on a form field level, either with a static value or using information from other fields as seen in the new readme example.
Looks pretty useful :+1:
It's going to be merged any day now, I'm sure
Hey guy, can you see this one second?
In this file s3direct/views.py, at line 36 is the follow code:
allowed = dest.get('allowed')
if (allowed and file_type not in allowed) and allowed != '*':
resp = json.dumps({'error': 'Invalid file type (%s).' % file_type})
return HttpResponseBadRequest(resp, content_type='application/json')
I think the parentheses aren't necessary, I'm in the correct?