- getSeason() only for staff members
- new view staff() - updated bootstrap to version 3.4.1 - updated jquery to 3.6.3 - changed container layout in main view 'matchday'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Copyright (c) 2015-2016 by Martin Bley (martin@mb-oss.de)
|
||||
Copyright (c) 2015-2016 by Martin Bley (dev@mb-oss.de)
|
||||
|
||||
This file is part of TipPy.
|
||||
|
||||
@@ -18,23 +18,25 @@ You should have received a copy of the GNU General Public License
|
||||
along with TipPy. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""
|
||||
import os
|
||||
from os.path import join as pjoin
|
||||
|
||||
import django.shortcuts
|
||||
import pytz
|
||||
from PIL import Image as PImage
|
||||
from django.conf import settings
|
||||
from django.contrib.admin.views.decorators import staff_member_required
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.core.paginator import Paginator, EmptyPage, \
|
||||
PageNotAnInteger
|
||||
from django.db.models import Sum
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.utils import timezone
|
||||
from django.db.models import Sum
|
||||
from django.conf import settings
|
||||
from os.path import join as pjoin
|
||||
from tipp.models import *
|
||||
|
||||
from tipp.forms import *
|
||||
from tipp.models import *
|
||||
from tipp.openliga import *
|
||||
from datetime import datetime
|
||||
from PIL import Image as PImage
|
||||
import pytz
|
||||
import os
|
||||
|
||||
timezoneLocal = pytz.timezone('Europe/Berlin')
|
||||
|
||||
@@ -139,8 +141,16 @@ def profile(request, pk):
|
||||
'img': img}
|
||||
)
|
||||
|
||||
@staff_member_required
|
||||
def staff(request):
|
||||
season = get_current_season(),
|
||||
""" get available competitions """
|
||||
competitions = Competition.objects.filter(season=season).order_by('leagueName')
|
||||
|
||||
@login_required
|
||||
return django.shortcuts.render(request, 'staff.html', {'competitions': competitions})
|
||||
|
||||
|
||||
@staff_member_required
|
||||
def getSeason(request, ls, season):
|
||||
ol = OpenLiga()
|
||||
teams = ol.getTeams(str(season), ls)
|
||||
@@ -306,6 +316,7 @@ def update(request, ls, season, cur_md):
|
||||
|
||||
@login_required
|
||||
def matchday(request, ls, season, matchday, template_name='md.html'):
|
||||
update(request, ls, season, matchday)
|
||||
debug = ''
|
||||
debug += "Debugging: "
|
||||
has_refresh = True
|
||||
|
||||
Reference in New Issue
Block a user