I need to use pagination to a Django list but I couldn't find any help online,, only old docs from Django version 1.3
here are my files :
views.py
def home(request):all_dress = Item.objects.all().filter(dress_active=True)all_good_dress = Item.objects.all().filter(dress_special=True)current_user = request.usercontext = {'all_dress': all_dress,'current_user': current_user,'all_good_dress':all_good_dress,}return render(request, 'fostania/home.html', context)
Template(html)
{% for item in all_dress %}<div class="card border-info" style="width: 18rem;"><a href="{% url 'dress_details' item.pk%}"><img class="card-img-top" src="{{ item.dress_image1.url }}" alt="Card image cap"></a><div class="card-body" align="right"><h5 class="card-title"><a href="{% url 'dress_details' item.pk%}">{{ item.dress_name }}</a><br>{{ item.dress_action }}<br>{{ item.dress_price }} جنيه </h5><p class="card-text">المقاس : {{ item.dress_size }}<br>{{ item.dress_city }}<br> {{ item.created_at|date:"SHORT_DATE_FORMAT" }}</p></div>
</div><br><br> {% endfor %}