<s> from django . conf import settings <EOL> from django . contrib . sites . models import Site <EOL> from django . core . exceptions import ImproperlyConfigured <EOL> import os <EOL> FREEZE_ROOT = getattr ( settings , '<STR_LIT>' , os . path . abspath ( os . path . join ( settings . MEDIA_ROOT , '<STR_LIT>' ) ) ) <EOL> if not os . path . isabs ( FREEZE_ROOT ) : <EOL> raise ImproperlyConfigured ( '<STR_LIT>' ) <EOL> if settings . MEDIA_ROOT . find ( FREEZE_ROOT ) == <NUM_LIT:0> or settings . STATIC_ROOT . find ( FREEZE_ROOT ) == <NUM_LIT:0> : <EOL> raise ImproperlyConfigured ( '<STR_LIT>' ) <EOL> FREEZE_MEDIA_ROOT = settings . MEDIA_ROOT <EOL> FREEZE_MEDIA_URL = settings . MEDIA_URL <EOL> FREEZE_STATIC_ROOT = settings . STATIC_ROOT <EOL> FREEZE_STATIC_URL = settings . STATIC_URL <EOL> FREEZE_USE_HTTPS = getattr ( settings , '<STR_LIT>' , False ) <EOL> FREEZE_SITE = Site . objects . get_current ( ) <EOL> FREEZE_PROTOCOL = '<STR_LIT>' if FREEZE_USE_HTTPS else '<STR_LIT>' <EOL> FREEZE_DOMAIN = FREEZE_SITE . domain <EOL> FREEZE_SITE_URL = getattr ( settings , '<STR_LIT>' , '<STR_LIT>' % ( FREEZE_PROTOCOL , FREEZE_DOMAIN , ) ) <EOL> FREEZE_BASE_URL = getattr ( settings , '<STR_LIT>' , None ) <EOL> if FREEZE_BASE_URL : <EOL> if FREEZE_BASE_URL . startswith ( '<STR_LIT:/>' ) or FREEZE_BASE_URL . startswith ( '<STR_LIT:http>' ) : <EOL> if not FREEZE_BASE_URL . endswith ( '<STR_LIT:/>' ) : <EOL> FREEZE_BASE_URL += '<STR_LIT:/>' <EOL> else : <EOL> raise ImproperlyConfigured ( '<STR_LIT>' ) <EOL> FREEZE_RELATIVE_URLS = getattr ( settings , '<STR_LIT>' , False ) <EOL> if FREEZE_RELATIVE_URLS and FREEZE_BASE_URL != None : <EOL> raise ImproperlyConfigured ( '<STR_LIT>' ) <EOL> FREEZE_LOCAL_URLS = getattr ( settings , '<STR_LIT>' , False ) <EOL> if FREEZE_LOCAL_URLS and not FREEZE_RELATIVE_URLS : <EOL> raise ImproperlyConfigured ( '<STR_LIT>' ) <EOL> FREEZE_FOLLOW_SITEMAP_URLS = getattr ( settings , '<STR_LIT>' , True ) <EOL> FREEZE_FOLLOW_HTML_URLS = getattr ( settings , '<STR_LIT>' , True ) <EOL> FREEZE_REPORT_INVALID_URLS = getattr ( settings , '<STR_LIT>' , False ) <EOL> FREEZE_REPORT_INVALID_URLS_SUBJECT = getattr ( settings , '<STR_LIT>' , '<STR_LIT>' ) <EOL> FREEZE_INCLUDE_MEDIA = getattr ( settings , '<STR_LIT>' , True ) <EOL> FREEZE_INCLUDE_STATIC = getattr ( settings , '<STR_LIT>' , True ) <EOL> FREEZE_ZIP_ALL = getattr ( settings , '<STR_LIT>' , False ) <EOL> FREEZE_ZIP_NAME = getattr ( settings , '<STR_LIT>' , '<STR_LIT>' ) <EOL> if len ( FREEZE_ZIP_NAME ) >= <NUM_LIT:4> and FREEZE_ZIP_NAME [ - <NUM_LIT:4> : ] . lower ( ) != '<STR_LIT>' : <EOL> FREEZE_ZIP_NAME += '<STR_LIT>' <EOL> FREEZE_ZIP_PATH = os . path . abspath ( os . path . join ( FREEZE_ROOT , FREEZE_ZIP_NAME ) ) </s>
