import mod.CONST as const from mod import CONSTANT as constant from mod import ANOTHER_CONSTANT as another_constant import mod.CON as c from mod import C as c # These are all OK: import django.db.models.Q as Query1 from django.db.models import Q as Query2