mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-02 20:54:41 +03:00
Merge branch 'master' of github.com:pydanny/cookiecutter-django
This commit is contained in:
commit
8673505683
|
@ -7,5 +7,5 @@ binaryornot==0.4.3
|
||||||
pytest==3.0.7
|
pytest==3.0.7
|
||||||
pep8==1.7.0
|
pep8==1.7.0
|
||||||
pyflakes==1.5.0
|
pyflakes==1.5.0
|
||||||
tox==2.6.0
|
tox==2.7.0
|
||||||
pytest-cookies==0.2.0
|
pytest-cookies==0.2.0
|
||||||
|
|
3
{{cookiecutter.project_slug}}/.gitignore
vendored
3
{{cookiecutter.project_slug}}/.gitignore
vendored
|
@ -76,3 +76,6 @@ mailhog
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
staticfiles/
|
staticfiles/
|
||||||
|
|
||||||
|
.cache/
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
coverage==4.3.4
|
coverage==4.3.4
|
||||||
django-coverage-plugin==1.5.0
|
django-coverage-plugin==1.5.0
|
||||||
|
|
||||||
Sphinx==1.5.3
|
Sphinx==1.5.5
|
||||||
django-extensions==1.7.8
|
django-extensions==1.7.8
|
||||||
Werkzeug==0.12.1
|
Werkzeug==0.12.1
|
||||||
django-test-plus==1.0.17
|
django-test-plus==1.0.17
|
||||||
|
|
|
@ -28,9 +28,19 @@ class CeleryConfig(AppConfig):
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
||||||
if hasattr(settings, 'RAVEN_CONFIG'):
|
if hasattr(settings, 'RAVEN_CONFIG'):
|
||||||
# Celery signal registration
|
# 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 %}
|
||||||
from raven import Client as RavenClient
|
from raven import Client as RavenClient
|
||||||
from raven.contrib.celery import register_signal as raven_register_signal
|
from raven.contrib.celery import register_signal as raven_register_signal
|
||||||
from raven.contrib.celery import register_logger_signal as raven_register_logger_signal
|
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_client = RavenClient(dsn=settings.RAVEN_CONFIG['DSN'])
|
||||||
raven_register_logger_signal(raven_client)
|
raven_register_logger_signal(raven_client)
|
||||||
|
@ -39,10 +49,20 @@ class CeleryConfig(AppConfig):
|
||||||
|
|
||||||
{% if cookiecutter.use_opbeat == 'y' -%}
|
{% if cookiecutter.use_opbeat == 'y' -%}
|
||||||
if hasattr(settings, 'OPBEAT'):
|
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 %}
|
||||||
from opbeat.contrib.django.models import client as opbeat_client
|
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 logger as opbeat_logger
|
||||||
from opbeat.contrib.django.models import register_handlers as opbeat_register_handlers
|
from opbeat.contrib.django.models import register_handlers as opbeat_register_handlers
|
||||||
from opbeat.contrib.celery import register_signal as opbeat_register_signal
|
from opbeat.contrib.celery import register_signal as opbeat_register_signal
|
||||||
|
{% if cookiecutter.use_pycharm == 'y' -%}
|
||||||
|
# @formatter:on
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opbeat_register_signal(opbeat_client)
|
opbeat_register_signal(opbeat_client)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user