Add Blog Posts To Django Webpage - Django Blog #2

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 2025

ความคิดเห็น • 236

  • @Codemycom
    @Codemycom  4 ปีที่แล้ว +3

    ▶️ Watch Entire Django Blog Playlist ✅ Subscribe To My TH-cam Channel:
    bit.ly/3bWN6wj bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN

  • @steelydan2022
    @steelydan2022 4 ปีที่แล้ว +11

    This tutorial series is fantastic! I hope you are being fairly compensated. Thanks so much!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +4

      Glad you like them!

  • @andrenevares7543
    @andrenevares7543 4 ปีที่แล้ว +3

    The best explanation of class base views of all TH-cam Channels. Nice Work. I use Django for a while. But watching your videos help me to see some points in another way. Thanks.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Glad it was helpful!

  • @ninjatribble7961
    @ninjatribble7961 4 ปีที่แล้ว +8

    Your channel is keeping me busy during lockdown, keep em coming!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +2

      Happy to help!

  • @pentestPY
    @pentestPY วันที่ผ่านมา

    This is by far the coolest video I have seen. You are really excited to teach and program we are even more excited to learn.. I am following this video and I am trying to do this in function based view, See how that will pan out.

  • @DwijeshDookraz
    @DwijeshDookraz 4 ปีที่แล้ว +7

    Hey, John, I got to 16:18 and had the link to the other page up but when I tried to do any of the {{post.title}} stuff it would just print {{post.title}} on the second page and not the actual title like it did on the first page.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      that's weird... what are you doing differently than the video?

    • @kabahblog
      @kabahblog 4 ปีที่แล้ว +8

      put {% object.title %}

    • @singhshubham765
      @singhshubham765 4 ปีที่แล้ว +3

      @@kabahblog work for me {{ object.Title }}

  • @fatimas6428
    @fatimas6428 3 ปีที่แล้ว +1

    Wow!!!! Just Wow.. This video is all i needed.. i was stuck on how to link each title with their respective details and boom! This just solved that so easily!! 🤩🤩🤩🤩

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Glad you liked it!

  • @exactbrain6248
    @exactbrain6248 4 ปีที่แล้ว

    youve helped me alot man,at first i never want to watch your video not until one click,and booom i am addicted to your videos

  • @nowyouknow2249
    @nowyouknow2249 4 ปีที่แล้ว

    This channel is underrated.
    Thanks John Elder!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      I agree, tell your friends about it! :-p

  • @Kier-cw6qc
    @Kier-cw6qc 4 ปีที่แล้ว

    The way you teach is so stress free. hahaha you're releasing good vibes. hahaha Thank Your very much .

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Happy to hear that!

  • @kindaworks3293
    @kindaworks3293 2 ปีที่แล้ว

    best tut ever made on TH-cam! Liked and Subbed, you are the best!

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว +1

      Thanks! Appreciate it!

  • @jiffylab
    @jiffylab 2 ปีที่แล้ว +1

    Hi, after 8:47, I ran my code and got an error: Exception Type: TemplateDoesNotExist Exception Value: blog/post_list.html
    Any suggestions on how to fix this?

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      It's telling you what's wrong. It can't find a template at blog/post_list.html do you have one? Did you misspell it?

    • @devangperiwal4031
      @devangperiwal4031 2 ปีที่แล้ว

      Did you find out what was causing the error? I encountered the same error

  • @cyberlab551
    @cyberlab551 2 ปีที่แล้ว

    you're the best. you save me after three hours of facing bugs.
    do you want to know something? you're my favorite youtuber and programmer

  • @tudorcozma6781
    @tudorcozma6781 3 ปีที่แล้ว

    Thank you very much for this lesson
    for a week I'm watching different lessons to find how to put different lists of items on the same page
    listView
    Maybe I found something, but i didn't understoond that,
    You explaned so simple clear.

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Glad you liked it

  • @monstersav7546
    @monstersav7546 4 ปีที่แล้ว

    Man I just like your "What's going on guys...". Thank you very much sir. I wish you just Live and Code Forever. Love your work sir.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      I appreciate that!

    • @habiborrahaman4531
      @habiborrahaman4531 3 ปีที่แล้ว

      raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain) how to solve this issue

  • @adelbordbari9416
    @adelbordbari9416 4 ปีที่แล้ว +1

    it's 4:12am but I'm stuck! I can't stop watching these.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      Awesome! I know the feeling

  • @dav1d_andrew
    @dav1d_andrew 3 ปีที่แล้ว +1

    your style is perfect for a fast learner. Thank you bro🤙

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      Glad you think so!

  • @fzahmd5461
    @fzahmd5461 4 ปีที่แล้ว +2

    Well Explained sir, Thanks for sharing.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Thanks for watching!

  • @isabelpena295
    @isabelpena295 3 ปีที่แล้ว +1

    Hey, I did everything just like you did but an error came up: Reverse for 'listing_details' with arguments '('',)' not found. Any idea on how to fix it?

  • @john-mikecourteaud9772
    @john-mikecourteaud9772 4 ปีที่แล้ว

    Thank you very much for the videos. The concepts are well explained and we're going step by step with the functionalities. Hi from Reunion island.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Thanks! Glad you enjoyed them!

  • @jamesmoyer7284
    @jamesmoyer7284 4 ปีที่แล้ว

    When I created the clickable link for the detailed blog html and clicked on the link I got:
    File "C:\ProgrammingStuff\Enviroments\PapagaioTech\lib\site-packages\django\template\loader.py", line 47, in select_template
    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
    django.template.exceptions.TemplateDoesNotExist: HeatherBlog/post_detail.html
    [25/Jan/2021 12:14:11] "GET /article/1 HTTP/1.1" 500 77417
    After creating a Heather folder in templets and renaming the detailed article html to post_detail.html everything worked fine at this time. Did this have something to do with (from django.views.generic import ListView, DetailView)? or did I miss something in the video?

  • @MrShadowblue25
    @MrShadowblue25 2 ปีที่แล้ว

    Great,
    So far, this is really the tutorial I was looking for...and I watched a few lol. thx

  • @yao8978
    @yao8978 3 ปีที่แล้ว +1

    Your django course is cool! Thanks!

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      Glad you like it!

  • @outervumedia
    @outervumedia 2 ปีที่แล้ว

    What would be the best method to add the title or title tag at the end of the post id? Would like to do so for SEO purposes.

  • @pandurangasharmaramaka
    @pandurangasharmaramaka 2 ปีที่แล้ว

    Thank you. Worked out. you're a great teacher, no doubt.

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว +1

      Glad you got it worked out

  • @helloworld3683
    @helloworld3683 3 ปีที่แล้ว +1

    Is there any github repository where we can get the source code for all blog series ?

  • @SajjadHematiNourani
    @SajjadHematiNourani 2 ปีที่แล้ว

    Mr. Elder I need different types of single posts. How can I make suck thing? (for example my articledetails in one post is different from another post)

  • @mateusneves886
    @mateusneves886 10 หลายเดือนก่อน

    Hi John, can you explain to me at the for loop where the object_list came from? Thanks, love from Brazil!

  • @RamYadav-kl1xk
    @RamYadav-kl1xk 4 ปีที่แล้ว

    Awesome course .super easy for beginners to learn Django

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Glad you think so!

  • @delvorin1841
    @delvorin1841 4 ปีที่แล้ว +1

    Thanks, John for posting the video/series.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      You're welcome! :-)

  • @abdullahatif7854
    @abdullahatif7854 4 ปีที่แล้ว +2

    Yes, this is pretty simple so far.
    Thanks Mr.J
    Hehehe

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      You're welcome

  • @gouthamgoutham7640
    @gouthamgoutham7640 4 ปีที่แล้ว

    Sir i have created 5 models such as education exersices sports under one app will the primary key will be affected to display detail page ??

  • @jay-jaypagulayanucol9303
    @jay-jaypagulayanucol9303 9 หลายเดือนก่อน

    Just 2 question for clarification.
    1. Does the "post" in the "post.title" in the detailview implementation referenced to the name of the Model? if so, for example my model name is "Main" so in detailview, I just say "main.something" to reference it?
    2. How does the detailview know what pk is clicked. Does it automatically knows that the url contains the pk? or does it base on the /
    Thankyou very much for the concise and clear tutorial

    • @Codemycom
      @Codemycom  9 หลายเดือนก่อน

      no, post is the form that is POST'ed... you use it in the manner that it's used in the video. 2) it knows the pk from the url, which IS the ...that's the URL

    • @jay-jaypagulayanucol9303
      @jay-jaypagulayanucol9303 9 หลายเดือนก่อน

      @@Codemycom oh it uses the Method "POST" as reference. Thankyou very much, i can now proceed in the videos.

  • @gustavosanchezmuller3117
    @gustavosanchezmuller3117 3 ปีที่แล้ว +3

    Reverse for 'article-details' with no arguments not found. 1 pattern(s) tried: ['article/(?P[0-9]+)$']
    :( help please, im using django 2.1.2

  • @petecodes
    @petecodes 3 ปีที่แล้ว

    I'm not having any luck when it comes to posting to getting the post.title etc on the new template. How does django know what it is referring to if there isn't the for loop?

    • @smishra6378
      @smishra6378 3 ปีที่แล้ว +1

      You can set the context_variable_name to the name you prefer in order to be sure.
      Code snippet:
      class ArticleDetailView(DetailView):
      model = Posts
      context_object_name = 'post'

    • @petecodes
      @petecodes 3 ปีที่แล้ว

      @@smishra6378 Thanks! Sorted now.

  • @brunoruiztalamo3692
    @brunoruiztalamo3692 ปีที่แล้ว

    Hi, I cannot access posts' primary keys.. I'm given a NoReverseMatch no matter what I do.

  • @elwinjyothis5388
    @elwinjyothis5388 4 ปีที่แล้ว

    Dude you have been repliying to all. So thaught why not me
    Great video
    the deal is a reply

  • @FootyPick
    @FootyPick 4 ปีที่แล้ว

    Can you make one small video on how to use slug instead of ids and filter the blog post with slug

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Yeah we'll talk about slugs eventually

  • @anoshwasker4635
    @anoshwasker4635 3 ปีที่แล้ว

    I can't seem to get anything inside my django for loop to be displayed on screen. Any suggestions?

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      django uses a different convention for for loops…check the docs

  • @pademo57
    @pademo57 3 ปีที่แล้ว +1

    Hi John, at 2:00 when you added the ListView and DetailView on 1 line it wouldn't work for me until I changed them into 2 separate lines:
    from django.views.generic.list import ListView
    from django.views.generic.detail import DetailView
    Not sure if anyone else had this problem.
    Keep up the great work. Love the videos! And yes, I am a subscriber!

  • @shishirhossain1767
    @shishirhossain1767 3 ปีที่แล้ว

    is there any issue with post.title and Post.title? We named our model Post. So it should b post in html files. I mean, I am confused, for me both worked, Post and post. Can anyone xpln plz?

  • @dadofalltrades3641
    @dadofalltrades3641 4 ปีที่แล้ว +1

    Thanks for the video John. a question regarding generic views. So, by default, is 'object_list' the context variable name for the query_sets in template tags whenever we make a class that inherits from genric ListView? and is 'post' the default context variable name for a model in template tage whenever we make a class that inherits from generic DetailView?

    • @amohampofo
      @amohampofo 4 ปีที่แล้ว +3

      To be 100% sure the context variable name do:
      class ArticleDetailView(DetailView):
      model = Posts
      context_object_name = 'post'

    • @francisonyenekwe9136
      @francisonyenekwe9136 4 ปีที่แล้ว +2

      Thanks @Godwin amoh. This your line of code just helped me out. I have been stuck in a loop since wondering what I did wrong that make my page return blank

    • @romaricvivien8965
      @romaricvivien8965 2 ปีที่แล้ว +1

      @@amohampofo Thanks you very much !!! it helps me !!!!

  • @King_504
    @King_504 11 หลายเดือนก่อน

    first time seeing class based views, thx

    • @Codemycom
      @Codemycom  11 หลายเดือนก่อน

      welcome

  • @aexiliakanzawa1187
    @aexiliakanzawa1187 3 ปีที่แล้ว

    question can i use the title instead of the primary key?

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      Give it a try

  • @habiborrahaman4531
    @habiborrahaman4531 3 ปีที่แล้ว

    For loop, object_list variable this not understanding. Where to you find this variable object_list tell me, someone

  • @mohaimanulislammahin8722
    @mohaimanulislammahin8722 4 ปีที่แล้ว

    Awsome bro .....thats good

  • @Gsnchez
    @Gsnchez 4 ปีที่แล้ว

    I'm seeing the template tags {{post.author}} etc... hardcoded in the html and can't find why

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      To output the author to the screen?

    • @carlosamaral6917
      @carlosamaral6917 4 ปีที่แล้ว

      Same problem!

    • @carlosamaral6917
      @carlosamaral6917 4 ปีที่แล้ว +1

      Ok! I just solved the problem! It was all a matter of indentation in my case!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      @@carlosamaral6917 Glad you got it sorted out

    • @carlosamaral6917
      @carlosamaral6917 4 ปีที่แล้ว

      @@Codemycom Thanks for your videos! They're being really helpful for myself! Btw, in this case, the problem is just related to the indentation in both home.html and article details.html. Playing a bit with enter and changing the way the code is organized solves it all... I'm using linux ubuntu, not sure if it can be related to it, as it seems like the indentation you used worked for you and for all those who didn't complain about!
      Thanks one more time!!

  • @FootyPick
    @FootyPick 4 ปีที่แล้ว

    Amazing 💓💓💓💓

  • @jenifer5463
    @jenifer5463 2 ปีที่แล้ว

    Classed based home views how to define home page display only 3 post instead of many post.. Please hope only line of cpde just need... I can do it from function based views...respected sir

  • @sarangkkl214
    @sarangkkl214 3 ปีที่แล้ว

    sir i try the same but i successfully display the blog but when i am clicking on a particular blog i reach on the desired url but that page is blank i guess only primary key is passing not the other types of data like the blog
    and extra

    • @sarangkkl214
      @sarangkkl214 3 ปีที่แล้ว

      thanks sir i get help from the comment section itself it says object.field_name works fine

  • @hariharanbalasubramanianpr4243
    @hariharanbalasubramanianpr4243 4 ปีที่แล้ว +1

    I think we can use the function also right sir???

  • @saudagarfarhan629
    @saudagarfarhan629 ปีที่แล้ว

    you are amazing teacher

  • @gabrielaraya3242
    @gabrielaraya3242 3 ปีที่แล้ว

    Ive been following this tutorial but the detail view seems not to be rendering the data, any ideas?

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      You just have a typo somewhere

  • @ritankarbhattacharjee7661
    @ritankarbhattacharjee7661 3 ปีที่แล้ว

    I have written the exact same codes but for some reason my code isn't displaying the data. There are no errors but still

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      You're wrong, there are errors you just haven't noticed them.

    • @ritankarbhattacharjee7661
      @ritankarbhattacharjee7661 3 ปีที่แล้ว

      @@Codemycom
      Yes sir, but for me post.body didn't work for me object.body worked the primary key was being referenced but the data was not being displayed . By the way you're videos are helping a lot, thank you so much ❤️

  • @slayeroff7798
    @slayeroff7798 4 ปีที่แล้ว

    Hey Hello, So far your course is amazing!! However I am getting this error when I runserver in 8:51 ..:-
    path("",HomeView.as_view(),name="home"),
    AttributeError: 'function' object has no attribute 'as_view'

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Check your code for typos

    • @slayeroff7798
      @slayeroff7798 4 ปีที่แล้ว

      @@Codemycom Thanks for your quick reply.....I figured it out ...typed "def" instead of "class"..!

  • @MrG88ful
    @MrG88ful 2 ปีที่แล้ว

    Hi, thank you for your fantastic tutorial! How do I get a "next article" and "previous article" link in the detail article page? thank you so much

  • @luffytaro-tg1gm
    @luffytaro-tg1gm ปีที่แล้ว

    Wow this was fun !!

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      Happy to hear it!

  • @sohaibss8073
    @sohaibss8073 4 ปีที่แล้ว

    Can i add a new app in ablog you startapp in ablog and you named it post i want to start a new app in ablog or i need to creat a new folder ?

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      the same terminal command we used to create our app will create another app, then add it to your settings.py file as we did

  • @kushagrachaturvedi2144
    @kushagrachaturvedi2144 2 ปีที่แล้ว

    Templete does not exist at /article/1/, What could be wrong here.

  • @adam8402
    @adam8402 4 ปีที่แล้ว

    Does anyone know if posts like this with Django are picked up by Google with decent SEO or are static pages still king for SEO?

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +1

      Sure, a web page is a web page to google. Static pages have never been king with google. Google like changing fresh content and always has.

    • @adam8402
      @adam8402 4 ปีที่แล้ว

      @@Codemycom glad to hear that, thanks for taking the time to respond

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      @@adam8402 Sure thing

  • @ashwinbalaji4216
    @ashwinbalaji4216 3 ปีที่แล้ว

    how to set author as default with the current user

  • @Kennerdoll
    @Kennerdoll ปีที่แล้ว

    Kindly help me undestand this:
    if i do {{ post.title }} its not working but {{ object.title }} is working

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      What did you do differently from the video?

    • @Kennerdoll
      @Kennerdoll ปีที่แล้ว

      @@Codemycom I honestly have no idea, am trying to figure it out here

  • @gouthamgoutham7640
    @gouthamgoutham7640 4 ปีที่แล้ว

    Why i am not getting detail pages sir ?? It's showing blank page

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Because you did something wrong. I couldn't guess what. Rewatch the videos and try again.

    • @gouthamgoutham7640
      @gouthamgoutham7640 4 ปีที่แล้ว

      @@Codemycom thank's for replying sir and problem is i have created 5 models such as exersice entertainment soon will primary key will get effected sir ???

  • @siddhartht1345
    @siddhartht1345 3 ปีที่แล้ว

    Wonderfull vid John, Can u suggest which material should I have to use to lean django..

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว

      All the django videos on my channel :-p

  • @manpreetkaur-xn4md
    @manpreetkaur-xn4md 2 ปีที่แล้ว

    hello sir, user first name and last name now showing, what's the issue

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      You'l have to rewatch the video and figure out what you did differently than the video.

  • @rad.strums
    @rad.strums 4 ปีที่แล้ว

    Please tell how to add the comment option to the posts too

  • @habiborrahaman4531
    @habiborrahaman4531 3 ปีที่แล้ว

    error : raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
    please help me

  • @lesterramos6837
    @lesterramos6837 4 ปีที่แล้ว

    When i click the link created i have an error named TemplateDoesNotExist at /article/1

  • @rakeshthakur8384
    @rakeshthakur8384 4 ปีที่แล้ว

    It's coming syntax error in theblog.urls at name = article-detail.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Look there for a typo then

  • @rudramunihublimath96
    @rudramunihublimath96 4 ปีที่แล้ว

    nice video.. Please make videos on database read and filter based on few fields. (Reporting) . If possible export it to csv or excel file.

  • @emranhossainrashed3459
    @emranhossainrashed3459 4 ปีที่แล้ว

    please sir reply my comment.
    nice tutorial but i want to ask you one thing and that is in article_details.htm you have used {{post.title}} where you got this post- i mean it's working but i want to know where it come from

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      I named it that in the loop that we write. You can name it anything, I chose post.

  • @ahsinjee2009
    @ahsinjee2009 3 ปีที่แล้ว

    HI i am getting error when i create delete_post.html the error is as fellows
    Page not found (404)
    Request Method: GET
    Request URL: 127.0.0.1:8000/
    Using the URLconf defined in blogApp.urls, Django tried these URL patterns, in this order:
    admin/
    /
    The empty path didn't match any of these.
    You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
    i try to fix but i cant thats why i send you message please if you can fix this issue if you want to repo i will forward you
    Mohammed Javed

  • @rahulagarwal5694
    @rahulagarwal5694 4 ปีที่แล้ว

    getting this error
    'function' object has no attribute '_default_manager'

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      what's the whole error, it usually tells you where in the code the error occurs

    • @rahulagarwal5694
      @rahulagarwal5694 4 ปีที่แล้ว

      never mind problem solved by make a new migration

  • @delphinemiel4417
    @delphinemiel4417 3 ปีที่แล้ว

    Thank you so much for your work. My DetailView doesn't show the details informations. I don't have any error message but my {{ post.title }} doesnt't appear. It is empty in html

    • @mjokce
      @mjokce 3 ปีที่แล้ว

      Same! Did you find a solution ?

    • @ervian1077
      @ervian1077 ปีที่แล้ว

      ​@@mjokceare you already find any solution?

  • @ИгорьКузнецов-т8р
    @ИгорьКузнецов-т8р 4 ปีที่แล้ว

    Hi! Can you explain in one of your next videos how to let user of our blog to add images/pictures to his posts?
    I mean to add pitcures to blog when it will be deployed at server or hosting.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว +2

      That's easy to do locally, not so easy to do with a web host. Many hosts, like heroku, won't let you add images to a database...you need to add them to something like AWS and then reference them from the database.

    • @ИгорьКузнецов-т8р
      @ИгорьКузнецов-т8р 4 ปีที่แล้ว

      @@Codemycom hmm of course it would be more interesting to know how to use AWS🤔

  • @mekkismart7198
    @mekkismart7198 4 ปีที่แล้ว

    Nice tutorial!

  • @ReganMilne
    @ReganMilne 4 ปีที่แล้ว

    Is anyone getting a 404 error with '\templates\the_blog\post_detail.html (Source does not exist)' when following the links from the home page?

    • @ReganMilne
      @ReganMilne 4 ปีที่แล้ว

      Server is running, error persists.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      @@ReganMilne Nope...you have an error in your code somewhere, or you misspelled post_detail.html

    • @ReganMilne
      @ReganMilne 4 ปีที่แล้ว

      @@Codemycom OK I'm re-rewatching. I don't even remember creating a file by that name. thnx for the response btw.

    • @ReganMilne
      @ReganMilne 4 ปีที่แล้ว

      Template-loader postmortem
      Django tried loading these templates, in this order:
      Using engine django:
      django.template.loaders.app_directories.Loader: C:\simpleblog\virt\lib\site-packages\django\contrib\admin\templates\the_blog\post_detail.html (Source does not exist)
      django.template.loaders.app_directories.Loader: C:\simpleblog\virt\lib\site-packages\django\contrib\auth\templates\the_blog\post_detail.html (Source does not exist)
      django.template.loaders.app_directories.Loader: C:\simpleblog\a_blog\the_blog\templates\the_blog\post_detail.html (Source does not exist)

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      @@ReganMilne as I said, you probably misspelled post_detail.html look in your sublime text. see it listed there in the templates directory? Did you misspell it? You misspelled it there, or in your view, or in your urls, or in the link on the navbar.

  • @jhoanmartinezsilva2609
    @jhoanmartinezsilva2609 4 ปีที่แล้ว +1

    If not works post.title or any field try object.title and so on with all the fields

    • @caezar974
      @caezar974 3 ปีที่แล้ว +1

      Thanks!!!

  • @joyhossain1451
    @joyhossain1451 4 ปีที่แล้ว

    I made a blog website that you showed in your videos. Now can I apply for google adsense to this website. Please Reply! I'm your big fan! BTW Thanks a lot dear.

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Yes you can!

  • @habiborrahaman4531
    @habiborrahaman4531 3 ปีที่แล้ว

    not working sir please can you help me ?

  • @snehikaushik5008
    @snehikaushik5008 4 ปีที่แล้ว

    my detailview is not working ... plz help

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      You likely have a typo in your code...check it against the code in the video.

  • @habiborrahaman4531
    @habiborrahaman4531 3 ปีที่แล้ว

    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain) how to solve this issue

  • @maniksharma487
    @maniksharma487 2 ปีที่แล้ว

    i got a error template doesn't exist. can anyone help?

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Make sure your template exists and is in the right place

  • @nabilm791
    @nabilm791 4 ปีที่แล้ว

    >

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      you need a product_detail view in your views.py file...there's a typo or something there

    • @nabilm791
      @nabilm791 4 ปีที่แล้ว

      @@Codemycom this is my vieiew : class ProductDetail(DetailView):
      model=Product
      template_name='product_detail.html'

  • @miraccan00
    @miraccan00 4 ปีที่แล้ว

    can we use slug :)

  • @RamYadav-kl1xk
    @RamYadav-kl1xk 4 ปีที่แล้ว

    My link is not working. I exactly followed the way you were doing

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      You have a typo somewhere

    • @RamYadav-kl1xk
      @RamYadav-kl1xk 4 ปีที่แล้ว

      @@Codemycom didn't get what is typo

  • @hungnguyen606
    @hungnguyen606 4 ปีที่แล้ว

    thank for your tutorial

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Very welcome!

  • @kanharajput5443
    @kanharajput5443 4 ปีที่แล้ว

    you make me to make blog post page.
    Thanks a lot

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Glad to hear that

  • @phronessys
    @phronessys 4 ปีที่แล้ว

    Hi sir, everything works fine, except that i cant use the references like {{post.title}} in article_details.html, it just let me write in and use the buttons. Btw thanks for the vid!

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Must be a typo somewhere in your code

    • @singhshubham765
      @singhshubham765 4 ปีที่แล้ว +4

      use {{ object.title }}

  • @bigsandip
    @bigsandip 4 ปีที่แล้ว

    Nice

  • @heroCode20
    @heroCode20 5 หลายเดือนก่อน

    Thank you for learn

    • @Codemycom
      @Codemycom  5 หลายเดือนก่อน

      My pleasure

  • @andrewhkh23
    @andrewhkh23 3 ปีที่แล้ว

    i Have Error [ Exception Value:
    'for' statements should use the format 'for x in y': for post in object list ]
    Its all Works!!!
    I just forget in ( for post in object list) [ for post in object_list ]

  • @heroCode20
    @heroCode20 5 หลายเดือนก่อน

    ❤❤❤❤❤❤❤❤

    • @Codemycom
      @Codemycom  5 หลายเดือนก่อน

      Thanks

  • @dinindutheekshana2254
    @dinindutheekshana2254 3 ปีที่แล้ว

    Hello sir can I have source code

    • @Codemycom
      @Codemycom  3 ปีที่แล้ว +1

      github.com/flatplanet/djangoblog

    • @dinindutheekshana2254
      @dinindutheekshana2254 3 ปีที่แล้ว

      @@Codemycom thankyou so much sir I use this my other projects as well

  • @sifadrifad4202
    @sifadrifad4202 4 ปีที่แล้ว

    thank you sir

    • @Codemycom
      @Codemycom  4 ปีที่แล้ว

      Thank you for watching!

  • @rachelbakerx5431
    @rachelbakerx5431 4 ปีที่แล้ว

    👏🏼🙌🏼

  • @scipiopersicus1928
    @scipiopersicus1928 2 หลายเดือนก่อน

    👍

  • @nuke4496
    @nuke4496 2 ปีที่แล้ว

    thank you

  • @mlal83
    @mlal83 10 หลายเดือนก่อน

    And I found you after hours of slaving and trying to figure it out myself 😢

    • @Codemycom
      @Codemycom  10 หลายเดือนก่อน

      Ha

    • @mlal83
      @mlal83 10 หลายเดือนก่อน

      @Codemycom dude my codes good and shows up on django but won't show on my website. Any ideas? I've ran the whole cod in chatgpt for spot the mistake and it's saying there's nothing wrong with it

  • @heroCode20
    @heroCode20 5 หลายเดือนก่อน

    ❤❤❤❤❤❤❤❤❤🎉❤❤❤❤❤❤

    • @Codemycom
      @Codemycom  5 หลายเดือนก่อน

      Thanks