Exemple #1
0
def loadmobiles(request):
    user = request.COOKIES.get('username')
    mobiles = Mobiles.objects.all()
    mobiles = make_ratings(mobiles)

    params = {"user": user, "mobiles": mobiles}

    return render(request, 'GRSapp/loadMobiles.html', params)
Exemple #2
0
def loadmobiles(request):
    user = request.COOKIES.get('username')
    if UsersModal.objects.filter(username=user):
        user = UsersModal.objects.get(username=user)
    mobiles = Mobiles.objects.all().order_by('-rating')
    mobiles = make_ratings(mobiles)
    params = {"user": user, "mobiles": mobiles}
    return render(request, 'GRSapp/loadMobiles.html', params)
Exemple #3
0
def loadlaptops(request):
    user = request.COOKIES.get('username')
    if UsersModal.objects.filter(username=user):
        user = UsersModal.objects.get(username=user)
    laptops = Laptops.objects.all().order_by('-rating')
    laptops = make_ratings(laptops)
    params = {"user": user, "laptops": laptops}
    return render(request, 'GRSapp/loadLaptops.html', params)
Exemple #4
0
def loadfridges(request):
    user = request.COOKIES.get('username')
    if UsersModal.objects.filter(username=user):
        user = UsersModal.objects.get(username=user)
    fridges = Refrigerator.objects.all().order_by('-rating')
    fridges = make_ratings(fridges)
    params = {"user": user, "fridges": fridges}
    return render(request, 'GRSapp/loadFridges.html', params)
Exemple #5
0
def loadtelevisions(request):
    user = request.COOKIES.get('username')
    if UsersModal.objects.filter(username=user):
        user = UsersModal.objects.get(username=user)
    televisions = Television.objects.all().order_by('-rating')
    televisions = make_ratings(televisions)
    params = {"user": user, "televisions": televisions}
    return render(request, 'GRSapp/loadTelevisions.html', params)
Exemple #6
0
def loadwashmachines(request):
    user = request.COOKIES.get('username')
    if UsersModal.objects.filter(username=user):
        user = UsersModal.objects.get(username=user)
    wms = WashingMachine.objects.all().order_by('-rating')
    wms = make_ratings(wms)
    params = {"user": user, "wms": wms}
    return render(request, 'GRSapp/loadWashmachines.html', params)
Exemple #7
0
def loadkettles(request):
    user = request.COOKIES.get('username')
    if UsersModal.objects.filter(username=user):
        user = UsersModal.objects.get(username=user)
    kettles = Kettle.objects.all().order_by('-rating')
    kettles = make_ratings(kettles)
    params = {"user": user, "kettles": kettles}
    return render(request, 'GRSapp/loadKettles.html', params)
Exemple #8
0
def loadpowerbanks(request):
    user = request.COOKIES.get('username')
    if UsersModal.objects.filter(username=user):
        user = UsersModal.objects.get(username=user)
    pbanks = Powerbank.objects.all().order_by('-rating')
    pbanks = make_ratings(pbanks)
    params = {"user": user, "pbanks": pbanks}
    return render(request, 'GRSapp/loadPowerbanks.html', params)
Exemple #9
0
def loadcameras(request):
    user = request.COOKIES.get('username')
    if UsersModal.objects.filter(username=user):
        user = UsersModal.objects.get(username=user)
    cameras = Camera.objects.all().order_by('-rating')
    cameras = make_ratings(cameras)
    params = {"user": user, "cameras": cameras}
    return render(request, 'GRSapp/loadCameras.html', params)
Exemple #10
0
def loadheadsets(request):
    user = request.COOKIES.get('username')
    if UsersModal.objects.filter(username=user):
        user = UsersModal.objects.get(username=user)
    headsets = HeadSet.objects.all().order_by('-rating')
    headsets = make_ratings(headsets)
    params = {"user": user, "headsets": headsets}
    return render(request, 'GRSapp/loadHeadsets.html', params)