Skip to content

Commit

Permalink
fix home template
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmdlt committed Aug 15, 2024
1 parent af40106 commit 1b74863
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ prod:
poetry run gunicorn --workers=4 --bind 0.0.0.0:$(PORT) example:app --log-file -

compose-production-run-app:
docker compose -p python_page_analyzer_ru-production -f docker-compose.production.yml down
docker compose -p python_page_analyzer_ru-production -f docker-compose.production.yml build
docker compose -p python_page_analyzer_ru-production -f docker-compose.production.yml up
docker compose -p python_page_analyzer_ru-production down
docker compose -p python_page_analyzer_ru-production build
docker compose -p python_page_analyzer_ru-production up
2 changes: 1 addition & 1 deletion example.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@app.route('/')
def index():
return 'Welcome to Flask!'
return render_template('home.html')


@app.route('/users/')
Expand Down
16 changes: 16 additions & 0 deletions templates/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Flask проект</title>
</head>
<h1>Эталонный проект по курсу Flask</h1>
<body>
<div id="sidebar">
{% block sidebar %}
<ul>
<li><a href="{{ url_for('users_get') }}">Пользователи</a></li>
</ul>
{% endblock %}
</div>
</body>
</html>

0 comments on commit 1b74863

Please sign in to comment.