src/p4l/config.py.tmpl
changeset 121 0d2a35462576
parent 119 ece69ca3ac24
child 145 7c6fe1dab213
equal deleted inserted replaced
120:6ec0300b626e 121:0d2a35462576
    37 # http://www.i18nguy.com/unicode/language-identifiers.html
    37 # http://www.i18nguy.com/unicode/language-identifiers.html
    38 LANGUAGE_CODE = 'en-us'
    38 LANGUAGE_CODE = 'en-us'
    39 
    39 
    40 SITE_ID = 1
    40 SITE_ID = 1
    41 
    41 
       
    42 #absolute path of the src folder 
    42 BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
    43 BASE_DIR = os.path.dirname(os.path.abspath(__file__)).rstrip("/")+"/"
       
    44 
       
    45 #absolute url of the website without the host nor the protocol
    43 BASE_URL = '/~ymh/p4l/'
    46 BASE_URL = '/~ymh/p4l/'
       
    47 
       
    48 #Host and protocol of the website
    44 WEB_URL = 'http://localhost'
    49 WEB_URL = 'http://localhost'
    45 BASE_STATIC_URL = WEB_URL + BASE_URL + 'static/' 
    50 
       
    51 #absolute url of the website static resources
       
    52 BASE_STATIC_URL = WEB_URL + BASE_URL + 'static/'
       
    53 # absolute path for the website static resources  
    46 BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../../web/static/").rstrip("/")+"/"
    54 BASE_STATIC_ROOT = os.path.abspath(BASE_DIR + "../../web/static/").rstrip("/")+"/"
    47 
    55 
    48 # Absolute filesystem path to the directory that will hold user-uploaded files.
    56 # Absolute filesystem path to the directory that will hold user-uploaded files.
    49 # Example: "/var/www/example.com/media/"
    57 # Example: "/var/www/example.com/media/"
    50 MEDIA_ROOT = BASE_STATIC_ROOT + "media/"
    58 MEDIA_ROOT = BASE_STATIC_ROOT + "media/"
    68 SECRET_KEY = 'change_this_with_very_secret_key'
    76 SECRET_KEY = 'change_this_with_very_secret_key'
    69 
    77 
    70 # Python dotted path to the WSGI application used by Django's runserver.
    78 # Python dotted path to the WSGI application used by Django's runserver.
    71 WSGI_APPLICATION = 'p4l.wsgi.application'
    79 WSGI_APPLICATION = 'p4l.wsgi.application'
    72 
    80 
       
    81 #absolute patrh to the logging file
    73 LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../../run/log/log.txt"))
    82 LOG_FILE = os.path.abspath(os.path.join(BASE_DIR,"../../run/log/log.txt"))
       
    83 #logging level
    74 LOG_LEVEL = logging.DEBUG
    84 LOG_LEVEL = logging.DEBUG
    75 
    85 
       
    86 
       
    87 #logging configuration
    76 LOGGING = {
    88 LOGGING = {
    77     'version': 1,
    89     'version': 1,
    78     'disable_existing_loggers': False,
    90     'disable_existing_loggers': False,
    79     'filters': {
    91     'filters': {
    80         'require_debug_false': {
    92         'require_debug_false': {
   133             'propagate': True,
   145             'propagate': True,
   134         },    
   146         },    
   135     }
   147     }
   136 }
   148 }
   137 
   149 
       
   150 #haystack connections
   138 HAYSTACK_CONNECTIONS = {
   151 HAYSTACK_CONNECTIONS = {
   139     'default': {
   152     'default': {
   140         'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
   153         'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
   141         'URL': 'http://127.0.0.1:9200/',
   154         'URL': 'http://127.0.0.1:9200/',
   142         'INDEX_NAME': 'p4l',
   155         'INDEX_NAME': 'p4l',
   143     },
   156     },
   144 }
   157 }
   145 
   158 
       
   159 # Control the activation of the real time indexing.
   146 REALTIME_INDEXING = True
   160 REALTIME_INDEXING = True
   147 
   161 
       
   162 # pagination of the list of record
   148 NB_RECORDS_BY_PAGE = 20
   163 NB_RECORDS_BY_PAGE = 20
       
   164 
       
   165 # url of the sesame repository containing all the rdf referentials
   149 SPARQL_QUERY_ENDPOINT = "http://localhost:8080/openrdf-sesame/repositories/plan4learning"
   166 SPARQL_QUERY_ENDPOINT = "http://localhost:8080/openrdf-sesame/repositories/plan4learning"
   150 
   167 
   151