edit event start
This commit is contained in:
parent
860453a8d0
commit
c1a71565f7
103
fowl/game/templates/edit_event.html
Normal file
103
fowl/game/templates/edit_event.html
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% block content %}
|
||||||
|
<form class="well form-inline">
|
||||||
|
<label>Show Name</label>
|
||||||
|
<input type="text" class="span3" placeholder="RAW/Smackdown/PPV Name">
|
||||||
|
<label>Date</label>
|
||||||
|
<input type="text" class="span3" placeholder="YYYY-MM-DD">
|
||||||
|
<!-- match -->
|
||||||
|
<hr>
|
||||||
|
<h4>Match #1</h4>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th> </th>
|
||||||
|
<th>member #1</th>
|
||||||
|
<th>member #2</th>
|
||||||
|
<th>member #3</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>team #1</th>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>team #2</th>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>team #3</th>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<label>Winner</label>
|
||||||
|
<input type="text" class="span3">
|
||||||
|
<label>Win Type</label>
|
||||||
|
<select>
|
||||||
|
<option>Pin</option>
|
||||||
|
<option>Submission</option>
|
||||||
|
<option>Disqualification</option>
|
||||||
|
</select>
|
||||||
|
<button class="btn">Add Team</button>
|
||||||
|
<button class="btn">Add Member</button>
|
||||||
|
<button class="btn btn-danger">Delete Match</button>
|
||||||
|
<!-- /match -->
|
||||||
|
<!-- match -->
|
||||||
|
<hr>
|
||||||
|
<h4>Match #2</h4>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th> </th>
|
||||||
|
<th>member #1</th>
|
||||||
|
<th>member #2</th>
|
||||||
|
<th>member #3</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>team #1</th>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>team #2</th>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>team #3</th>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
<td><input type="text" class="span3"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<label>Winner</label>
|
||||||
|
<input type="text" class="span3">
|
||||||
|
<label>Win Type</label>
|
||||||
|
<select>
|
||||||
|
<option>Pin</option>
|
||||||
|
<option>Submission</option>
|
||||||
|
<option>Disqualification</option>
|
||||||
|
</select>
|
||||||
|
<button class="btn">Add Team</button>
|
||||||
|
<button class="btn">Add Member</button>
|
||||||
|
<button class="btn btn-danger">Delete Match</button>
|
||||||
|
<!-- /match -->
|
||||||
|
<div>
|
||||||
|
<button class="btn">Add Match</button>
|
||||||
|
<button class="btn btn-primary">Save</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
@ -2,5 +2,6 @@ from django.conf.urls import patterns, include, url
|
|||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
url(r'^events/$', 'fowl.game.views.events'),
|
url(r'^events/$', 'fowl.game.views.events'),
|
||||||
|
url(r'^edit_event/$', 'fowl.game.views.edit_event'),
|
||||||
url(r'^stables/$', 'fowl.game.views.stables'),
|
url(r'^stables/$', 'fowl.game.views.stables'),
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render, get_object_or_404
|
||||||
from fowl.game.models import TeamPoints
|
from fowl.game.models import TeamPoints
|
||||||
|
|
||||||
|
|
||||||
@ -19,6 +19,14 @@ def events(request):
|
|||||||
events[event_id].scores[tp.team.name] += tp.points
|
events[event_id].scores[tp.team.name] += tp.points
|
||||||
return render(request, "events.html", {'events': events})
|
return render(request, "events.html", {'events': events})
|
||||||
|
|
||||||
|
def edit_event(request, event_id=None):
|
||||||
|
if event_id:
|
||||||
|
event = get_object_or_404(Event, pk=event_id)
|
||||||
|
else:
|
||||||
|
event = None
|
||||||
|
if request.method == 'GET':
|
||||||
|
return render(request, "edit_event.html", {"event": event})
|
||||||
|
|
||||||
|
|
||||||
def stables(request):
|
def stables(request):
|
||||||
return render(request, "stables.html")
|
return render(request, "stables.html")
|
||||||
|
Loading…
Reference in New Issue
Block a user