[Python-modules-commits] [django-sitetree] 01/03: Import django-sitetree_1.8.0.orig.tar.gz

Michael Fladischer fladi at moszumanska.debian.org
Thu Jul 13 13:37:12 UTC 2017


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch experimental
in repository django-sitetree.

commit be2c6b52a94c90b2ab3745d50bf733f81d89efda
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Fri May 12 18:50:06 2017 +0200

    Import django-sitetree_1.8.0.orig.tar.gz
---
 .travis.yml                                    |   7 ++
 AUTHORS                                        |   1 +
 CHANGELOG                                      |   6 ++
 demo/README.rst                                |  25 +++++++
 demo/db.sqlite3                                | Bin 0 -> 225280 bytes
 demo/demo/__init__.py                          |   0
 demo/demo/admin.py                             |  28 +++++++
 demo/demo/apps.py                              |   9 +++
 demo/demo/middleware.py                        |  30 ++++++++
 demo/demo/migrations/0001_initial.py           |  25 +++++++
 demo/demo/migrations/__init__.py               |   0
 demo/demo/models.py                            |  31 ++++++++
 demo/demo/sitetrees.py                         |  14 ++++
 demo/demo/static/bootstrap/bootstrap.min.css   |   9 +++
 demo/demo/static/bootstrap/bootstrap.min.js    |   6 ++
 demo/demo/static/bootstrap3/bootstrap.min.css  |   6 ++
 demo/demo/static/bootstrap3/bootstrap.min.js   |   7 ++
 demo/demo/static/foundation/app.js             |  38 ++++++++++
 demo/demo/static/foundation/foundation.min.css |   1 +
 demo/demo/static/foundation/foundation.min.js  |  98 +++++++++++++++++++++++++
 demo/demo/static/jquery-1.12.4.min.js          |   5 ++
 demo/demo/static/semantic/semantic.min.css     |  29 ++++++++
 demo/demo/static/semantic/semantic.min.js      |  15 ++++
 demo/demo/templates/_base.html                 |  33 +++++++++
 demo/demo/templates/_head_bootstrap.html       |   4 +
 demo/demo/templates/_head_bootstrap3.html      |   4 +
 demo/demo/templates/_head_foundation.html      |   6 ++
 demo/demo/templates/_head_none.html            |   8 ++
 demo/demo/templates/_head_semantic.html        |   8 ++
 demo/demo/templates/_listing_contents.html     |  19 +++++
 demo/demo/templates/demo_nav.html              |   6 ++
 demo/demo/templates/index.html                 |   6 ++
 demo/demo/templates/listing.html               |   9 +++
 demo/demo/templates/listing_bootstrap.html     |  22 ++++++
 demo/demo/templates/listing_bootstrap3.html    |  26 +++++++
 demo/demo/templates/listing_foundation.html    |  24 ++++++
 demo/demo/templates/listing_none.html          |  15 ++++
 demo/demo/templates/listing_semantic.html      |  18 +++++
 demo/demo/urls.py                              |  10 +++
 demo/demo/utils.py                             |  10 +++
 demo/demo/views.py                             |  24 ++++++
 demo/manage.py                                 |  28 +++++++
 demo/settings/__init__.py                      |   0
 demo/settings/settings.py                      |  79 ++++++++++++++++++++
 demo/settings/urls.py                          |   9 +++
 demo/settings/wsgi.py                          |  16 ++++
 docs/source/i18n.rst                           |   4 +-
 docs/source/tags.rst                           |  12 +++
 setup.py                                       |   1 +
 sitetree/__init__.py                           |   2 +-
 sitetree/sitetreeapp.py                        |   5 +-
 sitetree/templatetags/sitetree.py              |   4 +-
 sitetree/tests/conftest.py                     |  24 ++++--
 sitetree/tests/test_templatetags.py            |  20 +++++
 tox.ini                                        |   5 +-
 55 files changed, 837 insertions(+), 14 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 751e85a..59d8238 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,14 @@
 language: python
 
 python:
+  - 3.6
   - 3.5
   - 3.4
   - 3.3
   - 2.7
 
 env:
+  - DJANGO="Django>=1.11,<1.12"
   - DJANGO="Django>=1.10,<1.11"
   - DJANGO="Django>=1.9,<1.10"
   - DJANGO="Django>=1.8.6,<1.9"
@@ -20,10 +22,15 @@ script: coverage run -a --source=sitetree setup.py test
 matrix:
 
   exclude:
+   - python: 3.6
+     env: DJANGO="Django>=1.7,<1.8"
+
    - python: 3.5
      env: DJANGO="Django>=1.7,<1.8"
 
    - python: 3.3
+     env: DJANGO="Django>=1.11,<1.12"
+   - python: 3.3
      env: DJANGO="Django>=1.10,<1.11"
    - python: 3.3
      env: DJANGO="Django>=1.9,<1.10"
diff --git a/AUTHORS b/AUTHORS
index 2852226..eefafda 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -37,6 +37,7 @@ Vitaliy Ivanov <https://github.com/vit-ivanov>
 Sergey Maranchuk <https://github.com/slav0nic>
 Martey Dodoo <https://github.com/martey>
 Michał Suszko <https://github.com/msuszko>
+Piter Vergara <https://github.com/pitervergara>
 
 
 Translators
diff --git a/CHANGELOG b/CHANGELOG
index 96f4ea1..0c2b07b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,12 @@ django-sitetree changelog
 =========================
 
 
+v1.8.0
+------
++ IMPORTANT: i18n trees now support full lang names (e.g. de-ch, pt-br), update your i18n trees aliases.
++ Django 1.11 compatibility improvements.
+
+
 v1.7.0
 ------
 * IMPORTANT: Caching reworked.
