Build A Blog Comment Section - Django Blog #33

Build A Blog Comment Section - Django Blog #33

Codemy.com

4 года назад

47,524 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Sergio Cannobbio
Sergio Cannobbio - 12.07.2023 16:46

I've tried MPTT but it's extremely cumbersome :(

Ответить
Sergio Cannobbio
Sergio Cannobbio - 12.07.2023 16:46

Dear professor, firstly I congratulate you for the clarity and effectiveness of your videos... my favorites! Secondly, I would like to ask you or request your help to program an app that allows me to budget with chapters, subchapters, subsubchapters and cost items. Thanks since now.

Ответить
James Arthur
James Arthur - 25.04.2023 14:40

Love your videos

Ответить
James Arthur
James Arthur - 25.04.2023 14:39

Good content

Ответить
elvin 29
elvin 29 - 31.01.2023 01:57

1. Settings: taggit
pip install django-taggit


2.Models:
from taggit.managers import TaggableManager

class Post():
tags = TaggableManager()

makemigrations
migrate



3.Url:
import post_list

path('tag/<slug:tag_slug>/',tag, name='tag'),



4.Views
from django.shortcuts import render , redirect , get_object_or_404
from taggit.models import Tag





def tag(request, tag_slug=None):

# post tag
tag = None
if tag_slug:
tag = get_object_or_404(Tag, slug=tag_slug)
posts = Post.objects.filter(tags__in=[tag])
context = {
"posts" :posts,
"tag" : tag
}

return render(request,'post_list.html',context)


5. Post.html

<p>
<strong>Tags:</strong>
{% for tag in post.tags.all %}
<a href="{% url 'tag' tag.slug %}" style="background-color : white;">
{{tag.name}}
</a>
<!-- {% if not forloop.last %}, {% endif %} -->
{% endfor %}
</p>

Ответить
Mansur Orazkhan
Mansur Orazkhan - 11.01.2023 13:19

мой ник (забивной мансур228)

Ответить
Mansur Orazkhan
Mansur Orazkhan - 11.01.2023 13:18

заходи в бравл старс лысый размажу

Ответить
Bibi Arezo Halimi
Bibi Arezo Halimi - 25.04.2022 14:46

we need your github source codes

Ответить
Stephen Darcy
Stephen Darcy - 23.04.2022 17:05

Hi John, I rarely comment on any videos but man this was brilliant. I have really struggled with Django but you have really demystified the whole thing. Thank you.

Ответить
Asma Saad
Asma Saad - 20.03.2022 11:41

How can we ordered comments based on the date ?

Ответить
dancetechtv
dancetechtv - 02.12.2021 19:09

Hello, love you videos...I am implementing the comments but the form does not fetch the data. I can see the form, put does not send data.

Ответить
dealeras21
dealeras21 - 20.10.2021 16:36

that course is perfect
easiest 50$ I ever spent

Ответить
Pranav Bakare
Pranav Bakare - 16.09.2021 14:56

Seriously amazing small small points explaining in simple manner keep sharing!!!!!

Ответить
Anas Buhayh
Anas Buhayh - 15.09.2021 17:50

Thank you so much for this series! can you please make a video of how to add last updated field?

Ответить
Prashant Jaiswal
Prashant Jaiswal - 01.08.2021 14:01

Very Nice Tutorial. Only Difficulty do you provide this code some where , because when some one access this playlist from the middle he needs to compare the differences like imports variables, but logic wise its provide all. if possible please provide code somewhere

Ответить
Praveen Kumar
Praveen Kumar - 25.07.2021 18:34

Initially, I thought I was playing the video at 2x speed. LOL!

Ответить
yash jagtap
yash jagtap - 07.07.2021 12:43

nice video

Ответить
Imran Khan
Imran Khan - 14.06.2021 08:10

Awesome tutorial!! Please make a tutorial about download a file from Django.

Ответить
Farhan Ahmed
Farhan Ahmed - 04.06.2021 02:07

How to use comment form in details view instead of use different view????

Ответить
mohammad mansouri
mohammad mansouri - 16.04.2021 17:19

very good ❤
please teach us how to create follower and following system

Ответить
Emma Macaluso
Emma Macaluso - 24.02.2021 23:03

SO helpful!

Ответить
ANDRI WAHYU ANUGRAH TI A
ANDRI WAHYU ANUGRAH TI A - 20.02.2021 11:27

realtime coments ??

Ответить
ANDRI WAHYU ANUGRAH TI A
ANDRI WAHYU ANUGRAH TI A - 20.02.2021 11:25

good jobs broo

Ответить
Darshan Tank
Darshan Tank - 30.01.2021 11:15

your video forces me to subscribe :)

Ответить
Howdi Dowdi
Howdi Dowdi - 27.12.2020 00:35

would you add a comment reply function? Thanks!

Ответить
Dejan Jovanovic
Dejan Jovanovic - 25.12.2020 20:24

Will you continue with comments?

Ответить
Greetings Gentlemen.
Greetings Gentlemen. - 18.12.2020 04:15

Hi! I'm having trouble getting the information to show up on screen. The admin center shows everything is fine but its just not coming up on the screen I redid this many times. Is this with the detailview or something else? if it isn't could you tell me how to get it to work very simply with detailview? Thanks!

Ответить
Sachin Tharuka 61
Sachin Tharuka 61 - 01.12.2020 09:49

Explained well!

Ответить
Shawn Beans
Shawn Beans - 30.11.2020 15:49

i like comments

Ответить
Michael Scarn
Michael Scarn - 25.11.2020 14:00

how about including author of comment in comment model

Ответить
Dhruv Bhatia
Dhruv Bhatia - 24.11.2020 16:11

can this be applicable for all the blogs on our website??

Ответить
Akshay Thakur
Akshay Thakur - 26.10.2020 15:58

Hi, can you please help, I'm building a website, and used the same code to add comments, the comments are being going to database but not reflecting on the site.

Ответить
Reksmey Ok
Reksmey Ok - 24.09.2020 16:41

Thank you so much.

Ответить
Neeraj Lamsal
Neeraj Lamsal - 23.09.2020 15:58

this guy is just awsome he has every video i need

Ответить
Bernard Matwai
Bernard Matwai - 17.09.2020 16:49

Can You please also do a video on generic Content_Type with comments

Ответить
Luca
Luca - 14.09.2020 20:33

Great tutorial, as always!
And please, make more videos about comments (replying, liking them etc.), they would be extremely helpful.

Ответить
Vlad
Vlad - 14.09.2020 19:46

Thanks man. I'm building a social media and this is the most important feature we were missing :)

Ответить
~ Thanatos ~
~ Thanatos ~ - 13.09.2020 19:50

I was struggling with this matter for a few hours and almost going mad (beginner struggles, heh) and you just saved me now. Thanks man! Subbed you!

Ответить
shezi khan
shezi khan - 08.09.2020 21:15

I did it with foreign key and also add reply system..

Ответить