{% extends "layout.html" %}

{% block content %}

<div class="container">
<div class="row">

<h3>McLab IDE</h3>

<table class="table">
  <tr><td>Project</td><td></td></tr>
  <form class="form-inline" method="post" action="/project/">
  <tr>
  <td> <input type="text" name="name" placeholder="New project..." /> </td>
  <td>
    <button name="create" type="submit" class="btn btn-xs btn-primary">
    Create <span class="glyphicon glyphicon-plus"></span>
    </button>
  </td>
  </form>
  {% for project in projects %}
  <tr>
  <td><a href="/project/{{ project.name }}">{{ project.name }}</a></td>
  <td>
  <form method="post" action="/project/{{ project.name }}/delete" >
    <button name="delete" type="submit" class="btn btn-xs btn-danger">
    Delete <span class="glyphicon glyphicon-trash"></span>
  </form>
  </td>
  </tr>
  {% endfor %}
</table>

</div>
</div>

{% endblock %}

{% extends "layout.html" %}

{% block content %}

<div class="container">
<div class="row">

<h3>McLab IDE</h3>

<table class="table">
  <tr><td>Project</td><td></td></tr>
  <form class="form-inline" method="post" action="{{ url_for('create_project') }}">
  <tr>
  <td> <input type="text" name="name" placeholder="New project..." /> </td>
  <td>
    <button name="create" type="submit" class="btn btn-xs btn-primary">
    Create <span class="glyphicon glyphicon-plus"></span>
    </button>
  </td>
  </form>
  {% for project in projects %}
  <tr>
    <td><a href="{{ url_for('project', project=project) }}">{{ project.name }}</a></td>
  <td>
    <form method="post" action="{{ url_for('delete', project=project) }}" >
    <button name="delete" type="submit" class="btn btn-xs btn-danger">
    Delete <span class="glyphicon glyphicon-trash"></span>
  </form>
  </td>
  </tr>
  {% endfor %}
</table>

</div>
</div>

{% endblock %}

Stop hardcording URLs in templates.
Stop hardcording URLs in templates.
