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

Created ES models.py #357

Closed
wants to merge 39 commits into from
Closed

Created ES models.py #357

wants to merge 39 commits into from

Conversation

gil-obradors
Copy link

@gil-obradors gil-obradors commented Jan 29, 2019

Added models for ES-ID document and ES-PostalCodes.
I'm newbie with Django.
Please correct me if something is wrong.
I inspired this models from us/models.py

Thanks for your contribution!

A checklist is included below which helps us keep the code contributions
consistent and helps speed up the review process. You can add additional
commits to your pull request if you haven't met all of these points on your
first version.

All Changes

  • Add an entry to the docs/changelog.rst describing the change.

  • Add an entry for your name in the docs/authors.rst file if it's not
    already there.

  • Adjust your imports to a standard form by running this command:

    `isort --recursive --line-width 120 localflavor tests`
    

New Fields Only

  • Prefix the country code to all fields.

  • 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.

  • Prefer 'PostalCodeField' for postal codes as it's
    international English; ZipCode is a term specific to the United
    States postal system.

  • Add meaningful tests. 100% test coverage is not required but all
    validation edge cases should be covered.

  • Add .. versionadded:: <next-version> comment markers to new
    localflavors.

  • Add documentation for all fields.

Added models for ES-ID document and ES-PostalCodes
Models for National-ID and PostalCodes
Add DNI and Postalcode model
Isorted
@gil-obradors
Copy link
Author

gil-obradors commented Jan 29, 2019

Failed with:

localflavor/no/forms.py
Line: 132
pyflakes: F999 / use ==/!= to compare str, bytes, and int literals (col 14)
Line: 147
pyflakes: F999 / use ==/!= to compare str, bytes, and int literals (col 25)

I haven't edit this files: why?

@codecov-io
Copy link

codecov-io commented Feb 5, 2019

Codecov Report

Merging #357 into master will decrease coverage by 0.12%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #357      +/-   ##
=========================================
- Coverage   95.93%   95.8%   -0.13%     
=========================================
  Files         157     158       +1     
  Lines        3981    4003      +22     
  Branches      523     523              
=========================================
+ Hits         3819    3835      +16     
- Misses         98     104       +6     
  Partials       64      64
Impacted Files Coverage Δ
localflavor/es/es_provinces.py 100% <ø> (ø) ⬆️
localflavor/no/forms.py 87.35% <100%> (ø) ⬆️
localflavor/es/models.py 72.72% <72.72%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cb223b...78bb5c4. Read the comment docs.

@gil-obradors gil-obradors changed the title Created models.py Created models.py ES Feb 6, 2019
@gil-obradors gil-obradors changed the title Created models.py ES Created ES models.py Feb 6, 2019
@benkonrath
Copy link
Member

A dependency in prospector was updated which found the issue with the Norway localflavor. This is now fixed in master. Can you rebase this branch with master? I'll do a review once it's rebased. Thanks.

Added models for ES-ID document and ES-PostalCodes
@gil-obradors
Copy link
Author

Have I been done the rebase correctly? Sorry I have no more knowledges

@benkonrath benkonrath added this to the 2.2 milestone Apr 22, 2019
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.

3 participants