diff --git a/demo/README.rst b/demo/README.rst
new file mode 100644
index 0000000..de8ff3b
--- /dev/null
+++ b/demo/README.rst
@@ -0,0 +1,25 @@
+django-sitetree demo
+====================
+http://github.com/idlesign/django-sitetree
+
+
+This Django project demonstrates sitetree basic features and bundled templates.
+
+Expects Django 1.11+
+
+
+How to run
+----------
+
+1. From sitetree root sources directory:
+
+    .. code:: bash
+
+        $ demo/manage.py runserver
+
+2. Go to http://localhost:8000
+
+3. Admin (http://localhost:8000/admin/) credentials:
+
+    Login: `demo`
+    Password: `demodemo`
diff --git a/demo/db.sqlite3 b/demo/db.sqlite3
new file mode 100644
index 0000000..7764a03
Binary files /dev/null and b/demo/db.sqlite3 differ
diff --git a/demo/demo/__init__.py b/demo/demo/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/demo/demo/admin.py b/demo/demo/admin.py
new file mode 100644
index 0000000..23af1f7
--- /dev/null
+++ b/demo/demo/admin.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.contrib import admin
+
+from .models import Article
+
+
+admin.site.register(Article)
+
+
+customized_sitetree_admin = False
+
+if customized_sitetree_admin:
+
+    from sitetree.admin import TreeItemAdmin, TreeAdmin, override_tree_admin, override_item_admin
+
+    class CustomTreeItemAdmin(TreeItemAdmin):
+
+        fieldsets = None
+
+
+    class CustomTreeAdmin(TreeAdmin):
+
+        exclude = ('title',)
+
+    override_item_admin(CustomTreeItemAdmin)
+    override_tree_admin(CustomTreeAdmin)
diff --git a/demo/demo/apps.py b/demo/demo/apps.py
new file mode 100644
index 0000000..d5ae783
--- /dev/null
+++ b/demo/demo/apps.py
@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.apps import AppConfig
+
+
+class DemoConfig(AppConfig):
+
+    name = 'demo'
diff --git a/demo/demo/middleware.py b/demo/demo/middleware.py
new file mode 100644
index 0000000..1b046cd
--- /dev/null
+++ b/demo/demo/middleware.py
@@ -0,0 +1,30 @@
+from django.utils.translation import activate
+
+
+def language_activator(get_response):
+
+    def middleware(request):
+
+        lang = request.GET.get('lang', 'en')
+        activate(lang)
+
+        request.lang = lang
+
+        return get_response(request)
+
+    return middleware
+
+
+def theme_activator(get_response):
+
+    def middleware(request):
+
+        theme = request.GET.get('theme', 'none')
+        if theme:
+            theme = '_' + theme
+
+        request.theme = theme
+
+        return get_response(request)
+
+    return middleware
diff --git a/demo/demo/migrations/0001_initial.py b/demo/demo/migrations/0001_initial.py
new file mode 100644
index 0000000..f677203
--- /dev/null
+++ b/demo/demo/migrations/0001_initial.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11 on 2017-04-08 09:47
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    initial = True
+
+    dependencies = [
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Article',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('date_created', models.DateTimeField(auto_created=True, verbose_name='Created')),
+                ('title', models.CharField(max_length=200, verbose_name='Title')),
+                ('contents', models.TextField(verbose_name='Contents')),
+            ],
+        ),
+    ]
diff --git a/demo/demo/migrations/__init__.py b/demo/demo/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/demo/demo/models.py b/demo/demo/models.py
new file mode 100644
index 0000000..9009c2f
--- /dev/null
+++ b/demo/demo/models.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models
+
+
+class Article(models.Model):
+
+    title = models.CharField('Title', max_length=200, blank=False)
+    date_created = models.DateTimeField('Created', auto_created=True)
+    contents = models.TextField('Contents')
+
+    def __str__(self):
+        return self.title
+
+
+customized_sitetree_models = False
+
+if customized_sitetree_models:
+
+    from sitetree.models import TreeItemBase, TreeBase
+
+
+    class MyTree(TreeBase):
+
+        custom_field = models.CharField('Custom tree field', max_length=50, null=True, blank=True)
+
+
+    class MyTreeItem(TreeItemBase):
+
+        custom_field = models.IntegerField('Custom item field', default=42)
diff --git a/demo/demo/sitetrees.py b/demo/demo/sitetrees.py
new file mode 100644
index 0000000..b7c0c9e
--- /dev/null
+++ b/demo/demo/sitetrees.py
@@ -0,0 +1,14 @@
+from sitetree.utils import tree, item
+
+
+sitetrees = (
+    tree('books', items=[
+        item('Books', '/books/', url_as_pattern=False, children=[
+            item('{{ book.title }}', 'books-details', in_menu=False, in_sitetree=False),
+            item('Add a book', 'books-add'),
+        ])
+    ]),
+    tree('other', items=[
+        item('Item', '/item/', url_as_pattern=False, access_guest=False)
+    ]),
+)
diff --git a/demo/demo/static/bootstrap/bootstrap.min.css b/demo/demo/static/bootstrap/bootstrap.min.css
new file mode 100644
index 0000000..b74b454
--- /dev/null
+++ b/demo/demo/static/bootstrap/bootstrap.min.css
@@ -0,0 +1,9 @@
+/*!
+ * Bootstrap v2.0.4
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:- [...]
diff --git a/demo/demo/static/bootstrap/bootstrap.min.js b/demo/demo/static/bootstrap/bootstrap.min.js
new file mode 100644
index 0000000..1435698
--- /dev/null
+++ b/demo/demo/static/bootstrap/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+* Bootstrap.js by @fat & @mdo
+* Copyright 2012 Twitter, Inc.
+* http://www.apache.org/licenses/LICENSE-2.0.txt
+*/
+!function(a){a(function(){"use strict",a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.proto [...]
\ No newline at end of file
diff --git a/demo/demo/static/bootstrap3/bootstrap.min.css b/demo/demo/static/bootstrap3/bootstrap.min.css
new file mode 100644
index 0000000..ed3905e
--- /dev/null
+++ b/demo/demo/static/bootstrap3/bootstrap.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr [...]
+/*# sourceMappingURL=bootstrap.min.css.map */
\ No newline at end of file
diff --git a/demo/demo/static/bootstrap3/bootstrap.min.js b/demo/demo/static/bootstrap3/bootstrap.min.js
new file mode 100644
index 0000000..9bcd2fc
--- /dev/null
+++ b/demo/demo/static/bootstrap3/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under the MIT license
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:" [...]
+this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return  [...]
\ No newline at end of file
diff --git a/demo/demo/static/foundation/app.js b/demo/demo/static/foundation/app.js
new file mode 100644
index 0000000..323d364
--- /dev/null
+++ b/demo/demo/static/foundation/app.js
@@ -0,0 +1,38 @@
+;(function ($, window, undefined) {
+  'use strict';
+
+  var $doc = $(document),
+      Modernizr = window.Modernizr;
+
+  $(document).ready(function() {
+    $.fn.foundationAlerts           ? $doc.foundationAlerts() : null;
+    $.fn.foundationButtons          ? $doc.foundationButtons() : null;
+    $.fn.foundationAccordion        ? $doc.foundationAccordion() : null;
+    $.fn.foundationNavigation       ? $doc.foundationNavigation() : null;
+    $.fn.foundationTopBar           ? $doc.foundationTopBar() : null;
+    $.fn.foundationCustomForms      ? $doc.foundationCustomForms() : null;
+    $.fn.foundationMediaQueryViewer ? $doc.foundationMediaQueryViewer() : null;
+    $.fn.foundationTabs             ? $doc.foundationTabs({callback : $.foundation.customForms.appendCustomMarkup}) : null;
+    $.fn.foundationTooltips         ? $doc.foundationTooltips() : null;
+    $.fn.foundationMagellan         ? $doc.foundationMagellan() : null;
+    $.fn.foundationClearing         ? $doc.foundationClearing() : null;
+
+    $.fn.placeholder                ? $('input, textarea').placeholder() : null;
+  });
+
+  // UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE8 SUPPORT AND ARE USING .block-grids
+  // $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'both'});
+  // $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'both'});
+  // $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'both'});
+  // $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'both'});
+
+  // Hide address bar on mobile devices (except if #hash present, so we don't mess up deep linking).
+  if (Modernizr.touch && !window.location.hash) {
+    $(window).load(function () {
+      setTimeout(function () {
+        window.scrollTo(0, 1);
+      }, 0);
+    });
+  }
+
+})(jQuery, this);
diff --git a/demo/demo/static/foundation/foundation.min.css b/demo/demo/static/foundation/foundation.min.css
new file mode 100644
index 0000000..5744060
--- /dev/null
+++ b/demo/demo/static/foundation/foundation.min.css
@@ -0,0 +1 @@
+*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%}body{background:#fff;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-weight:normal;font-style:normal;font-size:14px;line-height:1;color:#222;position:relative;-webkit-font-smoothing:antialiased}a img{border:none}a{color:#2ba6cb;text-decoration:none;line-height:inherit}a:hover{color:#2795b6}a:focus{color:#2795b6}p a,p a:visited{line-height:inherit [...]
diff --git a/demo/demo/static/foundation/foundation.min.js b/demo/demo/static/foundation/foundation.min.js
new file mode 100644
index 0000000..ff1ee4b
--- /dev/null
+++ b/demo/demo/static/foundation/foundation.min.js
@@ -0,0 +1,98 @@
+/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
+ * Build: http://modernizr.com/download/#-inlinesvg-svg-svgclippaths-touch-shiv-mq-cssclasses-teststyles-prefixes-ie8compat-load
+ */
+window.Modernizr=function(e,t,n){function r(e){d.cssText=e}function i(e,t){return r(g.join(e+";")+(t||""))}function s(e,t){return typeof e===t}function o(e,t){return!!~(""+e).indexOf(t)}function u(e,t,r){for(var i in e){var o=t[e[i]];if(o!==n)return r===!1?e[i]:s(o,"function")?o.bind(r||t):o}return!1}var a="2.6.2",f={},l=!0,c=t.documentElement,h="modernizr",p=t.createElement(h),d=p.style,v,m={}.toString,g=" -webkit- -moz- -o- -ms- ".split(" "),y={svg:"http://www.w3.org/2000/svg"},b={},w= [...]
+/*!
+ * jQuery JavaScript Library v1.9.0
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-1-14
+ */
+(function(e,t){"use strict";function _(e){var t=e.length,n=y.type(e);return y.isWindow(e)?!1:e.nodeType===1&&t?!0:n==="array"||n!=="function"&&(t===0||typeof t=="number"&&t>0&&t-1 in e)}function P(e){var t=D[e]={};return y.each(e.match(w)||[],function(e,n){t[n]=!0}),t}function j(e,n,r,i){if(!y.acceptData(e))return;var s,o,u=y.expando,a=typeof n=="string",l=e.nodeType,c=l?y.cache:e,h=l?e[u]:e[u]&&u;if((!h||!c[h]||!i&&!c[h].data)&&a&&r===t)return;h||(l?e[u]=h=f.pop()||y.guid++:h=u),c[h]||( [...]
+value=n+="",r==="value"||n===e.getAttribute(r)?n:t}},y.attrHooks.contenteditable={get:R.get,set:function(e,t,n){R.set(e,t===""?!1:t,n)}},y.each(["width","height"],function(e,t){y.attrHooks[t]=y.extend(y.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})})),y.support.hrefNormalized||(y.each(["href","src","width","height"],function(e,n){y.attrHooks[n]=y.extend(y.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r==null?t:r}})}),y.each(["href","src"] [...]
+i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",pt=/ jQuery\d+="(?:null|\d+)"/g,dt=new RegExp("<(?:"+ht+")[\\s/>]","i"),vt=/^\s+/,mt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,gt=/<([\w:]+)/,yt=/<tbody/i,bt=/<|&#?\w+;/, [...]
+(function(e,t,n){"use strict";e.fn.foundationMediaQueryViewer=function(t){var n=e.extend(t,{toggleKey:77}),r=e(document);r.on("keyup.mediaQueryViewer",":input",function(e){e.which===n.toggleKey&&e.stopPropagation()}),r.on("keyup.mediaQueryViewer",function(t){var r=e("#fqv");t.which===n.toggleKey&&(r.length>0?r.remove():e("body").prepend('<div id="fqv" style="position:fixed;top:4px;left:4px;z-index:999;color:#fff;"><p style="font-size:12px;background:rgba(0,0,0,0.75);padding:5px;margin-bo [...]
+/*
+ * jQuery Custom Forms Plugin 1.0
+ * www.ZURB.com
+ * Copyright 2010, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+(function(e){var t=function(){return{tmp:[],hidden:null,adjust:function(t){var n=this;n.hidden=t.parents().andSelf().filter(":hidden"),n.hidden.each(function(){var t=e(this);n.tmp.push(t.attr("style")),t.css({visibility:"hidden",display:"block"})})},reset:function(){var t=this;t.hidden.each(function(n){var r=e(this),i=t.tmp[n];i===undefined?r.removeAttr("style"):r.attr("style",i)}),t.tmp=[],t.hidden=null}}};jQuery.foundation=jQuery.foundation||{},jQuery.foundation.customForms=jQuery.foun [...]
+/*
+ * jQuery Reveal Plugin 1.1
+ * www.ZURB.com
+ * Copyright 2010, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+/*globals jQuery */
+(function(e){"use strict";var t=!1;e(document).on("click","a[data-reveal-id]",function(t){t.preventDefault();var n=e(this).attr("data-reveal-id");e("#"+n).reveal(e(this).data())}),e.fn.reveal=function(n){var r=e(document),i={animation:"fadeAndPop",animationSpeed:300,closeOnBackgroundClick:!0,dismissModalClass:"close-reveal-modal",open:e.noop,opened:e.noop,close:e.noop,closed:e.noop};return n=e.extend({},i,n),this.not(".reveal-modal.open").each(function(){function c(){u=!1}function h(){u= [...]
+/*
+ * jQuery Orbit Plugin 1.4.0
+ * www.ZURB.com/playground
+ * Copyright 2010, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+(function(e){"use strict";e.fn.findFirstImage=function(){return this.first().find("img").andSelf().filter("img").first()};var t={defaults:{animation:"horizontal-push",animationSpeed:600,timer:!0,advanceSpeed:4e3,pauseOnHover:!1,startClockOnMouseOut:!1,startClockOnMouseOutAfter:1e3,directionalNav:!0,directionalNavRightText:"Right",directionalNavLeftText:"Left",captions:!0,captionAnimation:"fade",captionAnimationSpeed:600,resetTimerOnClick:!1,bullets:!1,bulletThumbs:!1,bulletThumbLocation: [...]
+(function(e,t,n){"use strict";e.fn.foundationNavigation=function(t){var n=!1;Modernizr.touch||navigator.userAgent.match(/Windows Phone/i)?(e(document).on("click.fndtn touchstart.fndtn",".nav-bar a.flyout-toggle",function(t){t.preventDefault();var r=e(this).siblings(".flyout").first();n===!1&&(e(".nav-bar .flyout").not(r).slideUp(500),r.slideToggle(500,function(){n=!1})),n=!0}),e(".nav-bar>li.has-flyout",this).addClass("is-touch")):e(".nav-bar>li.has-flyout",this).on("mouseenter mouseleav [...]
+(function(e,t,n){"use strict";e.fn.foundationButtons=function(t){var r=e(document),i=e.extend({dropdownAsToggle:!1,activeClass:"active"},t),s=function(t){e(".button.dropdown").find("ul").not(t).removeClass("show-dropdown")},o=function(t){var n=e(".button.dropdown").not(t);n.add(e("> span."+i.activeClass,n)).removeClass(i.activeClass)};r.on("click.fndtn",".button.disabled",function(e){e.preventDefault()}),e(".button.dropdown > ul",this).addClass("no-hover"),r.on("click.fndtn",".button.dro [...]
+(function(e,t,n,r){"use strict";var i={callback:e.noop,deep_linking:!0,init:!1},s={init:function(t){return i=e.extend({},i,t),this.each(function(){i.init||s.events(),i.deep_linking&&s.from_hash()})},events:function(){e(n).on("click.fndtn",".tabs a",function(t){s.set_tab(e(this).parent("dd, li"),t)}),i.init=!0},set_tab:function(t,n){var r=t.closest("dl, ul").find(".active"),s=t.children("a").attr("href"),o=/^#/.test(s),u=e(s+"Tab");o&&u.length>0&&(n&&!i.deep_linking&&n.preventDefault(),u. [...]
+/*
+ * jQuery Foundation Tooltips 2.0.2
+ * http://foundation.zurb.com
+ * Copyright 2012, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+/*jslint unparam: true, browser: true, indent: 2 */
+(function(e,t,n){"use strict";var r={bodyHeight:0,selector:".has-tip",additionalInheritableClasses:[],tooltipClass:".tooltip",tipTemplate:function(e,t){return'<span data-selector="'+e+'" class="'+r.tooltipClass.substring(1)+'">'+t+'<span class="nub"></span></span>'}},i={init:function(t){return r=e.extend(r,t),r.selector=r.targetClass?r.targetClass:r.selector,this.each(function(){var t=e("body");Modernizr.touch?(t.on("click.tooltip touchstart.tooltip touchend.tooltip",r.selector,function( [...]
+(function(e,t,n){"use strict";e.fn.foundationAccordion=function(t){var n=function(e){return e.hasClass("hover")&&!Modernizr.touch};e(document).on("mouseenter",".accordion li",function(){var t=e(this).parent();if(n(t)){var r=e(this).children(".content").first();e(".content",t).not(r).hide().parent("li").removeClass("active"),r.show(0,function(){r.parent("li").addClass("active")})}}),e(document).on("click.fndtn",".accordion li .title",function(){var t=e(this).closest("li"),r=t.parent();if( [...]
+/*! http://mths.be/placeholder v2.0.7 by @mathias */
+(function(e,t,n){function f(e){var t={},r=/^jQuery\d+$/;return n.each(e.attributes,function(e,n){n.specified&&!r.test(n.name)&&(t[n.name]=n.value)}),t}function l(e,r){var i=this,s=n(i);if(i.value==s.attr("placeholder")&&s.hasClass("placeholder"))if(s.data("placeholder-password")){s=s.hide().next().show().attr("id",s.removeAttr("id").data("placeholder-id"));if(e===!0)return s[0].value=r;s.focus()}else i.value="",s.removeClass("placeholder"),i==t.activeElement&&i.select()}function c(){var  [...]
+(function(e,t,n){"use strict";e.fn.foundationAlerts=function(t){var n=e.extend({callback:e.noop},t);e(document).on("click",".alert-box a.close",function(t){t.preventDefault(),e(this).closest(".alert-box").fadeOut(function(){e(this).remove(),n.callback()})})}})(jQuery,this);
+/*
+ * jQuery Foundation Top Bar 2.0.4
+ * http://foundation.zurb.com
+ * Copyright 2012, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+/*jslint unparam: true, browser: true, indent: 2 */
+(function(e,t,n){"use strict";var r={index:0,initialized:!1},i={init:function(n){return this.each(function(){r=e.extend(r,n),r.$w=e(t),r.$topbar=e("nav.top-bar"),r.$section=r.$topbar.find("section"),r.$titlebar=r.$topbar.children("ul:first");var s=e("<div class='top-bar-js-breakpoint'/>").appendTo("body");r.breakPoint=s.width(),s.remove(),r.initialized||(i.assemble(),r.initialized=!0),r.height||i.largestUL(),r.$topbar.parent().hasClass("fixed")&&e("body").css("padding-top",r.$topbar.oute [...]
+/*
+ * jQuery Foundation Joyride Plugin 2.0.3
+ * http://foundation.zurb.com
+ * Copyright 2012, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+/*jslint unparam: true, browser: true, indent: 2 */
+(function(e,t,n){"use strict";var r={version:"2.0.3",tipLocation:"bottom",nubPosition:"auto",scrollSpeed:300,timer:0,startTimerOnClick:!0,startOffset:0,nextButton:!0,tipAnimation:"fade",pauseAfter:[],tipAnimationFadeSpeed:300,cookieMonster:!1,cookieName:"joyride",cookieDomain:!1,tipContainer:"body",postRideCallback:e.noop,postStepCallback:e.noop,template:{link:'<a href="#close" class="joyride-close-tip">X</a>',timer:'<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-in [...]
+/*
+ * jQuery Foundation Clearing 1.2.1
+ * http://foundation.zurb.com
+ * Copyright 2012, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+/*jslint unparam: true, browser: true, indent: 2 */
+(function(e,t,n,r){"use strict";var i={templates:{viewing:'<a href="#" class="clearing-close">×</a><div class="visible-img" style="display: none"><img src="#"><p class="clearing-caption"></p><a href="#" class="clearing-main-left"></a><a href="#" class="clearing-main-right"></a></div>'},close_selectors:"a.clearing-close",initialized:!1,locked:!1},s={init:function(t,r){return this.find("ul[data-clearing]").each(function(){var t=e(n),r=e(this),o=o||{},u=u||{},a=r.data("fndtn.clearing. [...]
+/*
+ * jQuery Foundation Magellan 0.1.0
+ * http://foundation.zurb.com
+ * Copyright 2012, ZURB
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+*/
+/*jslint unparam: true, browser: true, indent: 2 */
+(function(e,t,n){"use strict";e.fn.foundationMagellan=function(n){var r=e(t),i=e(document),s=e("[data-magellan-expedition=fixed]"),o={threshold:s.length?s.outerHeight(!0):0,activeClass:"active"},n=e.extend({},o,n);i.on("magellan.arrival","[data-magellan-arrival]",function(t){var r=e(this),i=r.closest("[data-magellan-expedition]"),s=i.attr("data-magellan-active-class")||n.activeClass;r.closest("[data-magellan-expedition]").find("[data-magellan-arrival]").not(this).removeClass(s),r.addClas [...]
diff --git a/demo/demo/static/jquery-1.12.4.min.js b/demo/demo/static/jquery-1.12.4.min.js
new file mode 100644
index 0000000..e836475
--- /dev/null
+++ b/demo/demo/static/jquery-1.12.4.min.js
@@ -0,0 +1,5 @@
+/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r [...]
+}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d& [...]
+marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return v [...]
+padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){ [...]
diff --git a/demo/demo/static/semantic/semantic.min.css b/demo/demo/static/semantic/semantic.min.css
new file mode 100644
index 0000000..6a14aaf
--- /dev/null
+++ b/demo/demo/static/semantic/semantic.min.css
@@ -0,0 +1,29 @@
+/*
+* # Semantic UI
+* Version: 0.3.0
+* http://github.com/jlukic/semantic-ui
+*
+*
+* Copyright 2013 Contributors
+* Released under the MIT license
+* http://opensource.org/licenses/MIT
+*
+* Released: 09/30/2013
+*/
+
+.ui.breadcrumb{margin:1em 0;display:inline-block;vertical-align:middle}.ui.breadcrumb:first-child{margin-top:0}.ui.breadcrumb:last-child{margin-bottom:0}.ui.breadcrumb .divider{display:inline-block;opacity:.5;margin:0 .15em;font-size:1em;color:rgba(0,0,0,.3)}.ui.breadcrumb a.section{cursor:pointer}.ui.breadcrumb .section{display:inline-block;margin:0;padding:0}.ui.breadcrumb.segment{display:inline-block;padding:.5em 1em}.ui.breadcrumb .active.section{font-weight:700}.ui.small.breadcrumb{ [...]
+ *  Font Awesome 3.2.1
+ *  the iconic font designed for Bootstrap
+ *  ------------------------------------------------------------------------------
+ *  The full suite of pictographic icons, examples, and documentation can be
+ *  found at http://fon.io.  Stay up to date on Twitter at
+ *  http://twitter.com/fon.
+ *
+ *  License
+ *  ------------------------------------------------------------------------------
+ *  - The Font Awesome font is licensed under SIL OFL 1.1 -
+ *    http://scripts.sil.org/OFL
+
+/*******************************
+             Icon
+*******************************/@font-face{font-family:Icons;src:url(../fonts/icons.eot);src:url(../fonts/icons.eot?#iefix) format('embedded-opentype'),url(../fonts/icons.woff) format('woff'),url(../fonts/icons.ttf) format('truetype'),url(../fonts/icons.svg#icons) format('svg');font-style:normal;font-weight:400;font-variant:normal;text-decoration:inherit;text-transform:none}i.icon{display:inline-block;opacity:.75;margin:0 .25em 0 0;width:1.23em;height:1em;font-family:Icons;font-style:nor [...]
\ No newline at end of file
diff --git a/demo/demo/static/semantic/semantic.min.js b/demo/demo/static/semantic/semantic.min.js
new file mode 100644
index 0000000..cfec6cf
--- /dev/null
+++ b/demo/demo/static/semantic/semantic.min.js
@@ -0,0 +1,15 @@
+/** # Semantic UI
+* Version: 0.3.0
+* http://github.com/jlukic/semantic-ui
+*
+*
+* Copyright 2013 Contributors
+* Released under the MIT license
+* http://opensource.org/licenses/MIT
+*
+* Release Date: 09/30/2013
+*/
+!function(a,b,c,d){a.fn.accordion=function(b){var c,e=a(this),f=a.isPlainObject(b)?a.extend(!0,{},a.fn.accordion.settings,b):a.fn.accordion.settings,g=f.className,h=f.namespace,i=f.selector,j=f.error,k="."+h,l="module-"+h,m=e.selector||"",n=(new Date).getTime(),o=[],p=arguments[0],q="string"==typeof p,r=[].slice.call(arguments,1);return e.each(function(){var b,h=a(this),s=h.find(i.title),t=h.find(i.content),u=this,v=h.data(l);b={initialize:function(){b.debug("Initializing accordion with  [...]
+},user:{updateCount:function(){c.userCount&&(y=o.data("users"),k=0,a.each(y,function(){k++}),s.html(c.templates.userCount(k)))},joined:function(b){y=o.data("users"),"anonymous"!=b.id&&y[b.id]===d&&(y[b.id]=b.info,c.randomColor&&b.info.color===d&&(b.info.color=c.templates.color(b.id)),x=c.templates.userList(b.info),b.info.isAdmin?a(x).prependTo(r):a(x).appendTo(r),c.partingMessages&&(t.append(c.templates.joined(b.info)),n.message.scroll.test()),n.user.updateCount())},left:function(a){y=o. [...]
+},destroy:function(){z.verbose("Destroying instance"),A.removeData(m).off(l),g.sticky&&C.off(l)},refresh:function(){z.debug("Refreshing cached calculations"),c=A.offset(),k=A.outerHeight(),t=C.outerWidth(),u=C.outerHeight(),v=C.offset()},show:function(){z.debug("Showing nag",g.animation.show),"fade"==g.animation.show?A.fadeIn(g.duration,g.easing):A.slideDown(g.duration,g.easing)},hide:function(){z.debug("Showing nag",g.animation.hide),"fade"==g.animation.show?A.fadeIn(g.duration,g.easing [...]
+},verbose:function(){h.verbose&&h.debug&&(h.performance?t.performance.log(arguments):(t.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),t.verbose.apply(console,arguments)))},error:function(){t.error=Function.prototype.bind.call(console.error,console,h.name+":"),t.error.apply(console,arguments)},performance:{log:function(a){var b,c,d;h.performance&&(b=(new Date).getTime(),d=o||b,c=b-d,o=b,p.push({Element:x,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":c [...]
\ No newline at end of file
diff --git a/demo/demo/templates/_base.html b/demo/demo/templates/_base.html
new file mode 100644
index 0000000..324b9a2
--- /dev/null
+++ b/demo/demo/templates/_base.html
@@ -0,0 +1,33 @@
+{% load sitetree static i18n %}
+<!DOCTYPE html>
+<html lang="{{ request.lang }}">
+<head>
+    <meta charset="UTF-8">
+    <title>django-sitetree demo > {% sitetree_page_title from "main" %} ({% get_current_language as LANGUAGE_CODE %}{{LANGUAGE_CODE}})</title>
+
+    <script src="{% static 'jquery-1.12.4.min.js' %}"></script>
+
+    {% include tpl_head %}
+
+
+    <style type="text/css">
+        #page-contents {
+            background-color: gainsboro;
+            padding: 20px;
+        }
+        #demo-navigation {
+            padding: 10px;
+            border: 1px solid #ce8483;
+        }
+    </style>
+
+</head>
+<body>
+
+    <div align="center">
+        <a href="https://github.com/idlesign/django-sitetree">django-sitetree</a>
+    </div>
+
+    {% block body %}{% endblock %}
+</body>
+</html>
\ No newline at end of file
diff --git a/demo/demo/templates/_head_bootstrap.html b/demo/demo/templates/_head_bootstrap.html
new file mode 100644
index 0000000..7894e5b
--- /dev/null
+++ b/demo/demo/templates/_head_bootstrap.html
@@ -0,0 +1,4 @@
+{% load static %}
+
+<link href="{% static 'bootstrap/bootstrap.min.css' %}" rel="stylesheet">
+<script src="{% static 'bootstrap/bootstrap.min.js' %}"></script>
diff --git a/demo/demo/templates/_head_bootstrap3.html b/demo/demo/templates/_head_bootstrap3.html
new file mode 100644
index 0000000..aab4f48
--- /dev/null
+++ b/demo/demo/templates/_head_bootstrap3.html
@@ -0,0 +1,4 @@
+{% load static %}
+
+<link href="{% static 'bootstrap3/bootstrap.min.css' %}" rel="stylesheet">
+<script src="{% static 'bootstrap3/bootstrap.min.js' %}"></script>
diff --git a/demo/demo/templates/_head_foundation.html b/demo/demo/templates/_head_foundation.html
new file mode 100644
index 0000000..b725494
--- /dev/null
+++ b/demo/demo/templates/_head_foundation.html
@@ -0,0 +1,6 @@
+{% load static %}
+
+<link href="{% static 'foundation/foundation.min.css' %}" rel="stylesheet">
+<script src="{% static 'foundation/foundation.min.js' %}"></script>
+<script src="{% static 'foundation/app.js' %}"></script>
+
diff --git a/demo/demo/templates/_head_none.html b/demo/demo/templates/_head_none.html
new file mode 100644
index 0000000..3c46b83
--- /dev/null
+++ b/demo/demo/templates/_head_none.html
@@ -0,0 +1,8 @@
+<style type="text/css">
+    .current_branch {
+        background-color: lightskyblue;
+    }
+    .current_item {
+        background-color: #ce8483;
+    }
+</style>
\ No newline at end of file
diff --git a/demo/demo/templates/_head_semantic.html b/demo/demo/templates/_head_semantic.html
new file mode 100644
index 0000000..be81d75
--- /dev/null
+++ b/demo/demo/templates/_head_semantic.html
@@ -0,0 +1,8 @@
+{% load static %}
+
+<link href="{% static 'semantic/semantic.min.css' %}" rel="stylesheet">
+<script src="{% static 'semantic/semantic.min.js' %}"></script>
+
+<script type="text/javascript">
+    $(function(){$('.ui.dropdown').dropdown();});
+</script>
\ No newline at end of file
diff --git a/demo/demo/templates/_listing_contents.html b/demo/demo/templates/_listing_contents.html
new file mode 100644
index 0000000..97603b0
--- /dev/null
+++ b/demo/demo/templates/_listing_contents.html
@@ -0,0 +1,19 @@
+{% load sitetree %}
+
+<div id="page-contents">
+    <h1>{% sitetree_page_title from "main" %} </h1>
+
+    <ul>
+    {% for article in articles %}
+        <li><a href="{%  url 'demo:articles-detailed' article.id %}">{{ article.title }}</a></li>
+    {% endfor %}
+    </ul>
+</div>
+
+<hr>
+
+<h2>Site structure</h2>
+{% sitetree_tree from "main" %}
+
+<hr>
+{% include 'demo_nav.html' %}
\ No newline at end of file
diff --git a/demo/demo/templates/demo_nav.html b/demo/demo/templates/demo_nav.html
new file mode 100644
index 0000000..97e99c6
--- /dev/null
+++ b/demo/demo/templates/demo_nav.html
@@ -0,0 +1,6 @@
+{% load sitetree %}
+
+<div id="demo-navigation">
+    <h2>Demo navigation</h2>
+    {% sitetree_tree from "demo" %}
+</div>
\ No newline at end of file
diff --git a/demo/demo/templates/index.html b/demo/demo/templates/index.html
new file mode 100644
index 0000000..40a10be
--- /dev/null
+++ b/demo/demo/templates/index.html
@@ -0,0 +1,6 @@
+{% extends '_base.html' %}
+{% load sitetree %}
+
+{% block body %}
+    {% include 'demo_nav.html' %}
+{% endblock %}
\ No newline at end of file
diff --git a/demo/demo/templates/listing.html b/demo/demo/templates/listing.html
new file mode 100644
index 0000000..2a065e9
--- /dev/null
+++ b/demo/demo/templates/listing.html
@@ -0,0 +1,9 @@
+{% extends '_base.html' %}
+{% load sitetree %}
+
+
+{% block body %}
+
+    {% include tpl_realm %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/demo/demo/templates/listing_bootstrap.html b/demo/demo/templates/listing_bootstrap.html
new file mode 100644
index 0000000..8291ef5
--- /dev/null
+++ b/demo/demo/templates/listing_bootstrap.html
@@ -0,0 +1,22 @@
+{% load sitetree %}
+<div class="container">
+
+    <div class="navbar">
+        <div class="navbar-inner">
+            <div class="container">
+                {% sitetree_menu from "main" include "trunk" template "sitetree/menu_bootstrap.html" %}
+            </div>
+        </div>
+    </div>
+
+    <div class="row">
+        <div class="span3">
+            {% sitetree_menu from "main" include "this-siblings" template "sitetree/menu_bootstrap_navlist.html" %}
+        </div>
+        <div class="span9">
+            {% sitetree_breadcrumbs from "main" template "sitetree/breadcrumbs_bootstrap.html" %}
+
+            {% include '_listing_contents.html' %}
+        </div>
+    </div>
+</div>
\ No newline at end of file
diff --git a/demo/demo/templates/listing_bootstrap3.html b/demo/demo/templates/listing_bootstrap3.html
new file mode 100644
index 0000000..9c16091
--- /dev/null
+++ b/demo/demo/templates/listing_bootstrap3.html
@@ -0,0 +1,26 @@
+{%  load sitetree %}
+
+<div class="container">
+
+    <div class="navbar navbar-inverse">
+        <div class="navbar-inner">
+            <div class="container">
+                {% sitetree_menu from "main" include "trunk" template "sitetree/menu_bootstrap3.html" %}
+            </div>
+        </div>
+    </div>
+
+    <div class="row">
+        <div class="col-md-3">
+            {% sitetree_menu from "main" include "this-siblings" template "sitetree/menu_bootstrap3_navpills.html" %}
+            <hr/>
+            {% sitetree_menu from "main" include "this-siblings" template "sitetree/menu_bootstrap3_navpills-stacked.html" %}
+        </div>
+        <div class="col-md-9">
+            {% sitetree_breadcrumbs from "main" template "sitetree/breadcrumbs_bootstrap3.html" %}
+
+            {% include '_listing_contents.html' %}
+        </div>
+    </div>
+
+</div>
diff --git a/demo/demo/templates/listing_foundation.html b/demo/demo/templates/listing_foundation.html
new file mode 100644
index 0000000..92a6a0b
--- /dev/null
+++ b/demo/demo/templates/listing_foundation.html
@@ -0,0 +1,24 @@
+{%  load sitetree %}
+
+<div class="row">
+
+    {% sitetree_menu from "main" include "trunk" template "sitetree/menu_foundation.html" %}
+
+</div>
+
+<div class="row">
+    <div class="three columns">
+
+        {% sitetree_menu from "main" include "trunk" template "sitetree/menu_foundation-vertical.html" %}
+
+        {% sitetree_menu from "main" include "this-siblings" template "sitetree/menu_foundation_sidenav.html" %}
+
+    </div>
+    <div class="nine columns">
+
+        {% sitetree_breadcrumbs from "main" template "sitetree/breadcrumbs_foundation.html" %}
+
+        {% include '_listing_contents.html' %}
+
+    </div>
+</div>
diff --git a/demo/demo/templates/listing_none.html b/demo/demo/templates/listing_none.html
new file mode 100644
index 0000000..cbe3d1d
--- /dev/null
+++ b/demo/demo/templates/listing_none.html
@@ -0,0 +1,15 @@
+{% load sitetree %}
+
+
+<div>
+    {% sitetree_menu from "main" include "trunk" %}
+    <div>
+        <div>
+            {% sitetree_menu from "main" include "this-siblings" %}
+        </div>
+        <div>
+            {% sitetree_breadcrumbs from "main" %}
+            {% include '_listing_contents.html' %}
+        </div>
+    </div>
+</div>
\ No newline at end of file
diff --git a/demo/demo/templates/listing_semantic.html b/demo/demo/templates/listing_semantic.html
new file mode 100644
index 0000000..7bd8cae
--- /dev/null
+++ b/demo/demo/templates/listing_semantic.html
@@ -0,0 +1,18 @@
+{%  load sitetree %}
+
+<div class="ui menu">
+
+    {% sitetree_menu from "main" include "trunk" template "sitetree/menu_semantic.html" %}
+</div>
+
+
+<div class="ui two column grid">
+    <div class="column">
+        {% sitetree_menu from "main" include "this-siblings" template "sitetree/menu_semantic-vertical.html" %}
+    </div>
+    <div class="column">
+        {% sitetree_breadcrumbs from "main" template "sitetree/breadcrumbs_semantic.html" %}
+
+        {% include '_listing_contents.html' %}
+    </div>
+</div>
diff --git a/demo/demo/urls.py b/demo/demo/urls.py
new file mode 100644
index 0000000..2d0c593
--- /dev/null
+++ b/demo/demo/urls.py
@@ -0,0 +1,10 @@
+from django.conf.urls import url
+
+from .views import index, listing, detailed
+
+
+urlpatterns = [
+    url(r'^$', index, name='index'),
+    url(r'^articles/$', listing, name='articles-listing'),
+    url(r'^articles/(?P<article_id>\d+)/$', detailed, name='articles-detailed'),
+]
diff --git a/demo/demo/utils.py b/demo/demo/utils.py
new file mode 100644
index 0000000..c404be6
--- /dev/null
+++ b/demo/demo/utils.py
@@ -0,0 +1,10 @@
+from django.shortcuts import render
+
+
+def render_themed(request, view_type, context):
+    theme = request.theme
+    context.update({
+        'tpl_head': '_head%s.html' % theme,
+        'tpl_realm': '%s%s.html' % (view_type, theme)
+    })
+    return render(request, '%s.html' % view_type, context)
diff --git a/demo/demo/views.py b/demo/demo/views.py
new file mode 100644
index 0000000..64cebfe
--- /dev/null
+++ b/demo/demo/views.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.shortcuts import get_list_or_404, redirect
+
+from .models import Article
+from .utils import render_themed
+
+from sitetree.toolbox import register_i18n_trees
+
+
+register_i18n_trees(['main'])
+
+
+def index(request):
+    return render_themed(request, 'index', {})
+
+
+def listing(request):
+    return render_themed(request, 'listing', {'articles': get_list_or_404(Article)})
+
+
+def detailed(request, article_id):
+    return redirect('demo:articles-listing')
diff --git a/demo/manage.py b/demo/manage.py
new file mode 100755
index 0000000..3b1c31e
--- /dev/null
+++ b/demo/manage.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+import os
+import sys
+
+
... 372 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-sitetree.git



More information about the Python-modules-commits mailing list