Extends Base.html For Navbars - Python Django Dentist Website #8

  Рет қаралды 36,891

Codemy.com

Codemy.com

Күн бұрын

Пікірлер: 92
@Codemycom
@Codemycom 5 жыл бұрын
▶️ Watch Entire Money Making Playlist ✅ Subscribe To My KZbin Channel: bit.ly/2tEBTzg bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com Take $30 off with coupon code: youtube1
@EUU100
@EUU100 3 жыл бұрын
thank you, it helped when you made it clear that everything is now being fed through the base.html page, so the block and end block are used to choose what section we want to take from each template
@medbenzekri
@medbenzekri 4 жыл бұрын
oh man that's exactly what I've been looking for for two days !
@Codemycom
@Codemycom 4 жыл бұрын
awesome!
@martinweaver9373
@martinweaver9373 3 жыл бұрын
Honestly, you explain things so well and you always have exactly what I'm looking for. Thank you!
@Codemycom
@Codemycom 3 жыл бұрын
Happy to help!
@Schecter1989
@Schecter1989 4 жыл бұрын
There's a lot of great content here that isn't part of the Coedmy course; good thing I checked these additional videos!
@Codemycom
@Codemycom 4 жыл бұрын
Glad you like them!
@sephjvr5979
@sephjvr5979 Жыл бұрын
You sir are a great teacher! I appreciate you.
@Codemycom
@Codemycom Жыл бұрын
Thanks
@flippp17
@flippp17 2 жыл бұрын
you solve my live , keep posting you are the best
@Codemycom
@Codemycom 2 жыл бұрын
Thanks
@anwar__hosen
@anwar__hosen 3 жыл бұрын
Maan, you deserve a like ♥️
@Klaceyes
@Klaceyes 2 жыл бұрын
Thanks a lot ! I had a problem with the block content not showing and wasn't able to find a documentation on that. It was just a misunderstanding on the logic behind it, i thought that just adding a big block on the page to be extended when i had to add that little block content under what i wanted to export
@Codemycom
@Codemycom 2 жыл бұрын
Glad you got it sorted out!
@ananyamahapatra6597
@ananyamahapatra6597 4 жыл бұрын
You are just perfectly flawless tutor🤩
@Codemycom
@Codemycom 4 жыл бұрын
Thank you so much 😀
@chrisr2063
@chrisr2063 3 жыл бұрын
587 in quotations worked without as well. What does that mean?
@sahilkulria7325
@sahilkulria7325 2 жыл бұрын
I am able to extend my base.html to all other pages but there is a problem. I have to write my css code for each page. for that wrote the css code for base.html in base_style.css file linked base.html to base_style.css. So now I don't have to write the same css code every time but now there is another big problem. I can not link another page's html files to there css files. Please help, You are my last hope, otherwise I am gonna write that 1000 line css code to all my pages(atleast 20).
@Codemycom
@Codemycom 2 жыл бұрын
Sorry, I don't understand what you're asking
@sahilkulria7325
@sahilkulria7325 2 жыл бұрын
@@Codemycom My issue is like : I have two file : 'base.html' and "page1.html". "page1.html" is inherited from "base.html". I wanna link "base.html" to "basestyle.css" and "page1.html" to "page1style.css". But I am able to link only one of the css files ( either "base.html" to "basestyle.css" OR "page1.html" to "page1style.css" ). I can't do both at the same time.
@Codemycom
@Codemycom 2 жыл бұрын
@@sahilkulria7325 Gotcha, try one of these: stackoverflow.com/questions/25386868/django-templates-use-different-css-for-pages or stackoverflow.com/questions/58698373/django-template-inheritance-how-to-use-multiple-css-files
@ekwogeblaise2597
@ekwogeblaise2597 4 жыл бұрын
Hi, thanks so much for the awesome tutorial. Been following along and it is great. For the previous tutorial, I had the port in quotation mark and got a message both when testing and after using my gmail. So was wondering
@Codemycom
@Codemycom 4 жыл бұрын
Cool
@nowyouknow2249
@nowyouknow2249 5 жыл бұрын
Well done mate
@Codemycom
@Codemycom 5 жыл бұрын
Thanks so much!
@Xanthron
@Xanthron 4 жыл бұрын
Hello John. I am not getting a result as expected. I put the base.html file in views.py and extends in home.html but not getting a result. It is showing error when load static line written as the first line of the base.html file. I can see only output from base.html file and not home.html (extended files). I am using Django 3.1.2. Please help me out.
@Codemycom
@Codemycom 4 жыл бұрын
Why did you put your base.html in views.py?
@Xanthron
@Xanthron 4 жыл бұрын
@@Codemycom I resolved the issue. it was related to the path of the templates and also the home.html file in views.py. Thank you for the quick reply John.Cheers!
@jpinedude63
@jpinedude63 4 жыл бұрын
For anyone getting the "Template Doesn't Exist" Error: Try modifying the extends tag from {% extends 'base.html' %} To: {% extends 'website/base.html' %} Since we created that additional folder in the earlier lesson, hope this helps!
@josephchacko869
@josephchacko869 4 жыл бұрын
Is it possible to select and open pages using Navbar menu options without reloading the whole page? For ex: If I click on 'About'. Is it possible to open the About.html page without reloading the whole page?
@Codemycom
@Codemycom 4 жыл бұрын
No, unless you set up some weird Ajax thing or something
@fernandust
@fernandust 4 жыл бұрын
@@Codemycom hi John! Do you have any tutorials on how to make this happen? I want to build a bottom navbar like the ones you have on mobile apps and it would be great if it would stay always visible.
@Codemycom
@Codemycom 4 жыл бұрын
@@fernandust no sorry
@naveenkumarm7339
@naveenkumarm7339 4 жыл бұрын
@Codemy.com, Which Technology/Tools must be used to build very efficient e-commerce mobile app? Can you please suggest me ...
@Codemycom
@Codemycom 4 жыл бұрын
It doesn't matter. Use the tools you like.
@naveenkumarm7339
@naveenkumarm7339 4 жыл бұрын
Codemy.com 😂. So for web site Django and mobile app Kivy ok ?
@Codemycom
@Codemycom 4 жыл бұрын
@@naveenkumarm7339 Sure.
@naveenkumarm7339
@naveenkumarm7339 4 жыл бұрын
Codemy.com Thanks
@saifjafri74
@saifjafri74 3 жыл бұрын
can we extend multiple pages?
@Codemycom
@Codemycom 3 жыл бұрын
You can import more pages
@saifjafri74
@saifjafri74 3 жыл бұрын
@@Codemycom Thank you
@ИгорьКузнецов-т8р
@ИгорьКузнецов-т8р 5 жыл бұрын
Hi received such notification Using the URLconf defined in dentist.urls, Django tried these URL patterns, in this order: admin/ [name='home'] [name='contact'] The current path, index.html, didn't match any of these. what can be wrong? in which file? this notification appears when I try to move from contact page to home page.
@Codemycom
@Codemycom 5 жыл бұрын
Not sure what you're asking...did you create a view in views.py for each url?
@ИгорьКузнецов-т8р
@ИгорьКузнецов-т8р 5 жыл бұрын
@@Codemycom yes created them before. Separetely contact page and start(home at localhost 8000)page I can open. But when I want to move from contact page to home via clicking on "Home" at nav bar I recieve such error (
@ИгорьКузнецов-т8р
@ИгорьКузнецов-т8р 5 жыл бұрын
@@Codemycom I found mistake hope thuther all will work correctly!
@DrKhan-hd4cd
@DrKhan-hd4cd 4 жыл бұрын
@@ИгорьКузнецов-т8р can you elaborate please on how did you fix this issue? I am having the same problem.
@chinkajoon4760
@chinkajoon4760 4 жыл бұрын
@@ИгорьКузнецов-т8р hi i have the same problem you had, can you share how did you solve it? Thanks!
@esrevinudekcolnu1652
@esrevinudekcolnu1652 3 жыл бұрын
How can include base.html (inside templates folder) to inside about.html (inside static/pages/about.html). i'm including {% extends 'base.html" %} inside static/pages/about.html but its not working. please explain
@Codemycom
@Codemycom 3 жыл бұрын
You don't extend things in static files, that's not how it works. you extend base in the file that CALLS the static files.
@esrevinudekcolnu1652
@esrevinudekcolnu1652 3 жыл бұрын
@@Codemycom ok thanks
@Doonutzs
@Doonutzs Жыл бұрын
Thanks a lot
@Codemycom
@Codemycom Жыл бұрын
Welcome
@leonardpalma6483
@leonardpalma6483 2 жыл бұрын
Yo Mr. White!
@Codemycom
@Codemycom 2 жыл бұрын
Yo!
@rangabharath4253
@rangabharath4253 5 жыл бұрын
Thank you so much
@Codemycom
@Codemycom 5 жыл бұрын
You're welcome very much!
@Calcific9
@Calcific9 Жыл бұрын
this is literally making no sense. my main html file now displays nothing BUT the title and content block tags that i exported to base.
@Codemycom
@Codemycom Жыл бұрын
What did you do differently from the video? I suggest putting it aside for 2-3 days and then rewatching the video and checking the code. Your error will likely jump right out at you with a fresh set of eyes.
@ai.201
@ai.201 5 жыл бұрын
I see Walter, I click like simple
@Codemycom
@Codemycom 5 жыл бұрын
haha
@parthkrishna
@parthkrishna 3 жыл бұрын
teaches python methods by the day, makes meth by the night. #breakingBad haha, awesome video by the way!
@naveenkumarm7339
@naveenkumarm7339 4 жыл бұрын
You did an Awesome job on these Django videos. Thanks. Please help me to fix the below issue: After extended base.html (only home.html), its Returning following Error Using the URLconf defined in dentist.urls, Django tried these URL patterns, in this order: admin/ [name='home'] The current path, index.html, didn't match any of these. # Website url.py from django.urls import path from . import views urlpatterns = [ path('', views.home, name='home'), ] # views.py from django.shortcuts import render # Create your views here. def home(request): return render(request, 'home.html', {}) Am i Missing any Path Here ? Since its returning "The current path, index.html, didn't match any of these." Or Django Installed Version issue ?
@Codemycom
@Codemycom 4 жыл бұрын
You don't have an index.html path created. Why are you trying to open an index.html page?
@naveenkumarm7339
@naveenkumarm7339 4 жыл бұрын
I haven’t created Index.html. It’s home.html. After changing base.html, above error is returning. Basically I think it is showing error for base.html.
@Codemycom
@Codemycom 4 жыл бұрын
@@naveenkumarm7339 But are you typing index.html into the web browser?
@naveenkumarm7339
@naveenkumarm7339 4 жыл бұрын
@@Codemycom No. I have just made changes in the home.html and base.html
@Codemycom
@Codemycom 4 жыл бұрын
@@naveenkumarm7339 Somewhere in your code you referenced index or index.html
@mohamedtababi6537
@mohamedtababi6537 3 жыл бұрын
thanks
@Codemycom
@Codemycom 3 жыл бұрын
No problem!
@kuntakente...7356
@kuntakente...7356 4 жыл бұрын
ty
@Codemycom
@Codemycom 4 жыл бұрын
Welcome!
@mrutyunjayashiremath5589
@mrutyunjayashiremath5589 4 жыл бұрын
TemplateDoesNotExist at / base.html
@Codemycom
@Codemycom 4 жыл бұрын
Did you put your template directory in the wrong place? Did you put base.html in quotes?
@mrutyunjayashiremath5589
@mrutyunjayashiremath5589 4 жыл бұрын
I followed your video everything does work I got this error Desktop\webpage\web\accounts\templates\accounts\home.html, error at line 1 site-packages\django\template\backends\django.py", line 84, in reraise
@mrutyunjayashiremath5589
@mrutyunjayashiremath5589 4 жыл бұрын
home.html 1.start code {% extends 'base.html' %} {% load static %} {% block content %} end {% endblock %} 2.base.html start {% load static %} i have created base.html in templates folder i made mistake i don't now what to do sir
@Codemycom
@Codemycom 4 жыл бұрын
@@mrutyunjayashiremath5589 Try putting the load static line first
@mrutyunjayashiremath5589
@mrutyunjayashiremath5589 4 жыл бұрын
@@Codemycom Thank you soo much sir I got
@robh9184
@robh9184 4 жыл бұрын
Nice video as always! Interesting that the message still sent to my email inbox with EMAIL_PORT = '587' in the quotation marks.. no issues there it seemed
@Codemycom
@Codemycom 4 жыл бұрын
Interesting!
@DeEmptyHeaded
@DeEmptyHeaded 4 жыл бұрын
Really awesome contect. It helps me a lot. Besides, i like how you teach people, lovely. Btw, i have a problem after i set the base html and move the footer section to the base.html. my social media icon become like this ibb.co/L1Nc3JY do you know why its happen and how to fix this? thanks
@yousifahmed257
@yousifahmed257 5 жыл бұрын
Thank you so much
@Codemycom
@Codemycom 5 жыл бұрын
You're Welcome!
django-cotton - Modern Components in Django!
20:41
BugBytes
Рет қаралды 10 М.
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН
Как Ходили родители в ШКОЛУ!
0:49
Family Box
Рет қаралды 2,3 МЛН
Tweak CSS And Add Images - Python Django Dentist Website #5
13:14
Django Tutorial - Templates & Custom HTML
27:52
Tech With Tim
Рет қаралды 115 М.
Create a clean, modern navigation with HTML & CSS
25:17
Kevin Powell
Рет қаралды 157 М.
How To Send Email With Django - Python Django Dentist Website #7
22:01
Design and styling in Django
16:45
Cloud With Django
Рет қаралды 6 М.
Django Tutorial #13 - Extending Templates
5:49
Net Ninja
Рет қаралды 80 М.
The Biggest Mistake Beginners Make When Web Scraping
10:21
John Watson Rooney
Рет қаралды 124 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 821 М.