Order Blog Posts By Date - Django Blog #8

  Рет қаралды 23,564

Codemy.com

Codemy.com

Күн бұрын

Пікірлер: 63
@Codemycom
@Codemycom 4 жыл бұрын
▶️ Watch Entire Django Blog Playlist ✅ Subscribe To My KZbin 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
@qbkevo9618
@qbkevo9618 4 жыл бұрын
This playlist, "Create A Simple Django Blog" by Codemy is perfect for anyone who has just started with django and has its basics figured out. It's well paced and introduces new concepts to build on... I'm only 8 video sessions in and I've learnt so much. Thank you @Codemy!
@Codemycom
@Codemycom 4 жыл бұрын
You're very welcome!
@sumukhcprakash5633
@sumukhcprakash5633 3 жыл бұрын
I just started learning Django and i watched several long videos about django in most of them the instructor was not telling why he wrote that code and all. I had started around 4 to5 projects of different videos but was not able to complete anyone because i used to get struck with the question why they were writing that. Then i started your playlist with a lot of doubt but this has been the best course so far. You make these topics look so simple. Thanks sir for these videos. Lots of love : ) .
@grv7437
@grv7437 Жыл бұрын
John!! I can't really thank you enough for making the most amazing series on Django. These ~15min videos are just perfect and contain just the right amount of information to dive in and start creating something. They've helped me so much and have boosted my confidence in web development by an insane amount. It's just too good! Thank you so much again!
@Codemycom
@Codemycom Жыл бұрын
Very welcome!
@musicinsane2156
@musicinsane2156 2 жыл бұрын
Amazing enthusiasm and dedication my guy! Your playlist helped me a lot!
@Codemycom
@Codemycom 2 жыл бұрын
Happy to hear it!
@uzbegimuz3836
@uzbegimuz3836 3 жыл бұрын
The way which you say "insanely cheap" is an insanely crazy :))
@Codemycom
@Codemycom 3 жыл бұрын
Ha!
@sargerpd
@sargerpd 4 жыл бұрын
You my man are a BEAST!
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@ianpring7186
@ianpring7186 4 жыл бұрын
Yep added time field re-migrated..added to both details and home..new post is now at the top. Looks good!
@Codemycom
@Codemycom 4 жыл бұрын
Nice!
@ocurso
@ocurso 4 жыл бұрын
I've really liked the class.
@Codemycom
@Codemycom 4 жыл бұрын
Glad to hear it!
@ryanegbe873
@ryanegbe873 Жыл бұрын
Thank you for this wonderful tutorial. I have a challenge, the date on the article_detail.html is displaying 'None' instead of the date, please, what should I do?
@papan101
@papan101 4 жыл бұрын
Great Videos Sir...Your tutorials are helping a lot..can you make a video on soft delete, please!
@barriesimpson
@barriesimpson Жыл бұрын
Just include -id after the -post_date. ['-post_date', '-id'] and it will sort them it seems. I need to wait until tomorrow to confirm this, but it seems to work.
@losersanonymous6854
@losersanonymous6854 4 жыл бұрын
Hey, How can i display posts of one day in one page? For example- If i have 10 posts in one day. I want to display all the 10 posts in detailed view in one page. Please help?? And also Date wise list means when I click on date it should display all the posts on same date in detailed view instead of list view?
@KodiLearn
@KodiLearn 4 жыл бұрын
I am really liking this course. Can you please make social media site after this Django blog. Please I want to learn that.
@Codemycom
@Codemycom 4 жыл бұрын
Not a bad idea
@vinothv1720
@vinothv1720 4 жыл бұрын
Yep... it'll be useful to me as well...
@nooobgamer01
@nooobgamer01 4 жыл бұрын
sir, you are doing great job 👌👍 ❤❤
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@vukspasojevic2396
@vukspasojevic2396 3 жыл бұрын
Have no clue why we've imported datetime and date in the post model at the beginning. For all blog posts on the same day, they can be sorted by using multiple fields ordering for example ordering = ['-id', 'post-date']
@tdnight8660
@tdnight8660 3 жыл бұрын
i get how to put everything in to order with the class view.. but i do i order the "def CategoryView(request, cats): category_posts = Post.objects.filter(category=cats.replace('-', ' ')) return render(request, 'categories.html', {'cats':cats.title().replace('-', ' '), 'category_posts':category_posts})" plz help :/
@tdnight8660
@tdnight8660 3 жыл бұрын
i used post_date = models.DateField(auto_now_add=True) post_time = models.TimeField(auto_now_add=True) that way u can order the post by time love what your doing here...
@Johnny-tw5pr
@Johnny-tw5pr 3 жыл бұрын
What do you put in the ordering?
@devansheerupabheda9534
@devansheerupabheda9534 4 жыл бұрын
Can user select any post as bookmark or save for later
@plusk343
@plusk343 4 жыл бұрын
Hey, can I use ordering = ['-post_id'] ordering = ['-id'] at the same time?
@soyciro4623
@soyciro4623 3 жыл бұрын
Just tried it. I think you can, I mean it works and that's why "ordering" is either a list or tuple. But have in mind the order of the list will determine what parameter you want to order by at first place.
@TechWithSabri
@TechWithSabri 2 жыл бұрын
Yes you can, but it's better to add your fields you want to order with, inside list example you want to order your posts with: "title", "id", and "date" → in this case, you can order your posts using : ordering = [ "-title", "-id", "-date"] Good luck.
@milliondollarmotivation6260
@milliondollarmotivation6260 4 жыл бұрын
good Job
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@aljon7992
@aljon7992 4 жыл бұрын
Are you planning todo ecommerce website?because a lot of ecommerce tutorial are focusing more frontend than backend
@Codemycom
@Codemycom 4 жыл бұрын
Eventually sure.
@aljon7992
@aljon7992 4 жыл бұрын
@@Codemycom thank you teacher!
@AshrafulIslam-ms1vy
@AshrafulIslam-ms1vy 2 жыл бұрын
my delete button didnt work. When i click on delete button it didnt redirect me on homepage also didnt delete any post from my blog post..whats the problem with that?...i wrote all the things exactly same as video.
@Codemycom
@Codemycom 2 жыл бұрын
No, you didn't write all the things exactly the same as the video.
@robh9184
@robh9184 4 жыл бұрын
cool! I also tried to add the time using Post_date_time = models.DateTimeField(auto_now_add=True) it (unsurprisingly) didnt work.. points for trying? haha thanks for the great tutorials!
@Codemycom
@Codemycom 4 жыл бұрын
Ha!
@fadyghalayiny1920
@fadyghalayiny1920 3 жыл бұрын
@@Codemycom I used post_date = models.DateTimeField(auto_now_add=True) and it worked with timestamp
@شمس-ت1خ
@شمس-ت1خ 2 жыл бұрын
❤❤❤
@Codemycom
@Codemycom 2 жыл бұрын
:-)
@FarhanAhmed1360
@FarhanAhmed1360 3 жыл бұрын
Greate tutorial
@Codemycom
@Codemycom 3 жыл бұрын
Thanks!
@tomiwaibrahim851
@tomiwaibrahim851 4 жыл бұрын
I love this course! I am planning on making an e-commerce app but I do not pictures to be stored on my laptop. Is there any suggestion? I also used DateTimeField and it ordered it to the last second.
@Codemycom
@Codemycom 4 жыл бұрын
Store the images on amazon aws or some other CDN
@tomiwaibrahim851
@tomiwaibrahim851 4 жыл бұрын
@@Codemycom Thank you very much. Wish I could do more than subscribe now.
@Codemycom
@Codemycom 4 жыл бұрын
@@tomiwaibrahim851 :-)
@bijenadhikari
@bijenadhikari 4 жыл бұрын
you are awesome.
@Codemycom
@Codemycom 4 жыл бұрын
Thanks!
@freekeys
@freekeys 4 жыл бұрын
If we put class meta then ordering in models.py file , is it good practice?
@Codemycom
@Codemycom 4 жыл бұрын
Not sure what you're asking
@tripathi5174
@tripathi5174 4 жыл бұрын
sir i want one help , how can we add limit in date field , suppose you want the user to book for a particular service and he can apply for it only for this month or the currently running month . Please help i have done it for day by using default=datetime.date.today()) in the model form but its accepting for any month after that but not in the past You have been helping me from january dealing from mongo db on django, migrations, model forms, on etc etc , please help me on this i am low on time sir.
@ocurso
@ocurso 4 жыл бұрын
Do you have resolved the problem?
@hosseingharsi4497
@hosseingharsi4497 Жыл бұрын
Hello, thank you very much for the very good videos you made, but please strengthen the desktop recorder, even on 1080, it is blurry, but the quality of your image is very good, if you can change the places, because the visibility of the code is important, not you 😁
@Codemycom
@Codemycom Жыл бұрын
Sorry but you're mistaken, toggle the gear icon on the player to 1080 and the video is crystal clear. If it's not on your end, restart your computer and check your connection.
@hosseingharsi4497
@hosseingharsi4497 Жыл бұрын
​@@Codemycom Ok, no problem, thank you very much for the training videos
@sakibshabir1785
@sakibshabir1785 4 жыл бұрын
can we order posts by both date and time
@Codemycom
@Codemycom 4 жыл бұрын
Sure
@coolrezaul
@coolrezaul 4 жыл бұрын
Use models.DateTimeField(auto_now_add=True)
Creating Blog User Logins With Authentication - Django Blog #9
19:14
Add Blog Categories - Django Blog #12
20:10
Codemy.com
Рет қаралды 43 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Create Blog Like Button - Django Blog #18
19:35
Codemy.com
Рет қаралды 54 М.
Delete a Blog Post - Django Blog #7
11:57
Codemy.com
Рет қаралды 25 М.
How To Upload Images With Django - Django Blog #26
17:59
Codemy.com
Рет қаралды 79 М.
Django User Authentication Part 2 - Django Blog #10
13:41
Codemy.com
Рет қаралды 27 М.
How To Add Blog Category Navbar Links - Django Blog #15
20:28
Codemy.com
Рет қаралды 23 М.
How To Restrict Who Can Make Blog Posts - Django Blog #17
14:48
Codemy.com
Рет қаралды 18 М.
Style Django Forms With Bootstrap - Django Blog #5
15:46
Codemy.com
Рет қаралды 128 М.
How To Create an Unlike Blog Button - Django Blog #19
11:41
Codemy.com
Рет қаралды 16 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН