modified for EURO 2016

This commit is contained in:
2016-06-10 17:36:02 +02:00
parent 4b2f7e4641
commit 538f6262fd
3 changed files with 41 additions and 9 deletions

View File

@@ -40,7 +40,32 @@
<nav>
<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">&larr;</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">&rarr;</span></a></li>
</ul>
</nav>

View File

@@ -283,11 +283,18 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
for m in mandants:
rs = RelUserMandant.objects.filter(mandant=m)
for r in rs:
tipp_mates.append({
'mate': r.user,
'tipps': [],
'sum_score': 0
})
"""filter duplicates """
d = False
for item in tipp_mates:
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 = []
for match in md_matches:
@@ -393,7 +400,7 @@ def matchday(request, ls, season, matchday, template_name='md.html'):
posts.append( (post, avatar) )
return render(request, 'md.html', {
#'debug': debug,
'debug': debug,
#'mds_season': mds_in_season,
'cur_md': matchday,
'matches': matches,

View File

@@ -73,7 +73,7 @@ MEDIA_URL = '/media/'
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# 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/')
# URL prefix for static files.
@@ -85,7 +85,7 @@ STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# 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