🐞Bug Alert!! The first Comment for a Post doesn't show up!! - In Part 12 I implemented an if statement to hide the tabs on the Post page: kzbin.info/www/bejne/imatl5WVgdCijJIsi=nJfUCHD-hekaBpr2&t=1118 - this does not work together with htmx! I give an explanation and solution here: kzbin.info/www/bejne/onTdqqKefquobKcsi=BJL604HbNfUSpMIE&t=1835.
@yashinshekh802 Жыл бұрын
loved your content. as a django developer i really hate switching to frontend framework. this seemed to be the perfect solution. keep this coming. love from nepal
@ajudmeister Жыл бұрын
Thanks a lot! Yea Django gives you already such a good frontend system with the templates, and if you use htmx you don't need to add an additional highly complex framework on top of it anymore to achieve interactivity.
@enkiimuto1041 Жыл бұрын
You are amazing mate
@TomislavMiletic Жыл бұрын
This approach is great, but can you please explain how does it differ from using context_processors?
@ajudmeister Жыл бұрын
To be honest I haven't worked with context processors yet, but both of those approaches work. Template tags are specific to a template, so in my case I want to show the sidebar only with one specific layout (the a layout), in this case template tags work better in my opinion. Context processors attach data to all the requests, so it's available globally. They make sense when this data is used across multiple templates and views. They also require adding additional settings to the settings.py file, which I want to avoid in order to keep the file focused on the most critical configurations.
@sandamichael1911 ай бұрын
Hi, I love your work here. Can you tell me how you can limit number of posts/comments displayed in the sidebar?
@ajudmeister11 ай бұрын
Hi, just add [:5] to the end of query if you want to display just 5 posts. Full line: top_posts = Post.objects.annotate(num_likes=Count('likes')).filter(num_likes__gt=0).order_by('-num_likes')[:5]
@Armin-q6p Жыл бұрын
First to comment, continue your good work Bro
@ajudmeister Жыл бұрын
Thanks, will do!
@nicenaija9952 Жыл бұрын
Do a tutorial on huey or django-q
@ajudmeister Жыл бұрын
hey, what features on a website would you like to see using this packages?
@nicenaija9952 Жыл бұрын
@@ajudmeister notifications? Checking for top daily updates, news as emails , marketing emails etc
@ajudmeister Жыл бұрын
@@nicenaija9952 Thanks for the suggestions. I might come back to this later.
@icezzzWZ Жыл бұрын
Hey Andreas. I got a question. We made a rule that no authorized users can not comment, right? So there is no need to put in top comments a new if to write no author, isn't there?
@ajudmeister Жыл бұрын
That's right you need to be authenticated to comment, but I put it in for the case that the author deletes his account, in this case the comment will not be delete because in our Comment Model we have on_delete=models.SET_NULL on the author property. So the comment will have no author assigned to it.
@icezzzWZ Жыл бұрын
Perfect! You'd thought in all details. Thanks for the explanation.@@ajudmeister