mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-25 14:50:24 +00:00
user bulk import through Excel and close #20
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# coding: utf-8
|
||||
|
||||
from django.db import models
|
||||
from django.http import JsonResponse
|
||||
from django.utils.timezone import now
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
@@ -36,3 +37,11 @@ class NoDeleteModelMixin(models.Model):
|
||||
self.is_discard = True
|
||||
self.discard_time = now()
|
||||
return self.save()
|
||||
|
||||
|
||||
class JSONResponseMixin(object):
|
||||
|
||||
"""JSON mixin"""
|
||||
|
||||
def render_json_response(self, context):
|
||||
return JsonResponse(context)
|
||||
|
Reference in New Issue
Block a user