'django display the records inside folders
So, here i have records on my django website where i list the records so all theses records belong to different categories currently i have my them displayed like this but i want them to be listed inside the folders named after categories that means the all the records should be grouped based on categories and should reside inside the folders that belongs that particular folder.
views.py
class RecordListAPIView(ListAPIView):
serializer_class = ""
permission_classes = ""
queryset = Model.objects.all()
ordering = ""
ordering_param = ""
ordering_fields = (
)
def get_total_queryset(self):
if self.request.user:
return Model.objects_with_cat.all()
return Model.objects.all()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|