mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-07 21:44:52 +03:00
Rename use_sentry_for_error_reporting to use_sentry
This commit is contained in:
parent
4437b3de5b
commit
f4d9347dd1
|
@ -157,7 +157,7 @@ Answer the prompts with your own desired options_. For example::
|
||||||
use_whitenoise [y]: n
|
use_whitenoise [y]: n
|
||||||
use_celery [n]: y
|
use_celery [n]: y
|
||||||
use_mailhog [n]: n
|
use_mailhog [n]: n
|
||||||
use_sentry_for_error_reporting [y]: y
|
use_sentry [y]: y
|
||||||
use_opbeat [n]: y
|
use_opbeat [n]: y
|
||||||
use_pycharm [n]: y
|
use_pycharm [n]: y
|
||||||
windows [n]: n
|
windows [n]: n
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"use_whitenoise": "y",
|
"use_whitenoise": "y",
|
||||||
"use_celery": "n",
|
"use_celery": "n",
|
||||||
"use_mailhog": "n",
|
"use_mailhog": "n",
|
||||||
"use_sentry_for_error_reporting": "y",
|
"use_sentry": "y",
|
||||||
"use_opbeat": "n",
|
"use_opbeat": "n",
|
||||||
"use_pycharm": "n",
|
"use_pycharm": "n",
|
||||||
"windows": "n",
|
"windows": "n",
|
||||||
|
|
|
@ -42,7 +42,7 @@ use_mailhog [n]
|
||||||
executable for your operating system, see the 'Developing Locally' docs
|
executable for your operating system, see the 'Developing Locally' docs
|
||||||
for instructions.
|
for instructions.
|
||||||
|
|
||||||
use_sentry_for_error_reporting [n]
|
use_sentry [n]
|
||||||
Whether to use Sentry_ to log errors from your project.
|
Whether to use Sentry_ to log errors from your project.
|
||||||
|
|
||||||
use_opbeat [n]
|
use_opbeat [n]
|
||||||
|
|
|
@ -102,7 +102,7 @@ To view messages that are sent by your application, open your browser and go to
|
||||||
The email server will exit when you exit the Grunt task on the CLI with Ctrl+C.
|
The email server will exit when you exit the Grunt task on the CLI with Ctrl+C.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == "y" %}
|
{% if cookiecutter.use_sentry == "y" %}
|
||||||
|
|
||||||
Sentry
|
Sentry
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
|
|
@ -6,7 +6,7 @@ Production Configurations
|
||||||
- Use Amazon's S3 for storing {% if cookiecutter.use_whitenoise == 'n' -%}static files and {% endif %}uploaded media
|
- Use Amazon's S3 for storing {% if cookiecutter.use_whitenoise == 'n' -%}static files and {% endif %}uploaded media
|
||||||
- Use mailgun to send emails
|
- Use mailgun to send emails
|
||||||
- Use Redis for cache
|
- Use Redis for cache
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
{% if cookiecutter.use_sentry == 'y' %}
|
||||||
- Use sentry for error logging
|
- Use sentry for error logging
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if cookiecutter.use_opbeat == 'y' %}
|
{% if cookiecutter.use_opbeat == 'y' %}
|
||||||
|
@ -14,7 +14,7 @@ Production Configurations
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
{% if cookiecutter.use_sentry == 'y' %}
|
||||||
import logging
|
import logging
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ SECRET_KEY = env('DJANGO_SECRET_KEY')
|
||||||
# properly on Heroku.
|
# properly on Heroku.
|
||||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
|
|
||||||
{%- if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
{%- if cookiecutter.use_sentry == 'y' %}
|
||||||
# raven sentry client
|
# raven sentry client
|
||||||
# See https://docs.sentry.io/clients/python/integrations/django/
|
# See https://docs.sentry.io/clients/python/integrations/django/
|
||||||
INSTALLED_APPS += ['raven.contrib.django.raven_compat', ]
|
INSTALLED_APPS += ['raven.contrib.django.raven_compat', ]
|
||||||
|
@ -42,7 +42,7 @@ INSTALLED_APPS += ['raven.contrib.django.raven_compat', ]
|
||||||
WHITENOISE_MIDDLEWARE = ['whitenoise.middleware.WhiteNoiseMiddleware', ]
|
WHITENOISE_MIDDLEWARE = ['whitenoise.middleware.WhiteNoiseMiddleware', ]
|
||||||
MIDDLEWARE = WHITENOISE_MIDDLEWARE + MIDDLEWARE
|
MIDDLEWARE = WHITENOISE_MIDDLEWARE + MIDDLEWARE
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
{%- if cookiecutter.use_sentry == 'y' -%}
|
||||||
RAVEN_MIDDLEWARE = ['raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware']
|
RAVEN_MIDDLEWARE = ['raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware']
|
||||||
MIDDLEWARE = RAVEN_MIDDLEWARE + MIDDLEWARE
|
MIDDLEWARE = RAVEN_MIDDLEWARE + MIDDLEWARE
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -213,7 +213,7 @@ CACHES = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
{% if cookiecutter.use_sentry == 'y' %}
|
||||||
# Sentry Configuration
|
# Sentry Configuration
|
||||||
SENTRY_DSN = env('DJANGO_SENTRY_DSN')
|
SENTRY_DSN = env('DJANGO_SENTRY_DSN')
|
||||||
SENTRY_CLIENT = env('DJANGO_SENTRY_CLIENT', default='raven.contrib.django.raven_compat.DjangoClient')
|
SENTRY_CLIENT = env('DJANGO_SENTRY_CLIENT', default='raven.contrib.django.raven_compat.DjangoClient')
|
||||||
|
@ -269,7 +269,7 @@ RAVEN_CONFIG = {
|
||||||
'CELERY_LOGLEVEL': env.int('DJANGO_SENTRY_LOG_LEVEL', logging.INFO),
|
'CELERY_LOGLEVEL': env.int('DJANGO_SENTRY_LOG_LEVEL', logging.INFO),
|
||||||
'DSN': SENTRY_DSN
|
'DSN': SENTRY_DSN
|
||||||
}
|
}
|
||||||
{% elif cookiecutter.use_sentry_for_error_reporting == 'n' %}
|
{% elif cookiecutter.use_sentry == 'n' %}
|
||||||
# LOGGING CONFIGURATION
|
# LOGGING CONFIGURATION
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#logging
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#logging
|
||||||
|
|
|
@ -23,7 +23,7 @@ from django.core.wsgi import get_wsgi_application
|
||||||
app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '')
|
app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '')
|
||||||
sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}'))
|
sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}'))
|
||||||
|
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
{% if cookiecutter.use_sentry == 'y' -%}
|
||||||
if os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production':
|
if os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production':
|
||||||
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
|
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
@ -38,7 +38,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production")
|
||||||
# file. This includes Django's development server, if the WSGI_APPLICATION
|
# file. This includes Django's development server, if the WSGI_APPLICATION
|
||||||
# setting points here.
|
# setting points here.
|
||||||
application = get_wsgi_application()
|
application = get_wsgi_application()
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
{% if cookiecutter.use_sentry == 'y' -%}
|
||||||
if os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production':
|
if os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production':
|
||||||
application = Sentry(application)
|
application = Sentry(application)
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -28,7 +28,7 @@ DJANGO_SECURE_SSL_REDIRECT=False
|
||||||
|
|
||||||
# django-allauth
|
# django-allauth
|
||||||
DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
|
DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
{% if cookiecutter.use_sentry == 'y' -%}
|
||||||
# Sentry
|
# Sentry
|
||||||
DJANGO_SENTRY_DSN=
|
DJANGO_SENTRY_DSN=
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -26,7 +26,7 @@ Collectfast==0.5.2
|
||||||
# -------------------------------------------------------
|
# -------------------------------------------------------
|
||||||
django-anymail==0.11.1
|
django-anymail==0.11.1
|
||||||
|
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
|
{% if cookiecutter.use_sentry == "y" -%}
|
||||||
# Raven is the Sentry client
|
# Raven is the Sentry client
|
||||||
# --------------------------
|
# --------------------------
|
||||||
raven==6.1.0
|
raven==6.1.0
|
||||||
|
|
|
@ -24,7 +24,7 @@ class CeleryConfig(AppConfig):
|
||||||
installed_apps = [app_config.name for app_config in apps.get_app_configs()]
|
installed_apps = [app_config.name for app_config in apps.get_app_configs()]
|
||||||
app.autodiscover_tasks(lambda: installed_apps, force=True)
|
app.autodiscover_tasks(lambda: installed_apps, force=True)
|
||||||
|
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
{% if cookiecutter.use_sentry == 'y' -%}
|
||||||
if hasattr(settings, 'RAVEN_CONFIG'):
|
if hasattr(settings, 'RAVEN_CONFIG'):
|
||||||
# Celery signal registration
|
# Celery signal registration
|
||||||
{% if cookiecutter.use_pycharm == 'y' -%}
|
{% if cookiecutter.use_pycharm == 'y' -%}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user