Wagtail CMS: Adding a banner and banner fields

  Рет қаралды 27,297

Coding For Everybody

Coding For Everybody

5 жыл бұрын

Every modern website has a banner. Often it comes with a title, subtitle, an image and an optional call to action button. In this tutorial we're going to add all 4 of those to our Home Page. Includes: Wagtail Images, ForeignKeys, ImageChooserPanel, PageChooserPanel and installing Bootstrap 4 as the frontend framework.
Full code for this (including code for part 2) can be found here:
learnwagtail.com/tutorials/ad...
Learn Wagtail from scratch with the official Wagtail for Beginners Course
learnwagtail.com/wagtail-for-...
Used in this video: Wagtail 2.4, Python 3.7, Django 2.1.5 #Wagtail #Django #Python

Пікірлер: 30
@CodingForEverybody
@CodingForEverybody 5 жыл бұрын
For more videos like this, check out learnwagtail.com and the entire KZbin playlist at wagtail.io/course
@23TrevorE
@23TrevorE 5 жыл бұрын
This series is really excellent and especially welcome as there are so few good learning resources for Wagtail at the moment. Thank you so much for all the effort you've put into this, you're a very good teacher.
@oussamaladhari550
@oussamaladhari550 5 жыл бұрын
Great Tutorial, thank you very much for all your efforts and detailed explanation
@CodingForEverybody
@CodingForEverybody 5 жыл бұрын
Glad you're enjoying the videos!! :)
@ShaffleOne
@ShaffleOne 4 жыл бұрын
Damn wagtail is a cool thing! I love ittttt!
@ShaffleOne
@ShaffleOne 4 жыл бұрын
why did this video got 300 less likes than previous one?((( I love this tuts.
@renshengbaitai
@renshengbaitai 5 жыл бұрын
it is very good ,i like it ,just let you know someone like your video.
@CodingForEverybody
@CodingForEverybody 5 жыл бұрын
Thanks, I'm happy to hear you're enjoying the Wagtail series!
@bambanx
@bambanx 4 жыл бұрын
Hello folks how i can add a custom css class to each paragraph added on a richtextfield ? my model looks like : texto_central = RichTextField(features=["bold", "italic"]) and in the template i want it take the p-nosotros css class, template is some like this : {{self.texto_central|richtext}} thanks you
@asadullashaikh4977
@asadullashaikh4977 2 жыл бұрын
you are awesome, can plz create one video on wagtail backend with react frontend
@erikfrits6553
@erikfrits6553 3 жыл бұрын
Hi, I have decided to watch your whole series for second time to understand it better you are really good at tutorials! How do you get description of wagtail functions? e.g. in 3:27 There is a pop-up window with explanation for ForeignKey, its attributes and doc strings... I am on PyCharm, but if its easier to make it work in Atom then I might even switch to it. Thanks
@CodingForEverybody
@CodingForEverybody 3 жыл бұрын
Im using VS Code. PyCharm probably supports venv's - which is what Im using in these videos and thats what VS Code picks up on.
@MatHEWStorm
@MatHEWStorm Жыл бұрын
did ImageChooserPanel get removed? I can't find any information about it on the docs or on google, and I can't import it at all, I wonder if something replaced it in a newer version?? edit: it looks like a normal FieldPanel works for images.
@itsRemco
@itsRemco Жыл бұрын
Thanks for your edit!
@keretlen
@keretlen 2 ай бұрын
I found a solution for this, check my comment
@georgeye2759
@georgeye2759 3 жыл бұрын
Really helpful video. At 12:24, you had the option of "clear choice". I seem to have the other two buttons but not this one. Is this just because we are using different versions?
@georgeye2759
@georgeye2759 3 жыл бұрын
Wait sorry, I didn't allow "blank" for the foreign key. Thanks!
@sfnshd
@sfnshd 11 ай бұрын
Hi, I was just going through these tutorials and I noticed in my IDE that I couldn’t import the ImageChoosePanel. Could it be that it is not available in the latest version of wagtail? If so how can you go around this?
@keretlen
@keretlen 2 ай бұрын
I found a solution for this, check my comment
@djoudibenarfa
@djoudibenarfa Жыл бұрын
In the template 'self' is not working I my template is not showing anything, can you help me please?
@blabla-kk8bl
@blabla-kk8bl 3 жыл бұрын
What is the name of this theme?
@douglasalves1155
@douglasalves1155 4 жыл бұрын
At 8:05 when I run "python3 manage.py makemigrations" the console returns "No changes detected", someone help?Thanks :)
@CodingForEverybody
@CodingForEverybody 4 жыл бұрын
Have you changed any of your models? You need to have edited one of the model fields, removed a model field, or created a new model field.
@douglasalves1155
@douglasalves1155 4 жыл бұрын
@@CodingForEverybody I have created a new model field, I'm newbie in Django/Wagtail, thx a lot!!
@CodingForEverybody
@CodingForEverybody 4 жыл бұрын
@@douglasalves1155 Is the new model in a django app that's listed in your INSTALLED_APPS?
@douglasalves1155
@douglasalves1155 4 жыл бұрын
@@CodingForEverybody yes, I already remove these wrong model from project, and It works fine! I think I ran a wrong command, which caused the problem. Thx :)
@keretlen
@keretlen 2 ай бұрын
Unfortunately the ImageChoosePanel has been removed from Wagtail. Using the 6.1 version of it, the following solution is the nearest what I could have: 1.: use InlinePanel('banner_image', label="Banner image", max_num=1), in content_panels instead of the ImageChoosePanel 2.: create a new class after the HomePage class like this: class HomePageBannerImage(Orderable): page = ParentalKey(HomePage, on_delete=models.CASCADE, related_name='banner_image') image = models.ForeignKey('wagtailimages.Image', on_delete=models.CASCADE, related_name='+') caption = models.CharField(blank=True, max_length=250) panels = [ FieldPanel('image'), FieldPanel('caption'), ] 3.: delete the banner_image from the HomePage class 4.: you changed your model, so don't forget to makemigrations and migrate.
How to Add a Basic StreamField to your Wagtail CMS Page
19:34
Coding For Everybody
Рет қаралды 26 М.
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 71 МЛН
One moment can change your life ✨🔄
00:32
A4
Рет қаралды 33 МЛН
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32
How to Use ListBlocks in Wagtail CMS to Create Repeating StreamField Content
19:52
Installing Django Debug Toolbar with Wagtail CMS
13:33
Coding For Everybody
Рет қаралды 17 М.
PhD AI student explains how China already have won in AI..
13:28
livinlavidaluke
Рет қаралды 61 М.
My opinion on Angular 18 & React 19
9:47
Maximilian Schwarzmüller
Рет қаралды 52 М.
Google Data Center 360° Tour
8:29
Google Cloud Tech
Рет қаралды 5 МЛН
What happened to Bluelearn? Final Thoughts
9:04
Curious Harish
Рет қаралды 74 М.