diff --git i/example_project/settings.py w/example_project/settings.py index 6a3af404..a184b08c 100644 --- i/example_project/settings.py +++ w/example_project/settings.py @@ -9,15 +9,10 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ -# Build paths inside the project like this: os.path.join(BASE_DIR, ...) -import os - # Compatibility with Bootstrap 3 from django.contrib.messages import constants as messages # flake8: noqa -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) - # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'change-this-on-your-production-server' @@ -80,7 +75,7 @@ INSTALLED_APPS = ( 'allauth.socialaccount.providers.stackexchange', # Dev only dependencies. Do not include in any production site. - 'debug_toolbar', + # 'debug_toolbar', ) @@ -88,7 +83,7 @@ MIDDLEWARE = ( 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', # NOTE: Do not include DebugToolbarMiddleware in any production site. - 'debug_toolbar.middleware.DebugToolbarMiddleware', + # 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', @@ -134,7 +129,7 @@ DATABASES = { # Use 'sqlite3', 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'ENGINE': 'django.db.backends.sqlite3', # DB name or path to database file if using sqlite3. - 'NAME': os.path.join(BASE_DIR, 'hyperkitty.db'), + 'NAME': '/var/lib/hyperkitty/data/hyperkitty.db', # The following settings are not used with sqlite3: 'USER': 'hyperkitty', 'PASSWORD': 'hkpass', @@ -205,7 +200,7 @@ USE_TZ = True # Don't put anything in this directory yourself; store your static files # in apps' "static/" subdirectories and in STATICFILES_DIRS. # Example: "/var/www/example.com/static/" -STATIC_ROOT = os.path.join(BASE_DIR, 'static') +STATIC_ROOT = '/var/lib/hyperkitty/static' # URL prefix for static files. # Example: "http://example.com/static/", "http://static.example.com/" @@ -318,7 +313,8 @@ COMPRESS_PRECOMPILERS = ( # recompiled on each requests. It means running an additional "compress" # management command after each code upgrade. # http://django-compressor.readthedocs.io/en/latest/usage/#offline-compression -# COMPRESS_OFFLINE = True +COMPRESS_OFFLINE = True +COMPRESS_ENABLED = True # Needed for debug mode INTERNAL_IPS = ('127.0.0.1',) @@ -330,7 +326,7 @@ INTERNAL_IPS = ('127.0.0.1',) HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', - 'PATH': os.path.join(BASE_DIR, "fulltext_index"), + 'PATH': "/var/lib/hyperkitty/fulltext_index", # You can also use the Xapian engine, it's faster and more accurate, # but requires another library. # http://django-haystack.readthedocs.io/en/v2.4.1/installing_search_engines.html#xapian @@ -386,7 +382,7 @@ LOGGING = { 'level': 'INFO', #'class': 'logging.handlers.RotatingFileHandler', 'class': 'logging.handlers.WatchedFileHandler', - 'filename': os.path.join(BASE_DIR, 'hyperkitty.log'), + 'filename': '/var/log/hyperkitty/hyperkitty.log', 'formatter': 'verbose', }, 'console': { @@ -444,9 +440,9 @@ CACHES = { # When DEBUG is True, don't actually send emails to the SMTP server, just store # them in a directory. This way you won't accidentally spam your mailing-lists # while you're fiddling with the code. -if DEBUG == True: +if DEBUG: EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend' - EMAIL_FILE_PATH = os.path.join(BASE_DIR, 'emails') + EMAIL_FILE_PATH = '/var/lib/hyperkitty/emails' #