-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FilePathField #3520
Comments
@biggosh could you perhaps share what your model and serializer look like? |
Sorry for the delay. This is the the serializer and the original model.
|
@biggosh we're probably not passing along the model field's definition along to the mapped serializer field. Could you try explicitly setting the field in your serializer like so: class TemplatesSerializer(serializers.ModelSerializer):
file_path = serializers.FilePathField(path='tmp')
class Meta:
model = Templates |
Ok, now it's working. thanks |
Although there's a work around it appears that this issue isn't resolved until we do deal with the above, right? |
@tomchristie sure thing. I'll get to it. |
@tomchristie should we map all of the field's options: |
I guess whichever we support, yeah. |
Closed by #3536 |
I tried to use this field in the model and rest framework always raises an error:
init() missing 1 required positional argument: 'path'
Is this field type supported?
Thanks
The text was updated successfully, but these errors were encountered: