__init__.py 675 B

123456789101112131415161718192021
  1. VERSION = (1, 7, 0, 'final', 0)
  2. def get_version(*args, **kwargs):
  3. # Don't litter django/__init__.py with all the get_version stuff.
  4. # Only import if it's actually called.
  5. from django.utils.version import get_version
  6. return get_version(*args, **kwargs)
  7. def setup():
  8. """
  9. Configure the settings (this happens as a side effect of accessing the
  10. first setting), configure logging and populate the app registry.
  11. """
  12. from django.apps import apps
  13. from django.conf import settings
  14. from django.utils.log import configure_logging
  15. configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  16. apps.populate(settings.INSTALLED_APPS)