Source code for django

[docs]defsetup(set_prefix=True):""" Configure the settings (this happens as a side effect of accessing the first setting), configure logging and populate the app registry. Set the thread-local urlresolvers script prefix if `set_prefix` is True. """fromdjango.appsimportappsfromdjango.confimportsettingsfromdjango.urlsimportset_script_prefixfromdjango.utils.logimportconfigure_loggingconfigure_logging(settings.LOGGING_CONFIG,settings.LOGGING)ifset_prefix:set_script_prefix('/'ifsettings.FORCE_SCRIPT_NAMEisNoneelsesettings.FORCE_SCRIPT_NAME)apps.populate(settings.INSTALLED_APPS)