def init_siteconfig(app, created_models, verbosity, db=None, **kwargs):
 try:
  site = Site.objects.get_current()
 except Site.DoesNotExist:
  from django.contrib.sites.management import create_default_site
  create_default_site(app, created_models, verbosity, db=db)
  site = Site.objects.get_current()
 (siteconfig, is_new) = SiteConfiguration.objects.get_or_create(site=site)
 new_version = get_version_string()
 if is_new:
  if (Site not in created_models):
   print(u'*** Migrating settings from settings_local.py to the database.')
  migrate_settings(siteconfig)
  if (Site not in created_models):
   print(u'*** If you have previously configured Review Board through a ')
   print(u'*** settings_local.py file, please ensure that the migration ')
   print(u'*** was successful by verifying your settings at')
   print((u'*** %s://%s%sadmin/settings/' % (siteconfig.get(u'site_domain_method'), site.domain, settings.SITE_ROOT)))
  siteconfig.version = new_version
  siteconfig.save()
 elif (siteconfig.version != new_version):
  print((u'Upgrading Review Board from %s to %s' % (siteconfig.version, new_version)))
  siteconfig.version = new_version
  siteconfig.save()

def init_siteconfig ( app , created_models , verbosity , db = None , ** kwargs ) : try : site = Site . objects . get_current ( ) except Site . DoesNotExist : from django . contrib . sites . management import create_default_site create_default_site ( app , created_models , verbosity , db = db ) site = Site . objects . get_current ( ) ( siteconfig , is_new ) = SiteConfiguration . objects . get_or_create ( site = site ) new_version = get_version_string ( ) if is_new : if ( Site not in created_models ) : print ( u'*** Migrating settings from settings_local.py to the database.' ) migrate_settings ( siteconfig ) if ( Site not in created_models ) : print ( u'*** If you have previously configured Review Board through a ' ) print ( u'*** settings_local.py file, please ensure that the migration ' ) print ( u'*** was successful by verifying your settings at' ) print ( ( u'*** %s://%s%sadmin/settings/' % ( siteconfig . get ( u'site_domain_method' ) , site . domain , settings . SITE_ROOT ) ) ) siteconfig . version = new_version siteconfig . save ( ) elif ( siteconfig . version != new_version ) : print ( ( u'Upgrading Review Board from %s to %s' % ( siteconfig . version , new_version ) ) ) siteconfig . version = new_version siteconfig . save ( )
initialize the site configuration .