disable sentry in no production env

This commit is contained in:
virusdefender
2019-03-26 09:47:58 +08:00
parent 6f8e68846c
commit 26e03c26fc

View File

@@ -26,17 +26,21 @@ with open(os.path.join(DATA_DIR, "config", "secret.key"), "r") as f:
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Applications # Applications
VENDOR_APPS = ( VENDOR_APPS = [
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'rest_framework', 'rest_framework',
'raven.contrib.django.raven_compat',
'django_dramatiq', 'django_dramatiq',
) ]
LOCAL_APPS = (
if production_env:
VENDOR_APPS.append('raven.contrib.django.raven_compat')
LOCAL_APPS = [
'account', 'account',
'announcement', 'announcement',
'conf', 'conf',
@@ -46,7 +50,7 @@ LOCAL_APPS = (
'submission', 'submission',
'options', 'options',
'judge', 'judge',
) ]
INSTALLED_APPS = VENDOR_APPS + LOCAL_APPS INSTALLED_APPS = VENDOR_APPS + LOCAL_APPS