можешь сделать рефакторинг кода {%- if parametr_enter=='homeworks'%}
    {% from "components/my_homework.html" import my_homework with context %}
{%- elif parametr_enter=='my_board' %}
    {% from "components/board_add.html" import board_add with context %}
{%- elif parametr_enter=='tasks_worksheet' %}
    {% from "components/query_of_tasks.html" import query_of_tasks with context %}
{%- elif parametr_enter=='my_friends' %}
    {% from "components/classmates.html" import classmates with context %}
{%- elif parametr_enter=='profile_info' %}
    {% from "components/profile_information.html" import profile_information with context %}
{%- elif parametr_enter=='calendar' %}
    {% from "components/student_calendar.html" import student_calendar with context %}
{%- elif parametr_enter=='uved' %}
    {% from "components/uved_studient.html" import uved_studient with context %}
{%- elif parametr_enter=='my_files' %}
    {% from "components/my_files.html" import my_files with context %}
{%- endif %}

{% extends 'base.html' %}
{% block title %}Мой личный кабинет{% endblock %}
{% block meta_1 %}
<link rel="stylesheet" href="{{ url_for('static', filename='/css/base.css') }}">
{%- if parametr_enter=='profile_info'%}
  <link rel="stylesheet" href="{{ url_for('static', filename='/css/lk.css') }}">
{%- endif %}
{% endblock %}  


{% block meta_2 %}

<link rel="stylesheet" href="{{ url_for('static', filename='/css/studient.css') }}"> 
<link rel="stylesheet" href="{{ url_for('static', filename='/css/sticky_and_navbar.css') }}"> 
<link rel="stylesheet" href="{{ url_for('static', filename='/css/pagination_main.css') }}"> 
<link rel="stylesheet" href="{{ url_for('static', filename='/css/preloader_ajax.css') }}"> 

    {%- if parametr_enter=='my_friends'%}
        <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> 
    {%- endif %}

    {%- if parametr_enter=='calendar'%}
        <link rel="stylesheet" href="{{ url_for('static', filename='/css/fc_calendar.css') }}"> 
        <link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css" rel="stylesheet">
    {%- endif %}


{% endblock %} 

{% block content %}
<section class="section">
    <div class="container" id="task_page">
      <div class="columns save homework homework_row_save">
        <div class="column is-2 sticky_pc">
          <div class="sticky" >
            <div class="puncts_menu">
             <!---- <div class="sidebar__inner" >  id="pk" ----->
              <a href="/my_private_office?parametr_enter=profile_info" class="punct_menu{{ '_active' if parametr_enter=='profile_info' else ''}} mb-4">
                <img src="{{ url_for('static', filename='/img/icons/lk/profile' ~ ('_active' if parametr_enter=='profile_info' else '') ~ '.svg') }}" alt="" title="Личный кабинет">
              </a>
              <a href="/my_private_office?parametr_enter=uved" class="punct_menu{{ '_active' if parametr_enter=='uved' }} mb-4">
                <img src="{{ url_for('static', filename='/img/icons/lk/uved' ~ ('_active' if parametr_enter=='uved' else '') ~ '.svg') }}" alt="" title="Мои новости">
              </a>
              <a href="/my_private_office?parametr_enter=homeworks&my_friend={{my_friend}}&my_works={{my_works}}&my_topics={{my_topics}}" class="punct_menu{{ '_active' if parametr_enter=='homeworks' }} mb-4">
                <img src="{{ url_for('static', filename='/img/icons/lk/homework' ~ ('_active' if parametr_enter=='homeworks' else '') ~ '.svg') }}" alt="" title="Домашняя работа">
              </a>
              <a href="/my_private_office?parametr_enter=tasks_worksheet" class="punct_menu{{ '_active' if parametr_enter=='tasks_worksheet' }} mb-4">
                <img src="{{ url_for('static', filename='/img/icons/lk/save' ~ ('_active' if parametr_enter=='tasks_worksheet' else '') ~ '.svg') }}" alt="" title="Сохранённые задания">
              </a>
              <a href="/my_private_office?parametr_enter=my_friends" class="punct_menu{{ '_active' if parametr_enter=='my_friends' }} mb-4">
                <img src="{{ url_for('static', filename='/img/icons/lk/people' ~ ('_active' if parametr_enter=='my_friends' else '') ~ '.svg') }}" alt="" title="Мои друзья">
              </a>
              <a href="/my_private_office?parametr_enter=my_board" class="punct_menu{{ '_active' if parametr_enter=='my_board' }} mb-4">
                <img src="{{ url_for('static', filename='/img/icons/lk/desk' ~ ('_active' if parametr_enter=='my_board' else '') ~ '.svg') }}" alt="" title="Онлайн-доска">
              </a>
              <a href="/my_private_office?parametr_enter=my_files" class="punct_menu{{ '_active' if parametr_enter=='my_files' }} mb-4">
                <img src="{{ url_for('static', filename='/img/icons/lk/file' ~ ('_active' if parametr_enter=='my_files' else '') ~ '.svg') }}" alt="" title="Мои файлы">
              </a>
              <a href="/my_private_office?parametr_enter=calendar" class="punct_menu{{ '_active' if parametr_enter=='calendar' }} mb-4">
                <img src="{{ url_for('static', filename='/img/icons/lk/calendar' ~ ('_active' if parametr_enter=='calendar' else '') ~ '.svg') }}" alt="" title="Мой календарь">
              </a>
                </div>
              </div>
              <!------- </div> --->
            </div>
            {%- if parametr_enter=='homeworks'%}
                {{my_homework(user)}}
            {%- elif parametr_enter=='my_board' %}
                {{board_add(user)}}
            {%- elif parametr_enter=='tasks_worksheet' %}
                {{query_of_tasks(user)}}
            {%- elif parametr_enter=='my_friends' %}
                {{classmates(user)}} 
            {%- elif parametr_enter=='profile_info' %}    
                {{profile_information(user)}}
            {%- elif parametr_enter=='calendar' %}    
                {{student_calendar(user)}}
            {%- elif parametr_enter=='uved' %}    
                {{uved_studient(user)}}
            {%- elif parametr_enter=='my_files' %}    
                {{my_files(user)}}
            {%- endif %}    
        </div>
    </div>
</section>
{% endblock %}