import django

__version__ = "2.4.0"

if django.VERSION < (3, 2):
    default_app_config = "channels.apps.ChannelsConfig"
DEFAULT_CHANNEL_LAYER = "default"

__version__ = "2.4.0"

try:
    import django

    if django.VERSION < (3, 2):
        default_app_config = "channels.apps.ChannelsConfig"
except ModuleNotFoundError:
    pass

DEFAULT_CHANNEL_LAYER = "default"

Fix RTD build for missing Django dependency.
Fix RTD build for missing Django dependency.

- import django
- 
  __version__ = "2.4.0"
  
+ try:
+     import django
+ 
- if django.VERSION < (3, 2):
+     if django.VERSION < (3, 2):
-     default_app_config = "channels.apps.ChannelsConfig"
+         default_app_config = "channels.apps.ChannelsConfig"
+ except ModuleNotFoundError:
+     pass
+ 
  DEFAULT_CHANNEL_LAYER = "default"
  
Fix RTD build for missing Django dependency.
## Code Before:
import django

__version__ = "2.4.0"

if django.VERSION < (3, 2):
    default_app_config = "channels.apps.ChannelsConfig"
DEFAULT_CHANNEL_LAYER = "default"

## Instruction:
Fix RTD build for missing Django dependency.
## Code After:
__version__ = "2.4.0"

try:
    import django

    if django.VERSION < (3, 2):
        default_app_config = "channels.apps.ChannelsConfig"
except ModuleNotFoundError:
    pass

DEFAULT_CHANNEL_LAYER = "default"
