modified for EURO 2016
This commit is contained in:
@@ -40,7 +40,32 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<ul class="pager">
|
<ul class="pager">
|
||||||
<li data-toggle="tooltip" title="{% trans 'previous' %}" class="previous"><a href="/matchday/{{ ls }}/{{ season }}/{{ cur_md|add:"-1"|stringformat:"02i" }}"><span aria-hidden="true">←</span></a></li>
|
<li data-toggle="tooltip" title="{% trans 'previous' %}" class="previous"><a href="/matchday/{{ ls }}/{{ season }}/{{ cur_md|add:"-1"|stringformat:"02i" }}"><span aria-hidden="true">←</span></a></li>
|
||||||
{{ cur_md }}. Spieltag
|
{% if ls == "em2016" %}
|
||||||
|
{% if cur_md == "01" %}
|
||||||
|
Gruppe A
|
||||||
|
{% elif cur_md == "02" %}
|
||||||
|
Gruppe B
|
||||||
|
{% elif cur_md == "03" %}
|
||||||
|
Gruppe C
|
||||||
|
{% elif cur_md == "04" %}
|
||||||
|
Gruppe D
|
||||||
|
{% elif cur_md == "05" %}
|
||||||
|
Gruppe E
|
||||||
|
{% elif cur_md == "06" %}
|
||||||
|
Gruppe F
|
||||||
|
{% elif cur_md == "07" %}
|
||||||
|
Achtelfinale
|
||||||
|
{% elif cur_md == "08" %}
|
||||||
|
Viertelfinale
|
||||||
|
{% elif cur_md == "09" %}
|
||||||
|
Halbfinale
|
||||||
|
{% elif cur_md == "10" %}
|
||||||
|
Finale
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{{ cur_md }}. Spieltag
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<li data-toggle="tooltip" title="{% trans 'next' %}" class="next"><a href="/matchday/{{ ls }}/{{ season }}/{{ cur_md|add:"1"|stringformat:"02i" }}"><span aria-hidden="true">→</span></a></li>
|
<li data-toggle="tooltip" title="{% trans 'next' %}" class="next"><a href="/matchday/{{ ls }}/{{ season }}/{{ cur_md|add:"1"|stringformat:"02i" }}"><span aria-hidden="true">→</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@@ -283,11 +283,18 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
|
|||||||
for m in mandants:
|
for m in mandants:
|
||||||
rs = RelUserMandant.objects.filter(mandant=m)
|
rs = RelUserMandant.objects.filter(mandant=m)
|
||||||
for r in rs:
|
for r in rs:
|
||||||
tipp_mates.append({
|
"""filter duplicates """
|
||||||
'mate': r.user,
|
d = False
|
||||||
'tipps': [],
|
for item in tipp_mates:
|
||||||
'sum_score': 0
|
if r.user.first_name == item['mate']:
|
||||||
})
|
d = True
|
||||||
|
|
||||||
|
if d is False:
|
||||||
|
tipp_mates.append({
|
||||||
|
'mate': r.user.first_name,
|
||||||
|
'tipps': [],
|
||||||
|
'sum_score': 0
|
||||||
|
})
|
||||||
|
|
||||||
matches = []
|
matches = []
|
||||||
for match in md_matches:
|
for match in md_matches:
|
||||||
@@ -393,7 +400,7 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
|
|||||||
posts.append( (post, avatar) )
|
posts.append( (post, avatar) )
|
||||||
|
|
||||||
return render(request, 'md.html', {
|
return render(request, 'md.html', {
|
||||||
#'debug': debug,
|
'debug': debug,
|
||||||
#'mds_season': mds_in_season,
|
#'mds_season': mds_in_season,
|
||||||
'cur_md': matchday,
|
'cur_md': matchday,
|
||||||
'matches': matches,
|
'matches': matches,
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ MEDIA_URL = '/media/'
|
|||||||
# Don't put anything in this directory yourself; store your static files
|
# Don't put anything in this directory yourself; store your static files
|
||||||
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
||||||
# Example: "/home/media/media.lawrence.com/static/"
|
# Example: "/home/media/media.lawrence.com/static/"
|
||||||
STATIC_ROOT = '/home/martin/Entwicklung/tippy/TipPy/static/'
|
STATIC_ROOT = '/home/martin/dev/tippy/TipPy/static/'
|
||||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
|
||||||
|
|
||||||
# URL prefix for static files.
|
# URL prefix for static files.
|
||||||
@@ -85,7 +85,7 @@ STATICFILES_DIRS = (
|
|||||||
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
||||||
# Always use forward slashes, even on Windows.
|
# Always use forward slashes, even on Windows.
|
||||||
# Don't forget to use absolute paths, not relative paths.
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
'/home/martin/Entwicklung/tippy/TipPy/tippy/static',
|
'/home/martin/dev/tippy/TipPy/tippy/static',
|
||||||
)
|
)
|
||||||
|
|
||||||
# List of finder classes that know how to find static files in
|
# List of finder classes that know how to find static files in
|
||||||
|
|||||||
Reference in New Issue
Block a user