I have this folder hierarchy:
|---- saga
|---- core
|---- views.py
|---- study_time
|---- views.py
On my study_time/views.py
, I have this functions:
def study_time(request):
def tasks_subjects(week_day, key):
#Code here
return __tasks
def day_studies(week_day):
__tasks_subjects = tasks_subjects(week_day, 0)
#Code here
return __studies
return render(request, 'study_time.html', context)
On my core/views.py
, I need the day_studies() function, so I'm importing like this:
from saga.study_time.views import day_studies
def home(request):
day_progress = day_studies(datetime.date.today().isoweekday())
But I'm getting the error:
ImportError: cannot import name 'day_studies'
How can I make this importation? I don't want to reply all code.