From 71573ca44e76bd982ead889a13420e536c41ba7a Mon Sep 17 00:00:00 2001 From: Pelagic Date: Tue, 12 Sep 2023 13:40:39 +0300 Subject: [PATCH] Formatting for code blocks in README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 13cc33b..77e848e 100644 --- a/README.md +++ b/README.md @@ -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