Add NLLicensePlateField with tests#327
Merged
benkonrath merged 2 commits intodjango:masterfrom Feb 23, 2018
jarmovanlenthe:NLLicensePlate
Merged
Add NLLicensePlateField with tests#327benkonrath merged 2 commits intodjango:masterfrom jarmovanlenthe:NLLicensePlate
benkonrath merged 2 commits intodjango:masterfrom
jarmovanlenthe:NLLicensePlate
Conversation
Codecov Report
@@ Coverage Diff @@
## master #327 +/- ##
==========================================
+ Coverage 95.88% 95.89% +<.01%
==========================================
Files 153 153
Lines 3818 3851 +33
Branches 508 511 +3
==========================================
+ Hits 3661 3693 +32
Misses 96 96
- Partials 61 62 +1
Continue to review full report at Codecov.
|
benkonrath
requested changes
Feb 23, 2018
Member
benkonrath
left a comment
There was a problem hiding this comment.
Nice job on this! Only the 2 small changes and I'll merge it. Thanks for your contribution!
docs/changelog.rst
Outdated
| Modifications to existing flavors: | ||
|
|
||
| - None | ||
| - Added `NLLicensePlateField` to NL flavor. |
Member
There was a problem hiding this comment.
The entry is only needed once in the 'New fields for existing flavors' section.
localflavor/nl/models.py
Outdated
|
|
||
| class NLLicensePlateField(models.CharField): | ||
| """ | ||
| A Dutch car license plate. |
Member
There was a problem hiding this comment.
It's probably better to remove 'car' as this can be used for all Dutch license plates.
benkonrath
approved these changes
Feb 23, 2018
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added a ModelField and Validator for Dutch License Plates (
NLLicensePlateField) and a FormField (NLLicensePlateFormField) which also sanitizes input.All Changes
[DONE] Add an entry to the docs/changelog.rst describing the change.
[DONE] Add an entry for your name in the docs/authors.rst file if it's not
already there.
[DONE] Adjust your imports to a standard form by running this command:
New Fields Only
[DONE] Prefix the country code to all fields.
[DONE] Field names should be easily understood by developers from the target
localflavor country. This means that English translations are usually
not the best name unless it's for something standard like postal code,
tax / VAT ID etc.
[DONE] Prefer 'PostalCodeField' for postal codes as it's
international English; ZipCode is a term specific to the United
States postal system.
[DONE] Add meaningful tests. 100% test coverage is not required but all
validation edge cases should be covered.
[DONE] Add
.. versionadded:: <next-version>comment markers to newlocalflavors.
[DONE] Add documentation for all fields.