Python for Finance: Analyze Big Financial Data

(Elle) #1
Figure 14-7. Screenshot of “empty” home page of Tradechat

Example 14-4 provides the templating code for the user registration page. Here, forms are


used to allow users to provide information to the page via the POST method.


Example 14-4. Template for Tradechat user registration


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


Register


{% if error %}

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



Username

Password




{% endblock %}

Figure 14-8 shows a screenshot of the registration page.

Free download pdf