BlackBoxSql
BlackBoxSql

Reputation: 66

How to make a Bangladeshi phone number field in the model of django?

Is there any package or widgets to do so?

Example numbers:

[+880][17][59219191], [+880][16][59219090]

Here [+880] is country code, which is constant,

[14],[16],[17]...etc are service provider numbers

[59219090],[59219191]...etc are third part of mobile numbers in Bangladesh.

Upvotes: 0

Views: 488

Answers (2)

shafikshaon
shafikshaon

Reputation: 6404

you can use phone number field as CharField then use widget in ModelForm fields. Take help from this to apply masking of filed link

Upvotes: 0

Yugandhar Chaudhari
Yugandhar Chaudhari

Reputation: 3964

You can use django-phonenumber-field and set PHONENUMBER_DEFAULT_REGION for your national.

Upvotes: 1

Related Questions