Skip to content

Commit

Permalink
Add list for users, slightly improved server/exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Manovich committed Feb 7, 2019
1 parent 090da2f commit 450c4c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions cvat/apps/engine/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,19 @@ class Meta:
write_only_fields = ('password', )

class ExceptionSerializer(serializers.Serializer):
task = serializers.IntegerField()
job = serializers.IntegerField()
message = serializers.CharField(max_length=1000)
system = serializers.CharField(max_length=255)
client = serializers.CharField(max_length=255)

task = serializers.IntegerField(allow_null=True)
job = serializers.IntegerField(allow_null=True)

message = serializers.CharField(max_length=4096)
filename = serializers.URLField()
line = serializers.IntegerField()
column = serializers.IntegerField()
stack = serializers.CharField(max_length=10000,
style={'base_template': 'textarea.html'})
browser = serializers.CharField(max_length=255)
os = serializers.CharField(max_length=255)
stack = serializers.CharField(max_length=8192,
style={'base_template': 'textarea.html'}, allow_null=True)


class AboutSerializer(serializers.Serializer):
name = serializers.CharField(max_length=128)
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
router.register('tasks', views.TaskViewSet)
router.register('jobs', views.JobViewSet)
router.register('users', views.UserViewSet)
router.register('', views.ServerViewSet, basename='server')
router.register('server', views.ServerViewSet, basename='server')
router.register('plugins', views.PluginViewSet)

urlpatterns = [
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def annotations(self, request, pk):
pass


class UserViewSet(viewsets.GenericViewSet,
class UserViewSet(viewsets.GenericViewSet, mixins.ListModelMixin,
mixins.RetrieveModelMixin, mixins.UpdateModelMixin):
queryset = User.objects.all()
serializer_class = UserSerializer
Expand Down

0 comments on commit 450c4c7

Please sign in to comment.