VeryApt / django-phone-field

Lightweight model and form field for phone numbers in Django
GNU General Public License v3.0
52 stars 13 forks source link

Added ability to parse numbers formatted with ', press ' #2

Closed ddurdik closed 6 years ago

ddurdik commented 6 years ago

I ran into a corner case where I needed to create a PhoneNumber object using the output of another PhoneNumber with the "{base_number}, press {extension}" format. This PR makes that possible

va-andrew commented 6 years ago

Very nice. As long as we're cleaning up extension separators, let's have:

BACKEND_EXTENSION_SEPARATOR = 'x'
VERBOSE_EXTENSION_SEPARATOR = ', press '

so there's a single definition for both kinds of separators?

ddurdik commented 6 years ago

Can do. I made the change in the form as well to keep things consistent

va-andrew commented 6 years ago

Just merged, will do a version update and PyPI release this week