Importing Required Modules
In your module's views.py, import BaseCrudView and your table and form classes:
from ...packages.crud.base import BaseCrudView
from .tables import PatientTable
from .forms import PatientForm
:::info Relative Import Depth Import paths use relative imports — the number of dots depends on your module's depth from the app root.
| Module location | Import for packages/ |
|---|---|
backend/patients/views.py | from ...packages.crud.base (3 dots) |
backend/masters/geography/views.py | from ....packages.crud.base (4 dots) |
Count dots: one dot per directory level up to the app root, then one more to reach packages/.
:::
Replace PatientTable and PatientForm with your actual table and form class names.