I\'m reading Two Scoops Django Best Practices to make my coding style improve. I\'m in relative imports and here is the sample code to make it reusable.
Old
I usually use imports like this only for one reason
from .foo import bar
from .other import sample
The reason being If Tomorrow, my module name changes from say 'test' to 'mytest' then the code does not require a refactoring. The code works without breaking.
All imports starting with a '.' dot, only works within that package. Cross package imports need require the whole path.