You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build.py
+7-28Lines changed: 7 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,13 @@ def read_cls_docstring(cls):
42
42
43
43
defget_versions():
44
44
return [
45
+
{
46
+
"version": "0.3.6",
47
+
"changes": [
48
+
"Fix datetime/time handling in transform helpers.",
49
+
"Revert get_orm_list method to original implementation. We can use list_select_related and search_fields for prefetch_related_fields and additional_search_fields.",
"content": "You can customize relation loading and relation search by overriding <code>orm_get_list</code> and forwarding <code>prefetch_related_fields</code> and <code>additional_search_fields</code>:",
"""This method is used to get list of orm/db model objects.
2322
2324
@@ -2325,8 +2327,6 @@ <h3>Methods and Attributes</h3>
2325
2327
:params search: a search query.
2326
2328
:params sort_by: a sort by field name.
2327
2329
:params filters: a dict of filters.
2328
-
:params prefetch_related_fields: a list of related fields to prefetch.
2329
-
:params additional_search_fields: a list of additional search fields.
2330
2330
:return: A tuple of list of objects and total count.
2331
2331
"""
2332
2332
raise NotImplementedError
@@ -2858,64 +2858,6 @@ <h3>Methods and Attributes</h3>
2858
2858
2859
2859
2860
2860
2861
-
2862
-
<pclass="text-4">
2863
-
You can customize relation loading and relation search by overriding <code>orm_get_list</code> and forwarding <code>prefetch_related_fields</code> and <code>additional_search_fields</code>:
2864
-
</p>
2865
-
2866
-
2867
-
2868
-
2869
-
2870
-
2871
-
2872
-
2873
-
2874
-
2875
-
2876
-
2877
-
2878
-
2879
-
2880
-
2881
-
2882
-
2883
-
2884
-
2885
-
2886
-
2887
-
2888
-
2889
-
2890
-
<pre>
2891
-
<codeclass="language-python">
2892
-
class TaskAdmin(TortoiseModelAdmin):
2893
-
search_fields = ("title",)
2894
-
2895
-
async def orm_get_list(
2896
-
self,
2897
-
offset=None,
2898
-
limit=None,
2899
-
search=None,
2900
-
sort_by=None,
2901
-
filters=None,
2902
-
):
2903
-
return await super().orm_get_list(
2904
-
offset=offset,
2905
-
limit=limit,
2906
-
search=search,
2907
-
sort_by=sort_by,
2908
-
filters=filters,
2909
-
prefetch_related_fields=["user"],
2910
-
additional_search_fields=["user__email"],
2911
-
)
2912
-
2913
-
</code>
2914
-
</pre>
2915
-
2916
-
2917
-
2918
-
2919
2861
</section>
2920
2862
2921
2863
@@ -3415,6 +3357,49 @@ <h2>Changelog</h2>
3415
3357
3416
3358
3417
3359
3360
+
<sectionid="v0_3_6">
3361
+
<h3>v0.3.6</h3>
3362
+
3363
+
3364
+
3365
+
<pclass="text-4">
3366
+
Fix datetime/time handling in transform helpers.
3367
+
</p>
3368
+
3369
+
3370
+
3371
+
3372
+
3373
+
3374
+
3375
+
3376
+
3377
+
3378
+
3379
+
3380
+
3381
+
3382
+
3383
+
<pclass="text-4">
3384
+
Revert get_orm_list method to original implementation. We can use list_select_related and search_fields for prefetch_related_fields and additional_search_fields.
0 commit comments