iscream
iscream

Reputation: 790

How to differentiate between modules with same name in Django

For example, there is a 'reverse' module in Django which you can use for easy navigation between links. There is also a 'reverse' module available in DRF which can be used for creating custom API endpoints easily. I'm sure people at some point need to use both the modules at different stages, but how is Django going to differentiate between these two modules? They are called almost in the same way. Or am I wrong? Maybe either of the modules can be use to carry out both the tasks?

Upvotes: 0

Views: 52

Answers (1)

jTiKey
jTiKey

Reputation: 743

Use "as":

from foo import same_name
from new import same_name as same_name_new

Upvotes: 2

Related Questions