Python for Finance: Analyze Big Financial Data

(Elle) #1
Figure 14-8. Screenshot of Tradechat registration page

The templating code for the login page, as shown in Example 14-5, is pretty similar to the


code for the registration page. Again, the user can provide login information via a form.


Example 14-5. Template for Tradechat user login


{% extends “layout.html” %}
{% block body %}


Login


{% if error %}

Error: {{ error }}{% endif %}



Username

Password




{% endblock %}

The login page, as shown in Figure 14-9, not only looks pretty similar to the registration


page but also provides mainly the same functionality.

Free download pdf