user bulk import through Excel and close #20

This commit is contained in:
xiaokong1937@gmail.com
2016-10-01 20:26:43 +08:00
parent 05e961f29f
commit d40aa49d8c
8 changed files with 135 additions and 2 deletions

View File

@@ -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)