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

Added the Moroccan localflavor #270

Merged
merged 10 commits into from
Dec 18, 2016
Merged

Conversation

daker
Copy link
Contributor

@daker daker commented Dec 17, 2016

Changes

  • Added regions and provinces data.
  • Added forms helpers for select widgets.
  • Added PhoneNumber field.
  • Added PostalCode field.

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.

@moughamir
Copy link

Nice job!!

@benkonrath
Copy link
Member

Thanks for you contribution. We're in the process of deprecating the phone number fields in localflavor. We now recommend that people use https://github.com/stefanfoulis/django-phonenumber-field. Could you remove the phone number field after which I'll do a full review. Thanks!

@benkonrath benkonrath merged commit 8756cdb into django:master Dec 18, 2016
@claudep
Copy link
Member

claudep commented Dec 18, 2016

Generally, geographic names are marked for translation. I can suppose for example that one may want to translate the names to Arabic. It's not a requirement, just a suggestion.

@benkonrath
Copy link
Member

Thanks @claudep . This is my mistake, I'll correct it.

benkonrath added a commit that referenced this pull request Dec 19, 2016
@daker daker deleted the ma-localflavor branch December 25, 2016 18:52
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.

4 participants