Skip to content

Instantly share code, notes, and snippets.

@glinesbdev
Last active November 10, 2015 19:26
Show Gist options
  • Select an option

  • Save glinesbdev/ed1b03458d5cfc5f936a to your computer and use it in GitHub Desktop.

Select an option

Save glinesbdev/ed1b03458d5cfc5f936a to your computer and use it in GitHub Desktop.
Django Template
{% extends "layout.html" %}
{% block title %}
<div class="row">
<h1>Overview for {{ user.username }}!</h1>
</div>
{% endblock title %}
{% block content %}
<div class="well col-md-6">
{% include "tictactoe/game-list-snippet.html" with header="Games waiting for your move" games_list=waiting_games %}
{% include "tictactoe/game-list-snippet.html" with header="Other active games" games_list=other_games %}
{% include "tictactoe/game-list-snippet.html" with header="Games waiting for your move" games_list=finished_games %}
</div>
<div class="well col-sm-4 col-sm-push-1">
{% if invitations %}
<h3 class="panel-header">Open invitations</h3>
<div class="list-group">
{% for invite in invitations %}
<a href="{% url 'tictactoe_accept_invitation' pk=invite.id %}" class="list-group-item">
{{ invite.from_user.username }} has invited you to a game. Click here to view.
</a>
{% endfor %}
</div>
{% endif %}
<a href="{% url 'tictactoe_invite' %}">Invite another user to play a game</a>
</div>
{% endblock content %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment