Started lineup page
This commit is contained in:
@@ -36,6 +36,7 @@ INSTALLED_APPS = [
|
|||||||
'teams.apps.TeamsConfig',
|
'teams.apps.TeamsConfig',
|
||||||
'venues.apps.VenuesConfig',
|
'venues.apps.VenuesConfig',
|
||||||
'players.apps.PlayersConfig',
|
'players.apps.PlayersConfig',
|
||||||
|
'lineups.apps.LineupsConfig',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
|
|||||||
@@ -26,5 +26,6 @@ urlpatterns = [
|
|||||||
path('events/', include('events.urls')),
|
path('events/', include('events.urls')),
|
||||||
path('teams/', include('teams.urls')),
|
path('teams/', include('teams.urls')),
|
||||||
path('venues/', include('venues.urls')),
|
path('venues/', include('venues.urls')),
|
||||||
path('players/', include('players.urls'))
|
path('players/', include('players.urls')),
|
||||||
|
path('lineups/', include('lineups.urls'))
|
||||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
|
{% extends 'base.html' %}{% block title %} {{ title }} {% endblock %}{% block content %}
|
||||||
{% extends 'base.html' %}
|
|
||||||
|
|
||||||
{% block title %} {{ title }} {% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
<ol class="list-group">
|
<ol class="list-group">
|
||||||
@@ -13,7 +8,7 @@
|
|||||||
{{ event.start|date:"l, F j, Y g:i A" }} <br>
|
{{ event.start|date:"l, F j, Y g:i A" }} <br>
|
||||||
{{ event.venue.name }} <br>
|
{{ event.venue.name }} <br>
|
||||||
<a class="btn btn-primary btn-sm" href="{% url 'edit event' event.id%}" role="button">Edit Event Details</a>
|
<a class="btn btn-primary btn-sm" href="{% url 'edit event' event.id%}" role="button">Edit Event Details</a>
|
||||||
<a class="btn btn-primary btn-sm" href="#" role="button">Edit Lineup</a>
|
<a class="btn btn-primary btn-sm" href="{% url 'edit lineup' event.id%}" role="button">Edit Lineup</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ def edit(request, id=0):
|
|||||||
# ...
|
# ...
|
||||||
# redirect to a new URL:
|
# redirect to a new URL:
|
||||||
new_event, did_create = Event.objects.update_or_create(pk=id, defaults=form.cleaned_data)
|
new_event, did_create = Event.objects.update_or_create(pk=id, defaults=form.cleaned_data)
|
||||||
return render(request, 'success.html', {'call_back':'players list'})
|
return render(request, 'success.html', {'call_back':'schedule'})
|
||||||
|
|
||||||
# if a GET (or any other method) we'll create a blank form
|
# if a GET (or any other method) we'll create a blank form
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user