mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-07 13:34:53 +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_celery [n]: y
|
||||
use_mailhog [n]: n
|
||||
use_sentry_for_error_reporting [y]: y
|
||||
use_sentry [y]: y
|
||||
use_opbeat [n]: y
|
||||
use_pycharm [n]: y
|
||||
windows [n]: n
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"use_whitenoise": "y",
|
||||
"use_celery": "n",
|
||||
"use_mailhog": "n",
|
||||
"use_sentry_for_error_reporting": "y",
|
||||
"use_sentry": "y",
|
||||
"use_opbeat": "n",
|
||||
"use_pycharm": "n",
|
||||
"windows": "n",
|
||||
|
|
|
@ -42,7 +42,7 @@ use_mailhog [n]
|
|||
executable for your operating system, see the 'Developing Locally' docs
|
||||
for instructions.
|
||||
|
||||
use_sentry_for_error_reporting [n]
|
||||
use_sentry [n]
|
||||
Whether to use Sentry_ to log errors from your project.
|
||||
|
||||
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.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == "y" %}
|
||||
{% if cookiecutter.use_sentry == "y" %}
|
||||
|
||||
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 mailgun to send emails
|
||||
- Use Redis for cache
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
||||
{% if cookiecutter.use_sentry == 'y' %}
|
||||
- Use sentry for error logging
|
||||
{% endif %}
|
||||
{% if cookiecutter.use_opbeat == 'y' %}
|
||||
|
@ -14,7 +14,7 @@ Production Configurations
|
|||
{% endif %}
|
||||
"""
|
||||
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
||||
{% if cookiecutter.use_sentry == 'y' %}
|
||||
import logging
|
||||
{% endif %}
|
||||
|
||||
|
@ -31,7 +31,7 @@ SECRET_KEY = env('DJANGO_SECRET_KEY')
|
|||
# properly on Heroku.
|
||||
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
|
||||
# See https://docs.sentry.io/clients/python/integrations/django/
|
||||
INSTALLED_APPS += ['raven.contrib.django.raven_compat', ]
|
||||
|
@ -42,7 +42,7 @@ INSTALLED_APPS += ['raven.contrib.django.raven_compat', ]
|
|||
WHITENOISE_MIDDLEWARE = ['whitenoise.middleware.WhiteNoiseMiddleware', ]
|
||||
MIDDLEWARE = WHITENOISE_MIDDLEWARE + MIDDLEWARE
|
||||
{% endif %}
|
||||
{%- if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
||||
{%- if cookiecutter.use_sentry == 'y' -%}
|
||||
RAVEN_MIDDLEWARE = ['raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware']
|
||||
MIDDLEWARE = RAVEN_MIDDLEWARE + MIDDLEWARE
|
||||
{% endif %}
|
||||
|
@ -213,7 +213,7 @@ CACHES = {
|
|||
}
|
||||
}
|
||||
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
||||
{% if cookiecutter.use_sentry == 'y' %}
|
||||
# Sentry Configuration
|
||||
SENTRY_DSN = env('DJANGO_SENTRY_DSN')
|
||||
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),
|
||||
'DSN': SENTRY_DSN
|
||||
}
|
||||
{% elif cookiecutter.use_sentry_for_error_reporting == 'n' %}
|
||||
{% elif cookiecutter.use_sentry == 'n' %}
|
||||
# LOGGING CONFIGURATION
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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', '')
|
||||
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':
|
||||
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
|
||||
{%- 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
|
||||
# setting points here.
|
||||
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':
|
||||
application = Sentry(application)
|
||||
{%- endif %}
|
||||
|
|
|
@ -28,7 +28,7 @@ DJANGO_SECURE_SSL_REDIRECT=False
|
|||
|
||||
# django-allauth
|
||||
DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
||||
{% if cookiecutter.use_sentry == 'y' -%}
|
||||
# Sentry
|
||||
DJANGO_SENTRY_DSN=
|
||||
{% endif %}
|
||||
|
|
|
@ -26,7 +26,7 @@ Collectfast==0.5.2
|
|||
# -------------------------------------------------------
|
||||
django-anymail==0.11.1
|
||||
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
|
||||
{% if cookiecutter.use_sentry == "y" -%}
|
||||
# Raven is the Sentry client
|
||||
# --------------------------
|
||||
raven==6.1.0
|
||||
|
|
|
@ -24,7 +24,7 @@ class CeleryConfig(AppConfig):
|
|||
installed_apps = [app_config.name for app_config in apps.get_app_configs()]
|
||||
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'):
|
||||
# Celery signal registration
|
||||
{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
|
|
Loading…
Reference in New Issue
Block a user