Adding Global Site Settings to Your Wagtail CMS Website

  Рет қаралды 10,087

Coding For Everybody

Coding For Everybody

Күн бұрын

Most websites have social media icons in their footer and often several other links and icons that are global across the entire website. In this video we explore how to enable that with Wagtails settings context processor.
Tutorial: learnwagtail.com/tutorials/ad...
Gist: gist.github.com/KalobTaulien/...
GitHub Commit: github.com/CodingForEverybody...
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

Пікірлер: 18
@Abdullah32066
@Abdullah32066 5 жыл бұрын
Thanks for your video and also introducing figlet. It was really cool.
@hariharans9408
@hariharans9408 Жыл бұрын
Thankyou for your wagtail course I am getting more knowledge from your course please make a video for how to render data by using orderables in the settings_register in wagtail for global settings
@pyrrhicbuddha3361
@pyrrhicbuddha3361 4 жыл бұрын
I was hoping to use this to keep my collapsible menu on the state the user left it before going to the next page, but it seems like it wasn't the right tool. How can I go through the pages and know that when the user left the last page he had the menu on expand instead of collapsed? Your content is the only one available around teaching this stuff, and Wagtail seems exactly what I need to create my system. Great Work!
@CodingForEverybody
@CodingForEverybody 4 жыл бұрын
You can check if the page "is not the main page" and add a CSS class to keep your menu opened. Or you can use a Django session (not recommended for this feature). Or you can use localStorage with JavaScript (recommended).
@samuelwagner9228
@samuelwagner9228 3 жыл бұрын
Is there any recommended way to go about exposing global settings via the API for a headless wagtail set-up? For example if I'm looking to allow the user to edit the site title or tagline in settings, then grab it via an API call for a header?
@davepascual39
@davepascual39 2 жыл бұрын
Hello, I've been watching your Wagtail series now in 2022. It is really a good reference. By the way, I would like to ask if it is possible to use an Orderable model class in Settings? Thanks.
@hariharans9408
@hariharans9408 Жыл бұрын
Hii have you created the model using orderables for global settings in settings, I created orderable model and I am struggling in rendering data, if you created and working fine means, please help me to render data
@ashishpitroda7468
@ashishpitroda7468 2 жыл бұрын
Hi! there is question regarding setting model how can we access this setting value in page / models.py / custom_tags / views or in some function that we can call from anywhere with template or without template to get settings value.
@royanezp
@royanezp Жыл бұрын
How expensive is implementing these social icons with context processors? I wonder in which case one should think about doing something using context processors or using a different way
@SuperSam881
@SuperSam881 3 жыл бұрын
Your admin (Social Media Settings) shows "link" icons inside of the input box. (time 10:33 in the video) Mine is not. Is this a change in the version that I'm running or something else?
@Kaffeslide
@Kaffeslide 4 жыл бұрын
I do not get the difference between using "{{ page.whatever}}" and "{{ self.whatever }}". Especially when using both in the same template. I do see that "self." is used for StreamField and Orderable. However - what is going on behind the scenes? Why can't I reference both of them using "page."? I would really appreciate some clarification :-) By the way: Great videos - thank so so much for the effort, I love it!
@CodingForEverybody
@CodingForEverybody 4 жыл бұрын
In a regular page template (like home_page.html) you can use self. and page. the same way, they are exactly the same. In your StreamField templates there is no "page" per se, it's more like an included file. Because we're using OOP Python (classes) the {{ self.something }} always refers to its main class. So {{ self.title }} in a StreamField template would be asking for the title field from the StreamField class; whereas in home_page.html {{ self.title }} is the same as {{ page.title }}, and that's coming from `class HomePage(Page)`. If it makes it easier, you can use {{ page.something }} for all your page related fields, and use {{ self.something }} for all your StreamFields, that tends to make it easier to work with.
@networksocial6072
@networksocial6072 4 жыл бұрын
Why sometimes you use `content_panels` and now using `panels`? What are the difference and when use what?
@CodingForEverybody
@CodingForEverybody 4 жыл бұрын
Content panels are used for pages. There are different types of panels when editing a page, like the promote panel (aka promote tab). By default theres only the one kind of panel on other objects, like snippets. So we just call everything else "panels"
@ArjitRaj
@ArjitRaj 4 жыл бұрын
The css code for font awesome is not available. Only script code is there.
@illuminaut9148
@illuminaut9148 4 жыл бұрын
Just download the css and webfonts to your static, and from there {% static 'css/anycss.css' %}
@rashidmigadde8618
@rashidmigadde8618 Жыл бұрын
I have tried to add the Logo Setting to the global settings but the image is not showing
How to Add a Basic StreamField to your Wagtail CMS Page
19:34
Coding For Everybody
Рет қаралды 26 М.
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 519 М.
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 47 МЛН
Wagtailify Your Static Website: Global Social Media Settings
10:14
Coding For Everybody
Рет қаралды 202
How to use Orderables in Wagtail CMS
22:42
Coding For Everybody
Рет қаралды 14 М.
Adding User Registration/Login To Your Wagtail Website
23:03
Coding For Everybody
Рет қаралды 15 М.
Wagtail CMS: Adding a banner and banner fields
15:15
Coding For Everybody
Рет қаралды 27 М.
How to Deploy Wagtail using Heroku (Wagtail 2.5.1; Django 2.2.1; Python 3.6.8)
24:58
Registering Django Models with Wagtails ModelAdmin
12:17
Coding For Everybody
Рет қаралды 12 М.
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 М.
Jake Howard - Wagtail and Caching
20:41
Wagtail Space
Рет қаралды 90
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 519 М.