How to import python class file from same directory?

Since you are using Python 3, which disallows these relative imports (it can lead to confusion between modules of the same name in different packages).

Use either:

from models import finding

or

import models.finding

or, probably best:

from . import finding  # The . means "from the same directory as this module"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)