~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlmaps/views.py

  • Committer: kaputtnik
  • Date: 2019-03-31 11:08:21 UTC
  • mto: This revision was merged to the branch mainline in revision 531.
  • Revision ID: kaputtnik-20190331110821-1o6c8ebh1sag7xat
mv main files into mainpage directory; apply needed changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
from django.contrib.auth.decorators import login_required
8
8
from django.http import HttpResponseRedirect, HttpResponseNotAllowed, HttpResponse, HttpResponseBadRequest
9
9
from django.urls import reverse
 
10
from django.conf import settings
10
11
import models
11
 
from settings import MAPS_PER_PAGE
12
 
from wl_utils import get_real_ip
 
12
 
 
13
from mainpage.wl_utils import get_real_ip
13
14
import os
14
15
 
15
16
 
20
21
    maps = models.Map.objects.all()
21
22
    return render(request, 'wlmaps/index.html',
22
23
                              {'maps': maps,
23
 
                               'maps_per_page': MAPS_PER_PAGE,
 
24
                               'maps_per_page': settings.MAPS_PER_PAGE,
24
25
                               })
25
26
 
26
27