mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-05 04:30:16 +03:00
Fix linebreaks
This commit is contained in:
parent
c6e30c1e3c
commit
45dd6335e3
|
@ -27,16 +27,20 @@ class CeleryConfig(AppConfig):
|
|||
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
||||
if hasattr(settings, 'RAVEN_CONFIG'):
|
||||
# Celery signal registration{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
# Celery signal registration
|
||||
{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
# Since raven is required in production only,
|
||||
# imports might (most surely will) be wiped out
|
||||
# during PyCharm code clean up started
|
||||
# in other environments.
|
||||
# @formatter:off{%- endif %}
|
||||
# @formatter:off
|
||||
{%- endif %}
|
||||
from raven import Client as RavenClient
|
||||
from raven.contrib.celery import register_signal as raven_register_signal
|
||||
from raven.contrib.celery import register_logger_signal as raven_register_logger_signal{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
# @formatter:on{%- endif %}
|
||||
from raven.contrib.celery import register_logger_signal as raven_register_logger_signal
|
||||
{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
# @formatter:on
|
||||
{%- endif %}
|
||||
|
||||
raven_client = RavenClient(dsn=settings.RAVEN_CONFIG['DSN'])
|
||||
raven_register_logger_signal(raven_client)
|
||||
|
@ -44,17 +48,21 @@ class CeleryConfig(AppConfig):
|
|||
{%- endif %}
|
||||
|
||||
{% if cookiecutter.use_opbeat == 'y' -%}
|
||||
if hasattr(settings, 'OPBEAT'):{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
if hasattr(settings, 'OPBEAT'):
|
||||
{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
# Since opbeat is required in production only,
|
||||
# imports might (most surely will) be wiped out
|
||||
# during PyCharm code clean up started
|
||||
# in other environments.
|
||||
# @formatter:off{%- endif %}
|
||||
# @formatter:off
|
||||
{%- endif %}
|
||||
from opbeat.contrib.django.models import client as opbeat_client
|
||||
from opbeat.contrib.django.models import logger as opbeat_logger
|
||||
from opbeat.contrib.django.models import register_handlers as opbeat_register_handlers
|
||||
from opbeat.contrib.celery import register_signal as opbeat_register_signal{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
# @formatter:on{%- endif %}
|
||||
from opbeat.contrib.celery import register_signal as opbeat_register_signal
|
||||
{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
# @formatter:on
|
||||
{%- endif %}
|
||||
|
||||
try:
|
||||
opbeat_register_signal(opbeat_client)
|
||||
|
|
Loading…
Reference in New Issue
Block a user