Formatting for code blocks in README.md

This commit is contained in:
2023-09-12 13:40:39 +03:00
parent 986d4302a7
commit 71573ca44e

View File

@@ -7,12 +7,15 @@ To manage automated caching this the library replaces (and appends to) the DRF f
# Usage
### Ensure that the module is in the INSTALLED_APPS in settings.py:
```python
INSTALLED_APPS = [
...
'starfields_drf_generics',
]
```
### Making views in views.py:
```python
from starfields_drf_generics import generics
from starfields_drf_generics import filters as libfilters
@@ -50,6 +53,7 @@ class SearchView(generics.CachedListRetrieveAPIView):
)
logger = logger
cache = cache
```
### New class attributes that are used
cache_prefix: defines the prefix that the module will use when saving values in the cache