# Path: demo/demo/models.py
# 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
# 
# Path: demo/demo/utils.py
# 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)
# 
# Path: sitetree/toolbox.py



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
# -*- coding: utf-8 -*-
from __future__ import unicode_literals





register_i18n_trees(['main'])


def index(request):
    return render_themed(request, 'index', {})


def listing(request):

# Path: demo/demo/models.py
# 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
# 
# Path: demo/demo/utils.py
# 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)
# 
# Path: sitetree/toolbox.py



# Path: demo/demo/views.py
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

# -*- coding: utf-8 -*-
from __future__ import unicode_literals





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)})