Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDE
nk20
Commits
06c97d75
Commit
06c97d75
authored
5 years ago
by
ynerant
Browse files
Options
Downloads
Patches
Plain Diff
Logs are decreasing ordered
parent
f082f852
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!56
Corrections
Pipeline
#7909
passed with stages
in 4 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/api/urls.py
+1
-0
1 addition, 0 deletions
apps/api/urls.py
apps/logs/api/views.py
+5
-2
5 additions, 2 deletions
apps/logs/api/views.py
with
6 additions
and
2 deletions
apps/api/urls.py
+
1
−
0
View file @
06c97d75
...
...
@@ -27,6 +27,7 @@ class UserSerializer(serializers.ModelSerializer):
'
user_permissions
'
,
)
class
ContentTypeSerializer
(
serializers
.
ModelSerializer
):
"""
REST API Serializer for Users.
...
...
This diff is collapsed.
Click to expand it.
apps/logs/api/views.py
+
5
−
2
View file @
06c97d75
...
...
@@ -3,6 +3,7 @@
from
django_filters.rest_framework
import
DjangoFilterBackend
from
rest_framework
import
viewsets
from
rest_framework.filters
import
OrderingFilter
from
.serializers
import
ChangelogSerializer
from
..models
import
Changelog
...
...
@@ -16,5 +17,7 @@ class ChangelogViewSet(viewsets.ReadOnlyModelViewSet):
"""
queryset
=
Changelog
.
objects
.
all
()
serializer_class
=
ChangelogSerializer
filter_backends
=
[
DjangoFilterBackend
]
filterset_fields
=
[
'
model
'
,
'
action
'
,
"
instance_pk
"
,
'
user
'
,
'
ip
'
,]
filter_backends
=
[
DjangoFilterBackend
,
OrderingFilter
]
filterset_fields
=
[
'
model
'
,
'
action
'
,
"
instance_pk
"
,
'
user
'
,
'
ip
'
,
]
ordering_fields
=
[
'
timestamp
'
,
]
ordering
=
[
'
-timestamp
'
,
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment