-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add a Django Form Field for Hexadecimals #291
Conversation
Pull Request Test Coverage Report for Build 2650733775
💛 - Coveralls |
c56e79a
to
7609baf
Compare
class Keccak256Form(forms.Form): | ||
value = Keccak256FieldForm() | ||
value = Keccak256FieldForm(required=False) |
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 required=False
?
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.
So I can test the value it gets when blank value is provided:
form = HexForm(data={"value": ""})
gnosis/eth/django/models.py
Outdated
@@ -140,7 +140,7 @@ class HexField(models.CharField): | |||
On Database side a CharField is used. | |||
""" | |||
|
|||
description = "Stores a hex value into an CharField" | |||
description = "Stores a hex value into an CharField. DEPRECATED, use a BinaryField" |
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.
Stores a hex value into an CharField
-> Stores a hex value into a CharField
- Refactor Keccack256FormField inheriting the new form
7609baf
to
ceb3959
Compare
forms.py
file