I am a software developer, Ruby, Python, Javascript. Youtuber | Tutor | Athlete, I help overwhelmed junior developers take back control, through 1-2-1 sessions.
Thank you! I watched “theNetNinja” and he never did anything with the dirs to have the os.path or anything. Don’t I just have to include templates [“templates”]?
I am a software developer, Ruby, Python, Javascript. Youtuber | Tutor | Athlete, I help overwhelmed junior developers take back control, through 1-2-1 sessions.
Push what you have up to GitHub or something and I can help direct you better, it is a little tricky not knowing the structure of your files, to know where your templates are being looked up from.
To see if your app is registered in settings, URL conf included etc.
For further actions, you may consider blocking this person and/or reporting abuse
In views I have:
Def homepage_view(request):
Return render(request, ‘homepage.html’)
and then also for about.
I have a homepage.html in my templates folder.
What are the imports in views.py do I need to do?
# view.py from django.shortcuts import render def homepage_view(request): return(request, 'homepage.html', context={}) #app.url from django.urls import path from .views import homepage_view urlpatterns = [ path("home", homepage_view, name="home"), ] # settings.py # should have something like this TEMPLATES = [ ... "DIRS": [os.path.join(BASE_DIR, "app_name/template/app_name")] ... ]Hope this helps :)
Thank you! I watched “theNetNinja” and he never did anything with the dirs to have the os.path or anything. Don’t I just have to include templates [“templates”]?
Push what you have up to GitHub or something and I can help direct you better, it is a little tricky not knowing the structure of your files, to know where your templates are being looked up from.
To see if your app is registered in settings, URL conf included etc.