Compare commits

..

No commits in common. "b7311f230812038a8e2c144a4e740c6f5f6bccaa" and "faea970affcb7b13fd6b461cf946db77935566f6" have entirely different histories.

8 changed files with 62 additions and 111 deletions

View File

@ -1,12 +1,6 @@
{% extends "base.html" %} <h2>#{{ issue.id }}: {{ issue.title }}</h2>
<p>
{% block title %}Issue: {{ issue.title }}{% endblock %}
{% block content %}
<h2>#{{ issue.id }}: {{ issue.title }}</h2>
<p>
<b>Project:</b> {{ issue.project }}<br/> <b>Project:</b> {{ issue.project }}<br/>
<b>Created:</b> {{ issue.create_date }} <b>Created:</b> {{ issue.create_date }}
</p> </p>
<p>{{ issue.text }}</p> <p>{{ issue.text }}</p>
{% endblock %}

View File

@ -1,9 +1,4 @@
{% extends "base.html" %} {% if issue_list %}
{% block title %}Issues{% endblock %}
{% block content %}
{% if issue_list %}
<ul> <ul>
{% for issue in issue_list %} {% for issue in issue_list %}
<li> <li>
@ -11,9 +6,8 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
<p>No issues.</p> <p>No issues.</p>
{% endif %} {% endif %}
<p><a href="{% url 'issues:new' %}">Create new issue</a></p> <p><a href="{% url 'issues:new' %}">Create new issue</a></p>
{% endblock %}

View File

@ -1,13 +1,8 @@
{% extends "base.html" %} <h2>Create new issue</h2>
{% block title %}Create issue{% endblock %} {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
{% block content %} <form action="{% url 'issues:new' %}" method="post">
<h2>Create new issue</h2>
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
<form action="{% url 'issues:new' %}" method="post">
{% csrf_token %} {% csrf_token %}
<table> <table>
{{ form.as_table }} {{ form.as_table }}
@ -17,5 +12,4 @@
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>
{% endblock %}

View File

@ -1,9 +1,4 @@
{% extends "base.html" %} {% if project_list %}
{% block title %}Projects{% endblock %}
{% block content %}
{% if project_list %}
<ul> <ul>
{% for project in project_list %} {% for project in project_list %}
<li> <li>
@ -11,7 +6,6 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
<p>No projects.</p> <p>No projects.</p>
{% endif %} {% endif %}
{% endblock %}

View File

@ -1,13 +1,8 @@
{% extends "base.html" %} <h2>{{ project.project_key }} - {{ project.name }}</h2>
<p>{{ project.description }}</p>
{% block title %}Project: {{ project.name }}{% endblock %} <h3>Issues</h3>
{% if issue_list %}
{% block content %}
<h2>{{ project.project_key }} - {{ project.name }}</h2>
<p>{{ project.description }}</p>
<h3>Issues</h3>
{% if issue_list %}
<ul> <ul>
{% for issue in issue_list %} {% for issue in issue_list %}
<li> <li>
@ -15,7 +10,6 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
<p>This project has no issues yet.</p> <p>This project has no issues yet.</p>
{% endif %} {% endif %}
{% endblock %}

View File

@ -1,12 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% block title %}Tofu{% endblock %} - Tofu</title>
</head>
<body>
<h1>Tofu</h1>
{% block content %}No content.{% endblock %}
</body>
</html>

View File

@ -1,13 +1,7 @@
{% extends "base.html" %} <h2>Login</h2>
{% block title %}Login{% endblock %} <form method="POST">
{% block content %}
<h2>Login</h2>
<form method="POST">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form.as_p }}
<button type="submit">Login</button> <button type="submit">Login</button>
</form> </form>
{% endblock %}

View File

@ -126,6 +126,5 @@ STATIC_URL = '/static/'
# Other settings # Other settings
LOGIN_URL = '/account/login/'
LOGIN_REDIRECT_URL = '/projects/' LOGIN_REDIRECT_URL = '/projects/'
LOGOUT_REDIRECT_URL = '/account/login/' LOGOUT_REDIRECT_URL = '/account/login/'