Ejemplo n.º 1
0
def tag_detail(request, tag, page=None, **kwargs):
    """Display the gbobjects of a tag"""
    if not kwargs.get('template_name'):
        kwargs['template_name'] = template_name_for_gbobject_queryset_filtered(
            'tag', slugify(tag))

    return tagged_object_list(request, tag=tag,
                              queryset_or_model=Gbobject.published.all(),
                              paginate_by=PAGINATION, page=page,
                              **kwargs)
Ejemplo n.º 2
0
def tag_detail(request, tag, page=None, **kwargs):
    """Display the gbobjects of a tag"""
    if not kwargs.get('template_name'):
        kwargs['template_name'] = template_name_for_gbobject_queryset_filtered(
            'tag', slugify(tag))

    return tagged_object_list(request,
                              tag=tag,
                              queryset_or_model=Gbobject.published.all(),
                              paginate_by=PAGINATION,
                              page=page,
                              **kwargs)
Ejemplo n.º 3
0
def Objecttype_detail(request, path, page=None, **kwargs):
    """Display the gbobjects of a Objecttype"""
    extra_context = kwargs.pop("extra_context", {})

    Objecttype = get_Objecttype_or_404(path)
    if not kwargs.get("template_name"):
        kwargs["template_name"] = template_name_for_gbobject_queryset_filtered("Objecttype", Objecttype.slug)

    extra_context.update({"Objecttype": Objecttype})
    kwargs["extra_context"] = extra_context

    return object_list(request, queryset=Objecttype.gbobjects_published(), paginate_by=PAGINATION, page=page, **kwargs)
Ejemplo n.º 4
0
def Objecttype_detail(request, path, page=None, **kwargs):
    """Display the gbobjects of a Objecttype"""
    extra_context = kwargs.pop('extra_context', {})

    Objecttype = get_Objecttype_or_404(path)
    if not kwargs.get('template_name'):
        kwargs['template_name'] = template_name_for_gbobject_queryset_filtered(
            'Objecttype', Objecttype.slug)

    extra_context.update({'Objecttype': Objecttype})
    kwargs['extra_context'] = extra_context

    return object_list(request, queryset=Objecttype.gbobjects_published(),
                       paginate_by=PAGINATION, page=page,
                       **kwargs)
Ejemplo n.º 5
0
def author_detail(request, username, page=None, **kwargs):
    """Display the gbobjects of an author"""
    extra_context = kwargs.pop('extra_context', {})

    author = get_object_or_404(Author, username=username)
    if not kwargs.get('template_name'):
        kwargs['template_name'] = template_name_for_gbobject_queryset_filtered(
            'author', author.username)

    extra_context.update({'author': author})
    kwargs['extra_context'] = extra_context

    return object_list(request, queryset=author.gbobjects_published(),
                       paginate_by=PAGINATION, page=page,
                       **kwargs)
Ejemplo n.º 6
0
def author_detail(request, username, page=None, **kwargs):
    """Display the gbobjects of an author"""
    extra_context = kwargs.pop('extra_context', {})

    author = get_object_or_404(Author, username=username)
    if not kwargs.get('template_name'):
        kwargs['template_name'] = template_name_for_gbobject_queryset_filtered(
            'author', author.username)

    extra_context.update({'author': author})
    kwargs['extra_context'] = extra_context

    return object_list(request, queryset=author.gbobjects_published(),
                       paginate_by=PAGINATION, page=page,
                       **kwargs)