-
Notifications
You must be signed in to change notification settings - Fork 29
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
Added support for DictField / ListField #59
Conversation
@peterfarrell Might also take a look at Postgres JSONField form field. |
Thanks @jackton1 for the suggestion. I thought about it, but given the data I have -- this seems like a better choice. Also, Django Rest Framework has a DictField and a ListField: https://www.django-rest-framework.org/api-guide/fields/#dictfield |
I added support for ListField to have parity. |
I am tempted to add additional features akin the ListField and DictField in the Django Rest Framework: https://www.django-rest-framework.org/api-guide/fields/#listfield @jackton1 @c17r Let me know your thoughts. I know they are issues related to using DRF serializers in addition to form fields. I think you ever went that direction -- we'd need these fields in the PR to keep parity. |
@peterfarrell thanks for the contribution! |
@c17r Thanks, let me know when we can get a build on PyPi. |
@peterfarrell |
@jackton1 Thanks. I'll put some thought into it. I was leaning towards the DRF parameters just for simplicity assuming that if you're using Django -- you are likely using DRF for REST API / etc. |
Hey @c17r, this solves some problems we're running into as well. Any plan to push a new release to PyPi soon? |
We need @mixxorz for that I don't have PyPi access for this project. |
Ah got it! Good to know for the future. :-) |
I've just published a new release. 0.7.0 |
There is no way using Django Forms to pass around arbitrary dictionaries. The only other way was to override
__init__
and pass the dictionary "input" as a kwarg which is a hack. This is a shim to support passing dictionaries to services:PR includes tests.