+ submit = SubmitField('Доступ')
+
+
diff --git a/WEB. HTML 2/server.py b/WEB. HTML 2/server.py
new file mode 100644
index 0000000..5b16af1
--- /dev/null
+++ b/WEB. HTML 2/server.py
@@ -0,0 +1,53 @@
+from flask import Flask, render_template, redirect
+from loginform import LoginForm
+
+
+app = Flask(__name__)
+app.config['SECRET_KEY'] = 'yandexlyceum_secret_key'
+
+
+@app.route('/')
+@app.route('/index')
+def index(label):
+ param = {'label': 'И на Марсе будут яблони цвести!', 'title': label}
+ return render_template('index.html', **param)
+
+
+@app.route('/training/')
+def training(prof):
+ param = {'title': "Тренировки в полёте", "spec": prof}
+ return render_template('training.html', **param)
+
+
+@app.route('/list_prof/')
+def list_prof(var):
+ param = {'title': "Список профессий", "var": var}
+ return render_template('list_prof.html', **param)
+
+
+@app.route('/answer')
+@app.route('/auto_answer')
+def answer():
+ param = {'title': "Анкета", 'surname': "Фёдоров", 'name': "Марк", 'education': "Среднее", 'profession': " Писатель",
+ 'sex': "Male", 'motivation': "Распространить хип-хоп в космос!", 'ready': "True"}
+ return render_template('auto_answer.html', **param)
+
+
+@app.route('/login', methods=['GET', 'POST'])
+def login():
+ param = {'title': "Аварийный доступ"}
+ form = LoginForm()
+ if form.validate_on_submit():
+ return redirect('/success')
+ return render_template('login.html', **param, form=form)
+
+
+@app.route('/distribution')
+def success():
+ param = {'title': "По каютам!", "users": ['Ридли Скотт', 'Энди Уир', 'Марк Уотни', "Венката Капур",
+ 'Тедди Сандерс', 'Шон Бин']}
+ return render_template('distribution.html', **param)
+
+
+if __name__ == '__main__':
+ app.run(port=8080, host='127.0.0.1')
diff --git a/WEB. HTML 2/static/css/style.css b/WEB. HTML 2/static/css/style.css
new file mode 100644
index 0000000..f38977b
--- /dev/null
+++ b/WEB. HTML 2/static/css/style.css
@@ -0,0 +1,7 @@
+h4.color_edit {
+ color: "black";
+}
+
+p.padmarging {
+ margin-left: 20px;
+}
\ No newline at end of file
diff --git a/WEB. HTML 2/static/img/kb1.jpg b/WEB. HTML 2/static/img/kb1.jpg
new file mode 100644
index 0000000..fe25a04
Binary files /dev/null and b/WEB. HTML 2/static/img/kb1.jpg differ
diff --git a/WEB. HTML 2/static/img/kb2.jpg b/WEB. HTML 2/static/img/kb2.jpg
new file mode 100644
index 0000000..ebf6e1a
Binary files /dev/null and b/WEB. HTML 2/static/img/kb2.jpg differ
diff --git a/WEB. HTML 2/static/img/mars_ico.png b/WEB. HTML 2/static/img/mars_ico.png
new file mode 100644
index 0000000..5f7fc2f
Binary files /dev/null and b/WEB. HTML 2/static/img/mars_ico.png differ
diff --git a/WEB. HTML 2/templates/auto_answer.html b/WEB. HTML 2/templates/auto_answer.html
new file mode 100644
index 0000000..3c9069b
--- /dev/null
+++ b/WEB. HTML 2/templates/auto_answer.html
@@ -0,0 +1,15 @@
+{% extends "base_two.html" %}
+
+{% block content1 %}
+
+
И на Марсе будут яблони цвести!
+
+
+
Фамилия: {{surname}}
+
Имя: {{name}}
+
Образование: {{education}}
+
Профессия: {{profession}}
+
Пол: {{sex}}
+
Мотивация: {{motivation}}
+
Готовы остаться на Марсе? {{ready}}
+{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/base.html b/WEB. HTML 2/templates/base.html
new file mode 100644
index 0000000..075e439
--- /dev/null
+++ b/WEB. HTML 2/templates/base.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{title}}
+
+
+
+
+
+
+
+ {% block content1 %}{% endblock %}
+
+
+
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/base_two.html b/WEB. HTML 2/templates/base_two.html
new file mode 100644
index 0000000..f4d32b4
--- /dev/null
+++ b/WEB. HTML 2/templates/base_two.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+
+{% block content1 %}
+
+
И на Марсе будут яблони цвести!
+
+
+ {% block content2 %}{% endblock %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/distribution.html b/WEB. HTML 2/templates/distribution.html
new file mode 100644
index 0000000..9327eaf
--- /dev/null
+++ b/WEB. HTML 2/templates/distribution.html
@@ -0,0 +1,8 @@
+{% extends "base_two.html" %}
+
+{% block content2 %}
+
Размещение по каютам
+ {% for user in users %}
+
{{ user }} - Каюта № {{ loop.index }} {% if loop.first %} - первый в очереди {% endif %}
+ {% endfor %}
+{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/index.html b/WEB. HTML 2/templates/index.html
new file mode 100644
index 0000000..f847176
--- /dev/null
+++ b/WEB. HTML 2/templates/index.html
@@ -0,0 +1,5 @@
+{% extends "base.html" %}
+
+{% block content1 %}
+
{{label}}
+{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/list_prof.html b/WEB. HTML 2/templates/list_prof.html
new file mode 100644
index 0000000..97739fe
--- /dev/null
+++ b/WEB. HTML 2/templates/list_prof.html
@@ -0,0 +1,27 @@
+{% extends "base_two.html" %}
+
+{% block content2 %}
+ {% set all_prof = ['врач', "экзобиолог", "климатолог", "астрогеолог", "гляциолог", "метеоролог",
+ 'инженер-исследователь', "пилот", "строитель", "инженер по терраформированию",
+ "специалист по радиационной защите", "инженер жизнеобеспечения", "оператор марсохода",
+ "киберинженер", "штурман", "пилот дронов"] %}
+ {% if var == "ol" %}
+
Список профессий
+
+
+ {% for p in all_prof %}
+
{{p}}
+ {% endfor %}
+
+
+ {% elif var == "ul" %}
+
Список профессий
+
+ {% for p in all_prof %}
+
{{p}}
+ {% endfor %}
+
+ {% else %}
+
Индекс указан неправильно!
+ {% endif %}
+{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/login.html b/WEB. HTML 2/templates/login.html
new file mode 100644
index 0000000..bb6ec1e
--- /dev/null
+++ b/WEB. HTML 2/templates/login.html
@@ -0,0 +1,45 @@
+{% extends "base_two.html" %}
+
+{% block content2 %}
+
Аварийный доступ
+
+{% endblock %}
\ No newline at end of file
diff --git a/WEB. HTML 2/templates/training.html b/WEB. HTML 2/templates/training.html
new file mode 100644
index 0000000..2f4b270
--- /dev/null
+++ b/WEB. HTML 2/templates/training.html
@@ -0,0 +1,17 @@
+{% extends "base_two.html" %}
+
+{% block content2 %}
+ {% set sin = ['врач', "экзобиолог", "климатолог", "астрогеолог", "гляциолог", "метеоролог"] %}
+ {% set inj = ['инженер-исследователь', "пилот", "строитель", "инженер по терраформированию",
+ "специалист по радиационной защите", "инженер жизнеобеспечения", "оператор марсохода",
+ "киберинженер", "штурман", "пилот дронов"] %}
+ {% if spec.lower() in sin %}
+
Научные симуляторы
+
+ {% elif spec.lower() in inj %}
+
Инженерные тренажеры
+
+ {% else %}
+
В наших списках ваша профессия отсутствует!
+ {% endif %}
+{% endblock %}
\ No newline at end of file