Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)

src/c/h/chieftain-HEAD/board/views.py   chieftain(Download)
from django.core.paginator import Paginator
from django.shortcuts import render, get_object_or_404, redirect
from django.utils.translation import ugettext_lazy as _
from board.models import Post, File, Section, PostForm
from board.shortcuts import get_page_or_404, add_sidebar
            "details": _("Nothing found")
        }))
    p = get_page_or_404(Paginator(posts, section.ONPAGE), page)
    return render(request, "search_results.html", add_sidebar({"posts": p,
        "section": section}))
    """
    s = get_object_or_404(Section, slug=section_slug)
    t = get_page_or_404(Paginator(s.threads(), s.ONPAGE), page)
    return render(request, "section_page.html", add_sidebar({
        "threads": t,

src/c/h/chieftain-HEAD/pda/views.py   chieftain(Download)
from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, render, redirect
from board.models import Post, Section
from board.shortcuts import get_page_or_404, add_sidebar
 
def section(request, section_slug, page):
    s = get_object_or_404(Section, slug=section_slug)
    p = get_page_or_404(Paginator(s.op_posts(), s.ONPAGE), page)
    return render(request, "pda/section.html", {"section": s,
        "posts": p})

src/c/h/chieftain-HEAD/mobile/views.py   chieftain(Download)
from django.core.paginator import Paginator
from django.shortcuts import render, redirect, get_object_or_404
from board.models import Post, Section
from board.shortcuts import get_page_or_404, add_sidebar
 
def section(request, section_slug, page):
    s = get_object_or_404(Section, slug=section_slug)
    t = get_page_or_404(Paginator(s.threads(), s.ONPAGE), page)
    return render(request, "mobile/section.html", {"section": s,
        "threads": t})