django-restit 4.2.70__py3-none-any.whl → 4.2.72__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_restit-4.2.70.dist-info → django_restit-4.2.72.dist-info}/METADATA +1 -1
- {django_restit-4.2.70.dist-info → django_restit-4.2.72.dist-info}/RECORD +5 -5
- rest/models/base.py +7 -4
- {django_restit-4.2.70.dist-info → django_restit-4.2.72.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.70.dist-info → django_restit-4.2.72.dist-info}/WHEEL +0 -0
@@ -400,7 +400,7 @@ rest/middleware/request.py,sha256=JchRNy5L-bGd-7h-KFYekGRvREe2eCkZXKOYqIkP2hI,41
|
|
400
400
|
rest/middleware/session.py,sha256=zHSoQpIzRLmpqr_JvW406wzpvU3W3gDbm5JhtzLAMlE,10240
|
401
401
|
rest/middleware/session_store.py,sha256=1nSdeXK8PyuYgGgIufqrS6j6QpIrQ7zbMNT0ol75e6U,1901
|
402
402
|
rest/models/__init__.py,sha256=M8pvFDq-WCF-QcM58X7pMufYYe0aaQ3U0PwGe9TKbbY,130
|
403
|
-
rest/models/base.py,sha256=
|
403
|
+
rest/models/base.py,sha256=GmA1oG05qrCUtJ_rAoXiD4rYzkHhzOD8NxYbfktXV0c,67781
|
404
404
|
rest/models/cacher.py,sha256=eKz8TINVhWEqKhJGMsRkKZTtBUIv5rN3NHbZwOC56Uk,578
|
405
405
|
rest/models/metadata.py,sha256=65GvfFbc26_7wJz8qEAzU7fEOZWVz0ttO5j5m_gs4hk,12860
|
406
406
|
rest/net.py,sha256=LcB2QV6VNRtsSdmiQvYZgwQUDwOPMn_VBdRiZ6OpI-I,2974
|
@@ -501,7 +501,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
501
501
|
ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
|
502
502
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
503
503
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
504
|
-
django_restit-4.2.
|
505
|
-
django_restit-4.2.
|
506
|
-
django_restit-4.2.
|
507
|
-
django_restit-4.2.
|
504
|
+
django_restit-4.2.72.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
505
|
+
django_restit-4.2.72.dist-info/METADATA,sha256=Ko43nI4kRvHs5UaYZxWSMMJ0blf1BhS-kgL5zrYj34I,7645
|
506
|
+
django_restit-4.2.72.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
507
|
+
django_restit-4.2.72.dist-info/RECORD,,
|
rest/models/base.py
CHANGED
@@ -1084,7 +1084,10 @@ class RestModel(object):
|
|
1084
1084
|
localize = request.DATA.get("localize", None, field_type=dict)
|
1085
1085
|
rh.debug("localize", localize)
|
1086
1086
|
if name is None:
|
1087
|
-
|
1087
|
+
ext = format
|
1088
|
+
if "_" in ext:
|
1089
|
+
ext = ext[:ext.find("_")]
|
1090
|
+
name = "{}.{}".format(cls.get_class_name(), ext)
|
1088
1091
|
# print "csv size: {}".format(qset.count())
|
1089
1092
|
sort = request.DATA.get("sort", getattr(cls.RestMeta, "DEFAULT_SORT", "-id"))
|
1090
1093
|
sort_args = cls.getSortArgs(sort)
|
@@ -1094,11 +1097,11 @@ class RestModel(object):
|
|
1094
1097
|
except Exception:
|
1095
1098
|
pass
|
1096
1099
|
cls._boundRest()
|
1097
|
-
if format
|
1100
|
+
if format.startswith("json"):
|
1098
1101
|
return GRAPH_HELPERS.views.restJSON(
|
1099
1102
|
request, qset, fields,
|
1100
1103
|
name, format_size, localize=localize)
|
1101
|
-
elif format
|
1104
|
+
elif format.startswith("csv"):
|
1102
1105
|
return GRAPH_HELPERS.views.restCSV(
|
1103
1106
|
request, qset, fields,
|
1104
1107
|
name, format_size, localize=localize)
|
@@ -1484,7 +1487,7 @@ class RestModel(object):
|
|
1484
1487
|
qset = qset.filter(**q)
|
1485
1488
|
return qset
|
1486
1489
|
|
1487
|
-
ALLOWED_QUERY_OPERATORS = ["gt", "gte", "lt", "lte", "contains", "icontains", "in", "startswith", "endswith"]
|
1490
|
+
ALLOWED_QUERY_OPERATORS = ["isnull", "gt", "gte", "lt", "lte", "contains", "icontains", "in", "startswith", "endswith"]
|
1488
1491
|
|
1489
1492
|
@classmethod
|
1490
1493
|
def queryFromRequest(cls, request, qset):
|
File without changes
|
File without changes
|