Created
October 22, 2020 13:04
-
-
Save joeld1/20480287f86f1b70ea4842a07fe0aa28 to your computer and use it in GitHub Desktop.
Pluralsight - Django Templates Course - Ticketing App Templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Ticketing App - {% block title %} {% endblock %}</title> | |
</head> | |
<body> | |
<nav> | |
<a href="/">Home</a> | |
<a href="/tickets">View Tickets</a> | |
<a href="/submit">New Ticket</a> | |
</nav> | |
{% block content %}{% endblock %} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "applayout.html" %} | |
{% block title %} | |
Home | |
{% endblock %} | |
{% block content %} | |
<h1>Welcome to the ticketing project</h1> | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "applayout.html" %} | |
{% block title %} | |
Tickets | |
{% block content %} | |
<div class="tickets"> | |
{% for ticket in tickets %} | |
<div class="ticket"> | |
<h3>Ticket {{ ticket.pk }}</h3> | |
<div class="info"> | |
Submitted by <strong>{{ ticket.submitter }}</strong> | |
on <strong>{{ ticket.created_at }}</strong> | |
</div> | |
<h4>Description:</h4> | |
<div class="body">{{ ticket.body }}</div> | |
<a class="viewticket" href="{% url 'ticket' ticket.pk %}">View this ticket</a> | |
</div> | |
{% endfor %} | |
</div> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment