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 Support for Storing Values as Strings in the Database #8
Conversation
…nd specifying a default EUI dialect via settings.
I'll have a look in this week & Thanks for keeping mac address in strings. (which will help in more easy searching.) Also, I've to check anyone who might have using MACAddressField.set_dialect isn't left behind. |
I'm going to have a crack at adding support for the select_dialect class method (with a deprecation warning of future removal (v1.4?)) and I'll push that to my repo when it's done, and get it added to this pull request. |
…ss method, with deprecation warning.
And, there it is. That last commit should re-enable the existing |
Resolved Conflicts: macaddress/__init__.py setup.py
Went ahead and merged in this repository's master into mine to make merging this request easier. |
… the package. The previous code didn't actually return anything and would break if not installed via setup.py.
Thanks a lot @bltravis for your support and passion. 👍 |
Conflicts: macaddress/__init__.py setup.py
Merged from upstream to make it easy to merge into the main repository. |
Add Support for Storing Values as Strings in the Database
Done & Thanks :) |
This will add the ability to specify (at runtime) whether you would like to save MACs as strings (varchar) or integers (bigint) via an "integer" keyword (defaults to True, i.e. existing behavior). I've also reworked how to specify a default dialect (via a settings variable and a utility function that handles importing it), and added a function to format any given EUI instance via a specified mac_eui48 subclass. I know that my change to how a default dialect is set is backwards-incompatible, but I think it's more elegant solution than using a class method.