page bug again
This commit is contained in:
parent
c7b8888fb1
commit
8bab4817bb
|
@ -168,8 +168,8 @@ def stringtranslate(request):
|
|||
|
||||
@login_required
|
||||
def shipList(request):
|
||||
page = int(request.GET.get('page', 1))
|
||||
page_size = int(request.GET.get('page_size', 50))
|
||||
page = request.GET.get('page', '')
|
||||
page_size = request.GET.get('page_size', '')
|
||||
startDate = request.GET.get('start_date', '')
|
||||
endDate = request.GET.get('end_date', '')
|
||||
billType = request.GET.get('bill_type', '')
|
||||
|
@ -182,6 +182,10 @@ def shipList(request):
|
|||
sort = request.GET.get('sort', 'date')
|
||||
# country = request.GET.get('country', None)
|
||||
qset = Ship.objects.all()
|
||||
if page == '':
|
||||
page = 1
|
||||
if page_size == '':
|
||||
page_size = 50
|
||||
if startDate != '':
|
||||
start_dt = datetime.strptime(startDate, '%Y-%m-%d')
|
||||
qset = qset.filter(date__gte=start_dt)
|
||||
|
|
Loading…
Reference in New Issue
Block a user