The structure of my project is the next:
MyProject
apps
homeapp
admin.py
apps.py
migrations
init__.py
models.py
tests.py
views.py
init.py
urls.py
homeapp-views.py:
from django.shortcuts import render
from django.shortcuts import HttpResponse
def home(request):
return render(request, 'home.html')
urls.py:
from django.contrib import admin
from django.urls import path
from django.conf.urls import include
from homeapp.views import home
python3.7+django2.2
I don't know how to describe my question when I was searching.Is it "How to import a module from a different folder in Python?"