2017-03-07 22:37:55 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
from datetime import date
|
|
|
|
|
|
|
|
from django.utils.dateformat import DateFormat
|
|
|
|
from django.utils.formats import date_format
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
2019-05-13 15:11:16 +00:00
|
|
|
from wagtail.core.models import Page
|
|
|
|
from wagtail.search.models import Query
|
|
|
|
from wagtail.contrib.routable_page.models import RoutablePageMixin, route
|
2017-03-07 22:37:55 +00:00
|
|
|
|
|
|
|
class HomePage(RoutablePageMixin, Page):
|
|
|
|
|
|
|
|
@route(r'^$')
|
|
|
|
def home_page(self, request, *args, **kwargs):
|
|
|
|
self.articles = self.get_articles()
|
|
|
|
return Page.serve(self, request, *args, **kwargs)
|