Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mattmcc
Last active January 8, 2016 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattmcc/429d9c49278804724895 to your computer and use it in GitHub Desktop.
Save mattmcc/429d9c49278804724895 to your computer and use it in GitHub Desktop.
{% load sniplates %}
{% load_widgets core="widgets.html" _soft=True %}
{% block content %}
{% include "included_widget.html" %}
{% endblock %}
{% load sniplates %}
{# 1.7+ fails without load_widgets here #}
{# {% load_widgets core="widgets.html" _soft=True %} #}
{% widget "core:alert" text="No boom today. Boom tomorrow." %}
{% extends "base.html" %}
{% load sniplates %}
{% block content %}
{{ block.super }}
{% widget "core:alert" text="There's always a boom tomorrow." %}
{% endblock %}
from django.conf.urls import patterns, include, url
from django.shortcuts import render
urlpatterns = patterns('',
url(r'^$', render, {'template_name': 'page1.html'}),
)
{% block alert %}
<div class="alert">{{ text }}</div>
{% endblock alert %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment