Skip to content

Instantly share code, notes, and snippets.

Kalob Taulien KalobTaulien

Block or report user

Report or block KalobTaulien

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
KalobTaulien / button-block.css
Created Oct 4, 2019
Wagtail/Draftail button links
View button-block.css
/* Goes into /static/css/button-block.css */
* Add some spacing to the button-section inside of Draftail.
.Draftail-block--button-block {
padding-top: 25px;
padding-bottom: 15px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
KalobTaulien / blog
Created Apr 23, 2019
Wagtail: Adding author filtering
View blog
# blog/
# Nothing in this class has changed. I just put it here for reference.
class BlogAuthor(models.Model):
"""Blog author for snippets."""
name = models.CharField(max_length=100)
website = models.URLField(blank=True, null=True)
image = models.ForeignKey(
KalobTaulien / dev[dot]py
Created Apr 8, 2019
Enabling the Wagtail Styleguide
View dev[dot]py
# ...
# ...
KalobTaulien / home page models
Created Apr 3, 2019
Typing Text On HomePage with Orderable
View home page models
"""Home page."""
from django.db import models
from modelcluster.fields import ParentalKey
from wagtail.admin.edit_handlers import (
from wagtail.core.models import Orderable, Page
KalobTaulien /
Created Mar 24, 2019
StructBlock StreamField Validation
from django.core.exceptions import ValidationError
from django.forms.utils import ErrorList
from wagtail.core import blocks
class CTABlock(blocks.StructBlock):
"""A simple call to action section."""
button_url = blocks.URLBlock(required=False)
KalobTaulien / paste into your browsers console
Created Mar 20, 2019
Testing your Wagtail V2 API with JavaScript
View paste into your browsers console
.then(res => res.json())
.then(response => console.log(response))
KalobTaulien / staff author_page.html
Created Feb 28, 2019
Getting BlogPostPages by their assigned authors
View staff author_page.html
{% extends 'base.html' %}
{% block content %}
{% for post in posts %}
{{ post.title }}
{% endfor %}
{% endblock %}
KalobTaulien /
Last active Feb 8, 2019
Adding a new Subscribers model to the Wagtail ModelAdmin. Tutorial at:
# ...
# ...
# ...
# ...
View site_settings
from django.db import models
from wagtail.admin.edit_handlers import FieldPanel, MultiFieldPanel
from wagtail.contrib.settings.models import BaseSetting, register_setting
class SocialMediaSettings(BaseSetting):
"""Social media settings for our custom website."""
KalobTaulien / home
Created Feb 6, 2019
This is the code from the lesson where we add an Orderable to the Home Page to create a Bootstrap 4 Carousel.
View home
# home/
from django.db import models
from modelcluster.fields import ParentalKey
from wagtail.admin.edit_handlers import (
You can’t perform that action at this time.