*,hi guys*
finally i could run my project but when i'm trying to open the home page 
that built i get error template does not exist 
and when i look at the details i see that django.engine looked for the 
template when it''s not in.
the html file is in the same directory as the views and that's when i want 
django to look for it.
i need your help to fix that 
please
i attached files so you can see
*THANK YOU*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%40googlegroups.com.
from django.urls import path
from . import views

app_name = 'learning_logs'

urlpatterns = [
    # Home page
    path('', views.index, name='index')
]
from django.shortcuts import render

# Create your views here.

def index(request):
    return render(request, 'learning_logs/index.html')

Learning Log

Learning log helps you keep track of your learning, for any topic you're learning about.

"""bla_bla URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('learning_logs.urls'))
]

Reply via email to