Exemplo n.º 1
0
Arquivo: views.py Projeto: trb/bpbe
def admin(request):
    return {
            'time': time,
            'date_format': date_format,
            'public_articles': articles.get_published(max_=None),
            'scheduled_articles': articles.get_scheduled(),
            'private_articles': articles.get_private(),
            'slogan': slogan.get()
            }
Exemplo n.º 2
0
Arquivo: views.py Projeto: trb/bpbe
def display_articles(request):
    if request.referer and re.search(_referer_has_kinfu_re, request.referer):
        request.session['kinfu_from_google'] = True
        return HTTPFound(location='/one/i-know-kinfu#readon,brother')

    return {
            'articles': articles.get_published(),
            'slogan': slogan.get()
            }