Пример #1
0
def source_attribute_set(req, selectionId, sourceId, attribute):
    get_object_or_404(Selection, pk=selectionId)
    if attribute in source_tag_types:
        return tag_set(req, attribute, Source, sourceId)
    elif attribute == 'author':
        return author_set(req, Source, sourceId)
    else: raise Http404
Пример #2
0
def author_attribute_set(req, selectionId, sourceId, authorId, attribute):
    get_object_or_404(Selection, pk=selectionId)
    get_object_or_404(Source, pk=sourceId)
    if attribute == 'nations':
        return tag_set(req, attribute, Author, sourceId)
    else:
        raise Http404
Пример #3
0
def author_attribute_set(req, selectionId, sourceId, authorId, attribute):
    get_object_or_404(Selection, pk=selectionId)
    get_object_or_404(Source, pk=sourceId)
    if attribute == 'nations':
        return tag_set(req, attribute, Author, sourceId)
    else:
        raise Http404
Пример #4
0
def selection_attribute_set(req, selectionId, attribute):
    if attribute in selection_tags:
        return tag_set(req, attribute, Selection, selectionId)
    elif attribute == 'source':
        return source_set(req, Selection, selectionId)
    elif attribute == 'quotations':
        return quotation_set(req, Selection, selectionId)
    else: raise Http404
Пример #5
0
def selection_attribute_set(req, selectionId, attribute):
    if attribute in selection_tags:
        return tag_set(req, attribute, Selection, selectionId)
    elif attribute == 'source':
        return source_set(req, Selection, selectionId)
    elif attribute == 'quotations':
        return quotation_set(req, Selection, selectionId)
    else:
        raise Http404