mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 21:27:49 +02:00
More work on the UI
This commit is contained in:
@@ -2,14 +2,16 @@ from django.views import View
|
||||
from django.shortcuts import render
|
||||
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
||||
|
||||
from portal.utils import get_site_conf
|
||||
from roster.models import RollingStock, RollingStockImage
|
||||
|
||||
|
||||
class GetHome(View):
|
||||
def get(self, request, page=1):
|
||||
site_conf = get_site_conf()
|
||||
rolling_stock = RollingStock.objects.all()
|
||||
thumbnails = RollingStockImage.objects.filter(is_thumbnail=True)
|
||||
paginator = Paginator(rolling_stock, 6)
|
||||
paginator = Paginator(rolling_stock, site_conf.items_per_page)
|
||||
|
||||
try:
|
||||
rolling_stock = paginator.page(page)
|
||||
|
Reference in New Issue
Block a user