Add a /app/templates/users/profile.html
parent
cb0c689fe9
commit
468d17c1bc
1 changed files with 12 additions and 3 deletions
|
|
@ -327,8 +327,8 @@ Jinja is integrated within Flask. One of the great features of Jinja is the inhe
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="content">{% block content %}{% endblock%}</div>
|
<div id="content">{% block content %}{% endblock %}</div>
|
||||||
<div id="footer">{% block footer %}{% endblock%}</div>
|
<div id="footer">{% block footer %}{% endblock %}</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|
@ -387,6 +387,15 @@ Those templates will use a macro to automate the construction of html fields. Th
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Finally, a simple `/app/templates/users/profile.html`:
|
||||||
|
|
||||||
|
```jinja
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block content %}
|
||||||
|
Hi {{ user.name }}!
|
||||||
|
{% endblock %}
|
||||||
|
```
|
||||||
|
|
||||||
## Setting up the app
|
## Setting up the app
|
||||||
|
|
||||||
Here is the `/app/__init__.py` :
|
Here is the `/app/__init__.py` :
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue