<commit_before># -*- coding: utf-8 -*-
'''Base settings file, common to all environments.

These settings can be overridden in local.py.
'''
import os

base_path = str(os.path.dirname(os.path.abspath(__file__)))

# User management & registration
confirm_registrations_by_email = False # Not fully implemented
allow_registration = True
allow_login = True

use_solr = True
solr = 'http://localhost:8983/solr/'

try:
    os.environ['OSF_PRODUCTION']
    debug_mode = False
except KeyError:<commit_msg>Fix base_path setting<commit_after># -*- coding: utf-8 -*-
'''Base settings file, common to all environments.

These settings can be overridden in local.py.
'''
import os

def parent_dir(path):
    '''Return the parent of a directory.'''
    return os.path.abspath(os.path.join(path, os.pardir))

HERE = os.path.dirname(os.path.abspath(__file__))
base_path = parent_dir(HERE)  # website/ directory

# User management & registration
confirm_registrations_by_email = False # Not fully implemented
allow_registration = True
allow_login = True

use_solr = True
solr = 'http://localhost:8983/solr/'

try:
    os.environ['OSF_PRODUCTION']
    debug_mode = False
except KeyError:
{'fraction_non_alphanumeric': 0.1170940170940171, 'fraction_numerical': 0.008547008547008548, 'mean_word_length': 4.657004830917875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3795316', 'n_tokens_mistral': 384, 'n_tokens_neox': 376, 'n_words': 102}