File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -242,18 +242,19 @@ DRF_API_LOGGER_PATH_TYPE possible values are:
242
242
You can use the DRF API Logger Model to query some information.
243
243
244
244
Note: Make sure to set "DRF_API_LOGGER_DATABASE = True" in settings.py file.
245
- ```
245
+ ``` python
246
246
from drf_api_logger.models import APILogsModel
247
247
248
248
"""
249
249
Example:
250
250
Select records for status_code 200.
251
251
"""
252
+
252
253
result_for_200_status_code = APILogsModel.objects.filter(status_code = 200 )
253
254
```
254
255
255
256
DRF API Logger Model:
256
- ```
257
+ ``` python
257
258
class APILogsModel (Model ):
258
259
id = models.BigAutoField(primary_key = True )
259
260
api = models.CharField(max_length = 1024 , help_text = ' API URL' )
@@ -281,4 +282,3 @@ class APILogsModel(Model):
281
282
After sometime, there will be too many data in the database. Searching and filter may get slower.
282
283
If you want, you can delete or archive the older data.
283
284
To improve the searching or filtering, try to add indexes in the 'drf_api_logs' table.
284
-
You can’t perform that action at this time.
0 commit comments