changing import name in python

发布于 2021-01-29 14:10:45

is it possible to change the name of the imported python file?

in my views.py in django i have

from myapp.models import *
from suds.client import Client

def main_page(request, id):
   client = Client.objects.get(id=id)
     ...
   response = Client(WSDL_FILE)
     ...

in my models i have a model of a Client, but when i used suds for the WSDL
file, i import Client but i got the AttributeError in my Client’s model …

my question is, it is possible if i can change the name of the Client in
suds.client?

can anyone have an idea about my situation?

thanks in advance …

关注者
0
被浏览
116
1 个回答
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看