I am a software developer, Ruby, Python, Javascript. Youtuber | Tutor | Athlete, I help overwhelmed junior developers take back control, through 1-2-1 sessions.
Hey Bret, it is a bit of a challenge to know exactly where you are stuck especially with no error messages. But I am going to give it a shot :)
There are different layers to get a .html page to render.
1) create a view ( which you said you have done )
2) make sure template name is home.html
3) add template path in your settings.py
4) point your apps URL to that. view within urlpatterns
5) include app url in your settings url
Hard to gauge at which point. above it is failing for you
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
We're a place where coders share, stay up-to-date and grow their careers.
Hey Bret, it is a bit of a challenge to know exactly where you are stuck especially with no error messages. But I am going to give it a shot :)
There are different layers to get a .html page to render.
1) create a view ( which you said you have done )
2) make sure template name is home.html
3) add template path in your settings.py
4) point your apps URL to that. view within urlpatterns
5) include app url in your settings url
Hard to gauge at which point. above it is failing for you
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?
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.