【发布时间】:2020-06-17 13:45:10
【问题描述】:
我的项目结构如下:
_stato_patrimoniale
___views.py
_iva
___utility.py
在 stato patrimonale 我有以下代码:
from iva.utility import my_func
def stato_patrimoniale(request):
now=datetime.datetime.now()
last_account_year=float(now.year)-1 #definizione dell'ultimo anno contabile
now = now.year
if request.method == 'POST':
year = request.POST['year']
if year != '':
now = year
last_account_year = float(now) - 1
data=my_func()
iva_a_credito=data['iva_a_credito']
现在在我的iva.utility 我有以下代码:
def my_func():
pass
现在我想从stato_patrimoniale 导入my_func()last_account_year 的值。怎么可能?
【问题讨论】:
标签: python python-3.x django django-models django-forms