urls.py / telusko ## имя проекта telusko вывод
from django.contrib import admin
from django.urls import path,include
urlpatterns = [
path('',include('travello.urls')), ##app named as travello
path('admin/', admin.site.urls),
]
urls.travello ## URL приложения
from django.urls import path
from .import views
urlpatterns = [
path("",views.index,name="index.html"),
]
views.py ## app travello views.py
from django.shortcuts import render
# Create your views here.
def index(request):
return render(request, 'index.html')
Settings.py ## telusko settings
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS':os.path.join(BASE_DIR,'templates\index.html'),
'APP_DIRS': True,