自定义模块cust.py位于应用aptest目录下

1.编辑settings.py

from aptest import cust

2.编辑views.py

from cust import pc #从cust.py中导入pc类

然后在view中可以直接调用pc.property

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-01-07
  • 2021-09-08
  • 2022-01-20
  • 2022-12-23
猜你喜欢
  • 2021-07-28
  • 2021-10-22
  • 2021-06-19
  • 2021-04-11
  • 2021-06-17
  • 2022-02-09
相关资源
相似解决方案