Wagtail CMS: Routable Page Categories And Years

  Рет қаралды 3,813

Coding For Everybody

Coding For Everybody

5 жыл бұрын

Tutorial: learnwagtail.com/course/routa...
Wagtail for Beginners Course: learnwagtail.com/wagtail-for-...
Let's take a look at how we can filter Wagtail CMS blog posts by their URL using a Routable Page Mixin and a couple of @route's.
Previously we made a Blog Listing Page with the URL of /blog/. In this tutorial we'll add /blog/category/{category_name}/ and filter pages based on the slug in the URL.
For more free tutorials: learnwagtail.com/tutorials/
Don't forget to subscribe to this channel and follow me on Twitter at / kalobtaulien
Git Commit: github.com/CodingForEverybody...
Part 1 of this video: • How to Add Routable Pa...
Learn Wagtail from scratch with the official Wagtail for Beginners Course
learnwagtail.com/wagtail-for-...
Used in this video: Wagtail 2.5.1, Python 3.7, Django 2.2.2
#Wagtail #Django #Python

Пікірлер: 12
@onnot701
@onnot701 5 жыл бұрын
hey thx for making wagtail tutorial. This is realy missing on youtube! Keep posting!
@Zack_MD
@Zack_MD 5 жыл бұрын
You Are Awesome.. Keep it up
@angelosathanasakos3823
@angelosathanasakos3823 5 жыл бұрын
Hi please, can you add a video for internationalization ?
@jesusgonzalez-td8pd
@jesusgonzalez-td8pd 4 жыл бұрын
How do you guys handle backups, passing data from a site to the next and DevOps like Dev, stage and production environment. or transfer content without the overhead of the dumpdata, loaddata on Django or dealing with DBs ???
@CodingForEverybody
@CodingForEverybody 4 жыл бұрын
Without datadump or a database backup (like a pg_dump) I'm not sure there is a way. I guess you could change your production.py settings to constantly swap database connections from a service like AWS RDS. Matt Westcott is working on a really cool solution for this though called Wagtail Transfer. Unfortunately I haven't had a chance to trial this, but it looks very promising github.com/wagtail/wagtail-transfer
@TravellerSam
@TravellerSam 3 жыл бұрын
I'm a little stuck with how to output the current visited category and mark that one as active in the categories' list.
@Peterstavrou
@Peterstavrou Жыл бұрын
I implemented this in my nav today with: {% if item.link_page.url == self.url %}active{% endif %} Hopefully this gives you an idea on how to do it with categories.
@user-xh4jn2er3s
@user-xh4jn2er3s 5 жыл бұрын
How to Make Login Page and User Registration Page
@CodingForEverybody
@CodingForEverybody 5 жыл бұрын
For this you'll probably want to use djangos built in authentication OR you can use a3rd party package called Django Allauth.
@DigitallyProcessed
@DigitallyProcessed 4 жыл бұрын
How can you get count of posts under a category and return the value in template
@CodingForEverybody
@CodingForEverybody 4 жыл бұрын
In your get_context() method, add: total = Post.objects.filter(category__in=['cat-name']).count() and return the `total` variable in your context dictionary. Or in a routable if you're using a custom template with the render() function, put `total` in a dictionary and pass that into the render() function. Source code is available on GitHub for better examples.
@DigitallyProcessed
@DigitallyProcessed 4 жыл бұрын
@@CodingForEverybody Damn... got it! Thanks!
How to Add Routable Pages to your Wagtail CMS Website
24:27
Coding For Everybody
Рет қаралды 12 М.
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 38 МЛН
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
Wagtail CMS: How to Create a Custom Wagtail Menu System
38:22
Coding For Everybody
Рет қаралды 20 М.
How I Built my Blog in Webflow | CMS for Beginners
16:06
Maddy Beard
Рет қаралды 40 М.
Build a FULL Web App With Claude With 2 SCREENSHOTS!
17:36
Riley Brown
Рет қаралды 24 М.
Wagtail CMS Development in the Cloud
13:28
Coding For Everybody
Рет қаралды 1,7 М.
Wagtail Workshop: Start and Deploy a Website In 1 Hour
1:01:44
Coding For Everybody
Рет қаралды 562