Skip to content

Commit 2ad5106

Browse files
📝 Update README
In the part `Use DRF API Logger Model to query` there was code without syntax highlighting
1 parent 6ff0e88 commit 2ad5106

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,18 +242,19 @@ DRF_API_LOGGER_PATH_TYPE possible values are:
242242
You can use the DRF API Logger Model to query some information.
243243

244244
Note: Make sure to set "DRF_API_LOGGER_DATABASE = True" in settings.py file.
245-
```
245+
```python
246246
from drf_api_logger.models import APILogsModel
247247

248248
"""
249249
Example:
250250
Select records for status_code 200.
251251
"""
252+
252253
result_for_200_status_code = APILogsModel.objects.filter(status_code=200)
253254
```
254255

255256
DRF API Logger Model:
256-
```
257+
```python
257258
class APILogsModel(Model):
258259
id = models.BigAutoField(primary_key=True)
259260
api = models.CharField(max_length=1024, help_text='API URL')
@@ -281,4 +282,3 @@ class APILogsModel(Model):
281282
After sometime, there will be too many data in the database. Searching and filter may get slower.
282283
If you want, you can delete or archive the older data.
283284
To improve the searching or filtering, try to add indexes in the 'drf_api_logs' table.
284-

0 commit comments

Comments
 (0)