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

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 92

  • @Codemycom
    @Codemycom  4 года назад

    ▶️ Watch Entire Money Making Playlist ✅ Subscribe To My RUclips 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 года назад +4

    oh man that's exactly what I've been looking for for two days !

  • @martinweaver9373
    @martinweaver9373 3 года назад +1

    Honestly, you explain things so well and you always have exactly what I'm looking for. Thank you!

  • @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 года назад +1

      Glad you like them!

  • @sephjvr5979
    @sephjvr5979 Год назад

    You sir are a great teacher! I appreciate you.

  • @anwar__hosen
    @anwar__hosen 3 года назад

    Maan, you deserve a like ♥️

  • @flippp17
    @flippp17 2 года назад

    you solve my live , keep posting you are the best

  • @jpinedude63
    @jpinedude63 4 года назад +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!

  • @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!

  • @sahilkulria7325
    @sahilkulria7325 2 года назад +1

    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 года назад +1

      @@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

  • @ananyamahapatra6597
    @ananyamahapatra6597 4 года назад

    You are just perfectly flawless tutor🤩

    • @Codemycom
      @Codemycom  4 года назад +1

      Thank you so much 😀

  • @chrisr2063
    @chrisr2063 3 года назад

    587 in quotations worked without as well. What does that mean?

  • @nowyouknow2249
    @nowyouknow2249 4 года назад +1

    Well done mate

  • @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!

  • @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

  • @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

  • @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 года назад +1

      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

  • @ai.201
    @ai.201 4 года назад +1

    I see Walter, I click like simple

  • @Doonutzs
    @Doonutzs Год назад

    Thanks a lot

  • @ИгорьКузнецов-т8р
    @ИгорьКузнецов-т8р 4 года назад

    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  4 года назад

      Not sure what you're asking...did you create a view in views.py for each url?

    • @ИгорьКузнецов-т8р
      @ИгорьКузнецов-т8р 4 года назад

      @@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р 4 года назад

      @@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!

  • @parthkrishna
    @parthkrishna 3 года назад

    teaches python methods by the day, makes meth by the night. #breakingBad
    haha, awesome video by the way!

  • @leonardpalma6483
    @leonardpalma6483 2 года назад

    Yo Mr. White!

  • @rangabharath4253
    @rangabharath4253 4 года назад

    Thank you so much

    • @Codemycom
      @Codemycom  4 года назад +1

      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.

  • @saifjafri74
    @saifjafri74 3 года назад

    can we extend multiple pages?

    • @Codemycom
      @Codemycom  3 года назад +1

      You can import more pages

    • @saifjafri74
      @saifjafri74 3 года назад

      @@Codemycom Thank you

  • @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 года назад +1

      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 года назад +1

      @@naveenkumarm7339 Sure.

    • @naveenkumarm7339
      @naveenkumarm7339 4 года назад

      Codemy.com Thanks

  • @mohamedtababi6537
    @mohamedtababi6537 3 года назад

    thanks

  • @kuntakente...7356
    @kuntakente...7356 4 года назад

    ty

  • @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

  • @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

  • @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

  • @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 4 года назад

    Thank you so much