{% extends 'djangomaster/_single_col.html' %}
{% load i18n %}
{% load url from future %}

{% block page_title %}Django Master{% endblock %}

{% block content %}

    <h2 id="requirements" class="content-subhead">requirements.txt</h2>
    {% if object.requirements.BASE_DIR_ERROR %}
        <div>
            <small>
                {% blocktrans with base_dir_name=settings.BASE_DIR_NAME %}Define the settings.{{base_dir_name}} variable, then it will be possible to locate the requirements.txt file.{% endblocktrans %}<br />
                {% blocktrans %}Add the following in your settings.py:{% endblocktrans %}<br />
                <code>BASE_DIR = os.path.dirname(os.path.abspath(__file__))</code> <br />

                {% blocktrans %}You can define which variable will be used by changing `settings.DJANGOMASTER_BASE_DIR`.{% endblocktrans %}
            </small>
        </div>
    {% elif object.requirements.REQUIREMENTS_ERROR %}
        <div>
            <small>
                {% blocktrans with path=object.requirements.path %}Could not find a file in {{path}}.{% endblocktrans %}<br />
            </small>
        </div>
    {% else %}
        <div class="pure-form">
            <textarea rows="10" readonly='readonly' style="width: 100%; resize: none">{{ object.requirements.content }}</textarea>
        </div>
    {% endif %}


{% endblock %}

