Home > other >  Import "phonenumber_field.modelfields" could not be resolved
Import "phonenumber_field.modelfields" could not be resolved

Time:08-22

I have django project and I try to add phonenumber package, I've done 'pip install django-phonenumber-field[phonenumbers]' and I imported the library to my .models but it shows up as an error but it works anyways, the error is called: "Import "phonenumber_field.modelfields" could not be resolved(reportMissingImports)" how do I fix the problem so it won't tell me its a problem and will work like everything else?

Please help :3 my code and error

CodePudding user response:

Try adding it to settings as well. Here’s the example from the docs:

INSTALLED_APPS = [
    ...
    'phonenumber_field',
    ...
]

CodePudding user response:

try to add this.

INSTALLED_APPS = [ ... 'phonenumber_field', ... ]

  • Related