Background Image
Table of Contents Table of Contents
Previous Page  355 / 478 Next Page
Information
Show Menu
Previous Page 355 / 478 Next Page
Page Background

selenium.common.exceptions.NoSuchElementException: Message: 'Unable to locate

element: {"method":"link text","selector":"Reticulate splines"}' ; Stacktrace:

Another Pass, Outside-In

At each stage, we still let the FT drive what development we do.

Starting again at the outside layer, in the template, we begin to write the template code

we’d like to use to get the “My Lists” page to work the way we want it to. As we do so,

we start to specify the API we want from the code at the layers below.

A Quick Restructure of the Template Inheritance Hierarchy

Currently there’s no place in our base template for us to put any new content. Also, the

“My Lists” page doesn’t need the new item form, sowe’ll put that into a block too, making

it optional:

lists/templates/base.html (ch18l007-1).

<div

class=

"text-center"

>

<h1>

{% block header_text %}{% endblock %}

</h1>

{% block list_form %}

<form

method=

"POST"

action=

"{% block form_action %}{% endblock %}"

>

{{ form.text }}

{% csrf_token %}

{% if form.errors %}

<div

class=

"form-group has-error"

>

<div

class=

"help-block"

>

{{ form.text.errors }}

</div>

</div>

{% endif %}

</form>

{% endblock %}

</div>

lists/templates/base.html (ch18l007-2).

<div

class=

"row"

>

<div

class=

"col-md-6 col-md-offset-3"

>

{% block table %}

{% endblock %}

</div>

</div>

<div

class=

"row"

>

<div

class=

"col-md-6 col-md-offset-3"

>

{% block extra_content %}

{% endblock %}

</div>

</div>

</div>

Another Pass, Outside-In

|

327