mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-04-27 18:21:23 +08:00
Add in requested changes
This commit is contained in:
parent
d81319c8ec
commit
844113d44f
7 changed files with 54 additions and 25 deletions
|
@ -8,4 +8,4 @@ from .models import Document
|
|||
class DocumentAdmin(ModelAdmin):
|
||||
model = Document
|
||||
search_fields = ["id", "name", "document_type"]
|
||||
list_display = ["id", "name", "document_type"]
|
||||
list_display = ["id", "name", "document_type", "date_uploaded"]
|
||||
|
|
|
@ -51,7 +51,7 @@ class DocumentListView(generics.ListAPIView):
|
|||
|
||||
http_method_names = ["get"]
|
||||
serializer_class = DocumentSerializer
|
||||
queryset = Document.objects.all()
|
||||
queryset = Document.objects.all().order_by("-date_uploaded")
|
||||
pagination_class = PageNumberPagination
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue