Skip to content
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

Resolve #159 -- Add custom JSONEncoder support via setting #160

Merged
merged 3 commits into from
Oct 30, 2022
Merged

Resolve #159 -- Add custom JSONEncoder support via setting #160

merged 3 commits into from
Oct 30, 2022

Conversation

N1K1TAS95
Copy link

Added support to set a custom JSON encoder via Django settings.py

Added support to set a custom JSON encoder via Django settings.py
Copy link
Owner

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! This should do the trick. I left you a suggestion for your documentation. I'd like to keep a little shorter, while adding more backlinks to the Python docs. They actually have a pretty good example on how to extend encoders. We use inter-sphinx to create those links, if classes are marked accordingly in the docs.

django_select2/conf.py Outdated Show resolved Hide resolved
@codingjoe
Copy link
Owner

Oh an @N1K1TAS95 you'll need to move the docstring under the attribute, to make it work. I'd recommend running python setup.py build_sphinx to check the docs locally.

@codecov
Copy link

codecov bot commented Oct 30, 2022

Codecov Report

Base: 99.24% // Head: 99.25% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (b53cd8e) compared to base (7215346).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #160   +/-   ##
=======================================
  Coverage   99.24%   99.25%           
=======================================
  Files           7        7           
  Lines         264      267    +3     
=======================================
+ Hits          262      265    +3     
  Misses          2        2           
Impacted Files Coverage Δ
django_select2/conf.py 100.00% <100.00%> (ø)
django_select2/views.py 97.43% <100.00%> (+0.06%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@N1K1TAS95
Copy link
Author

N1K1TAS95 commented Oct 30, 2022

@codingjoe I've moved attribute docs under the attribute itself.
python setup.py build_sphinx compiles and docs are updated with new attribute. There is also a link to Python docs JSONEncoder.

Copy link
Owner

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woop woop 🎉 let's ship it

@codingjoe codingjoe merged commit 5a635fe into codingjoe:main Oct 30, 2022
@codingjoe codingjoe changed the title Added SELECT2_JSON_ENCODER option in Django settings.py Resolve #159 -- Add custom JSONEncoder support via setting Oct 30, 2022
@N1K1TAS95
Copy link
Author

Woop woop 🎉 let's ship it

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants