from django.conf import settings

BASED_LIB_RST = getattr(
    settings,
    'BASED_LIB_RST',
    {
        "font_awesome": {
            "url_patterns": {
                r'.*twitter.com.*': 'fab fa-twitter',
            }
        }
    },
)

from django.conf import settings

BASED_LIB_RST = getattr(settings, 'BASED_LIB_RST', {})

INJECT_FONT_AWESOME = (
    BASED_LIB_RST.get('font_awesome', {}).get('url_patterns') is not None
)

Remove example setting from defaults, add INJECT_FONT_AWESOME
Remove example setting from defaults, add INJECT_FONT_AWESOME

  from django.conf import settings
  
+ BASED_LIB_RST = getattr(settings, 'BASED_LIB_RST', {})
+ 
+ INJECT_FONT_AWESOME = (
+     BASED_LIB_RST.get('font_awesome', {}).get('url_patterns') is not None
- BASED_LIB_RST = getattr(
-     settings,
-     'BASED_LIB_RST',
-     {
-         "font_awesome": {
-             "url_patterns": {
-                 r'.*twitter.com.*': 'fab fa-twitter',
-             }
-         }
-     },
  )
  
Remove example setting from defaults, add INJECT_FONT_AWESOME
## Code Before:
from django.conf import settings

BASED_LIB_RST = getattr(
    settings,
    'BASED_LIB_RST',
    {
        "font_awesome": {
            "url_patterns": {
                r'.*twitter.com.*': 'fab fa-twitter',
            }
        }
    },
)

## Instruction:
Remove example setting from defaults, add INJECT_FONT_AWESOME
## Code After:
from django.conf import settings

BASED_LIB_RST = getattr(settings, 'BASED_LIB_RST', {})

INJECT_FONT_AWESOME = (
    BASED_LIB_RST.get('font_awesome', {}).get('url_patterns') is not None
)
