{% extends "base.html" %}

{% block title %}
	&raquo; DC Contracts &raquo; {{contract.name}} &raquo; HH Data Imports &raquo;
 	{{process.id}}
{% endblock %}

{% block nav %}
	<a href="/e/dc_contracts">DC Contracts</a> &raquo;
	<a href="/e/dc_contracts/{{contract.id}}">{{contract.name}}</a> &raquo;
	<a href="/e/dc_contracts/{{contract.id}}/hh_imports">HH Data Imports</a> &raquo;
	{{process.id}}
{% endblock %}

{% block content %}

	{% if process.is_alive() %}
		<p>
			Running.
			{% if process.converter %}	
				Reached line number {{process.converter.line_number}}.
			{% endif %}
		</p>
	{% elif process.error is none %}
		<p>The import has completed successfully.</p>
	{% else %}
		<p>The import failed. {{process.error}}</p>
	{% endif %}
	
	<ul>
		{% for message in process.messages %}
			<li>{{message}}</li>
		{% endfor %}
	</ul>

{% endblock %}
