from .base import Config

__version__ = '1.0a1'

try:
    from django.apps import AppConfig  # noqa
except ImportError:
    config = Config()
else:
    default_app_config = 'constance.apps.ConstanceConfig'

from .base import Config
from django.utils.functional import SimpleLazyObject

__version__ = '1.0a1'


try:
    from django.apps import AppConfig  # noqa
except ImportError:
    config = SimpleLazyObject(Config)
else:
    default_app_config = 'constance.apps.ConstanceConfig'

Make the config object lazy for old Djangos.
Make the config object lazy for old Djangos.

This should prevent import time side effects from instantiating the config object directly there.

  from .base import Config
+ from django.utils.functional import SimpleLazyObject
  
  __version__ = '1.0a1'
+ 
  
  try:
      from django.apps import AppConfig  # noqa
  except ImportError:
-     config = Config()
+     config = SimpleLazyObject(Config)
  else:
      default_app_config = 'constance.apps.ConstanceConfig'
  
Make the config object lazy for old Djangos.
## Code Before:
from .base import Config

__version__ = '1.0a1'

try:
    from django.apps import AppConfig  # noqa
except ImportError:
    config = Config()
else:
    default_app_config = 'constance.apps.ConstanceConfig'

## Instruction:
Make the config object lazy for old Djangos.
## Code After:
from .base import Config
from django.utils.functional import SimpleLazyObject

__version__ = '1.0a1'


try:
    from django.apps import AppConfig  # noqa
except ImportError:
    config = SimpleLazyObject(Config)
else:
    default_app_config = 'constance.apps.ConstanceConfig'
