Ejemplo n.º 1
0
def food_table_list(request):
    fts = FoodTable.objects.all()
    pagination = miscellaneous.paginate(fts, request, key='fts')
    return render(
        request, 'food_table_list.html', {
            'title': u'Питание учащихся (таблицы меню)',
            'news': News.objects.all,
            'year': timezone.now,
            'fts': pagination,
            "cats": DocumentCategory.objects.get_top_X,
        })
Ejemplo n.º 2
0
def docs_newest(request):
    documents = Document.objects.newest()
    pagination = miscellaneous.paginate(documents, request, key='document')
    return render(
        request, 'docs_list.html', {
            'title': u'Новые документы',
            'news': News.objects.all,
            'year': timezone.now,
            'docs': pagination,
            'categories': DocumentCategory.objects.order_by_doc_count().all,
            "cats": DocumentCategory.objects.get_top_X,
        })
Ejemplo n.º 3
0
def docs_search_result(request, query):
    result = Document.objects.search_by_title(query)
    pagination = miscellaneous.paginate(result, request, key='document')
    return render(
        request, 'docs_list.html', {
            'title': u'Результаты поиска',
            'news': News.objects.all,
            'year': timezone.now,
            'docs': pagination,
            'categories': DocumentCategory.objects.order_by_doc_count().all,
            "cats": DocumentCategory.objects.get_top_X,
            "query": query
        })
Ejemplo n.º 4
0
def docs_by_cat_name(request, cat_name):
    try:
        cat_obj = DocumentCategory.objects.get_by_name(cat_name)
        documents = Document.objects.by_category(cat_obj)
    except DocumentCategory.DoesNotExist:
        documents = Document.objects.newest()
    pagination = miscellaneous.paginate(documents, request, key='document')
    return render(
        request, 'docs_list.html', {
            'title': u'Документы по категории',
            'news': News.objects.all,
            'year': timezone.now,
            'docs': pagination,
            'categories': DocumentCategory.objects.order_by_doc_count().all,
            "cats": DocumentCategory.objects.get_top_X,
            "cat_name": cat_name,
        })
Ejemplo n.º 5
0
def control_results(request):
    try:
        cat_obj = DocumentCategory.objects.get_by_name(categories.check_acts)
        documents = Document.objects.by_category(cat_obj)
    except DocumentCategory.DoesNotExist:
        documents = Document.objects.newest()
    pagination = miscellaneous.paginate(documents, request, key='document')
    return render(
        request, 'control_results.html', {
            'title':
            u'Сведения об образовательной организации - предписания органов, осуществляющих государственный контроль (надзор) в сфере образования, отчеты об исполнении таких предписаний',
            'news': News.objects.all,
            'year': timezone.now,
            'docs': pagination,
            'categories': DocumentCategory.objects.order_by_doc_count().all,
            "cats": DocumentCategory.objects.get_top_X,
            "cat_name": categories.check_acts,
        })
Ejemplo n.º 6
0
def about_standards(request):
    try:
        cat_obj = DocumentCategory.objects.get_by_name(
            categories.fgos_category)
        documents = Document.objects.by_category(cat_obj)
    except DocumentCategory.DoesNotExist:
        documents = Document.objects.newest()
    pagination = miscellaneous.paginate(documents, request, key='document')
    return render(
        request, 'about_standards.html', {
            'title':
            u'Сведения об образовательной организации - образовательные стандарты',
            'news': News.objects.all,
            'year': timezone.now,
            'docs': pagination,
            'categories': DocumentCategory.objects.order_by_doc_count().all,
            "cats": DocumentCategory.objects.get_top_X,
            "cat_name": categories.fgos_category,
        })