-
-
Notifications
You must be signed in to change notification settings - Fork 36
Inherit directly from field & django 1.10 compatibility #19
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
Closed
lucaswiman
wants to merge
21
commits into
jazzband:master
from
lucaswiman:inherit-directly-from-field
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
e0e00a1
Increase verbosity of py.test to make it more user friendly on failures.
d8580b9
Update to inherit directly from field.
8ccae82
Eliminate need for SuperForm.composite_fields.
7c9beaf
Remove base_composite_fields and need for custom metaclasses.
30deb03
Remove support for old end-of-lifed versions due to incompatibility w…
c124126
Add Django 1.10 to the build matrix.
aef4da9
Upgrade django test dependencies.
2171536
Add new required TEMPLATES setup.
e8dacbe
Remove usage of deprecated kwargs
052fd69
update travis environments.
81caaa9
Fix flake8 failures.
1beb808
Partially revert `media` changes.
1cedcc1
Override add_prefix.
4663c07
Remove need for get_form_class.
2dbd0f2
Remove unused `form` parameter from `get_field_name`.
6d7814e
Ensure that the values returned by the widget is the same as form.for…
5b0f9df
Update changelog.
fedaf89
Update test matrix to include 1.11 and 2.0, as well as python 3.6.
lucaswiman 53f729a
Handle extra renderer argument.
lucaswiman 9766411
Update for Django 1.11 compatibility.
lucaswiman c118e9d
Updates for django 2.0.
lucaswiman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the
formparameter removed here? It's not used in the implementation, but during writing this it made sense to me since this way most methods have the same signature which is easy to remember and contains all information relevant for the field that cannot be accessed viaself.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was some refactoring I did trying to understand the code. I found it difficult to figure out what a lot of parameters were for, which made it harder to understand what information I actually needed for which methods. In particular, get_form_class had a superfluous
formparameter, which was inconsistent with the changes I wanted to make, sincewidget_attrsneeded access to theform_class, but didn't have direct access to the form. I may be able to fix that using the "monkeypatching" you mentioned.It sounds like we have differing ways of thinking about interfaces, but it's your project. 😃 I'll update the code to only remove the superfluous
formparameter in cases where it's necessary to remove it.