Merge branch 'master' into integrate-flower-locally

This commit is contained in:
Nikita P. Shupeyko 2018-06-10 20:12:02 +03:00
commit a954162baf
16 changed files with 18 additions and 40 deletions

View File

@ -1,5 +1,3 @@
# Config file for automatic testing at travis-ci.org
sudo: required
services:
@ -10,18 +8,18 @@ language: python
python: 3.6
env:
- TOX_ENV=py36
- TOX_ENV=py36
before_install:
- docker-compose -v
- docker -v
script:
- tox -e $TOX_ENV
- sh tests/test_docker.sh
- tox -e $TOX_ENV
- sh tests/test_docker.sh
install:
- pip install tox
- pip install tox
notifications:
email:

View File

@ -18,6 +18,7 @@
"use_pycharm": "n",
"use_docker": "n",
"postgresql_version": [
"10.4",
"10.3",
"10.2",
"10.1",

View File

@ -9,5 +9,5 @@ flake8==3.5.0
# Testing
# ------------------------------------------------------------------------------
tox==3.0.0
pytest==3.6.0
pytest==3.6.1
pytest-cookies==0.3.0

View File

@ -341,3 +341,5 @@ pip-selfcheck.json
MailHog
{%- endif %}
{{ cookiecutter.project_slug }}/media/
.pytest_cache/

View File

@ -1,9 +1,7 @@
#!/bin/sh
set -o errexit
set -o pipefail
set -o nounset
set -o xtrace
rm -f './celerybeat.pid'

View File

@ -1,9 +1,7 @@
#!/bin/sh
set -o errexit
set -o pipefail
set -o nounset
set -o xtrace
celery -A {{cookiecutter.project_slug}}.taskapp worker -l INFO

View File

@ -3,7 +3,6 @@
set -o errexit
set -o pipefail
set -o nounset
set -o xtrace
python manage.py migrate

View File

@ -75,7 +75,7 @@ THIRD_PARTY_APPS = [
'rest_framework',
]
LOCAL_APPS = [
'{{ cookiecutter.project_slug }}.users.apps.UsersConfig',
'{{ cookiecutter.project_slug }}.users.apps.UsersAppConfig',
# Your stuff: custom apps go here
]
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
@ -228,7 +228,7 @@ MANAGERS = ADMINS
{% if cookiecutter.use_celery == 'y' -%}
# Celery
# ------------------------------------------------------------------------------
INSTALLED_APPS += ['{{cookiecutter.project_slug}}.taskapp.celery.CeleryConfig']
INSTALLED_APPS += ['{{cookiecutter.project_slug}}.taskapp.celery.CeleryAppConfig']
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-broker_url
CELERY_BROKER_URL = env('CELERY_BROKER_URL', default='django://')
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-result_backend

View File

@ -62,9 +62,6 @@ services:
{% if cookiecutter.use_mailhog == 'y' -%}
- mailhog
{%- endif %}
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports: []
command: /start-celeryworker
@ -77,9 +74,6 @@ services:
{% if cookiecutter.use_mailhog == 'y' -%}
- mailhog
{%- endif %}
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports: []
command: /start-celerybeat

View File

@ -52,23 +52,11 @@ services:
celeryworker:
<<: *django
image: {{ cookiecutter.project_slug }}_production_celeryworker
depends_on:
- postgres
- redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start-celeryworker
celerybeat:
<<: *django
image: {{ cookiecutter.project_slug }}_production_celerybeat
depends_on:
- postgres
- redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start-celerybeat
{%- endif %}

View File

@ -15,7 +15,7 @@ celery==3.1.25 # pyup: <4.0 # https://github.com/celery/celery
# Django
# ------------------------------------------------------------------------------
django==2.0.5 # pyup: < 2.1 # https://www.djangoproject.com/
django==2.0.6 # pyup: < 2.1 # https://www.djangoproject.com/
django-environ==0.4.4 # https://github.com/joke2k/django-environ
django-model-utils==3.1.2 # https://github.com/jazzband/django-model-utils
django-allauth==0.36.0 # https://github.com/pennersr/django-allauth

View File

@ -2,7 +2,7 @@
Werkzeug==0.14.1 # https://github.com/pallets/werkzeug
ipdb==0.11 # https://github.com/gotcha/ipdb
Sphinx==1.7.4 # https://github.com/sphinx-doc/sphinx
Sphinx==1.7.5 # https://github.com/sphinx-doc/sphinx
{%- if cookiecutter.use_docker == 'y' %}
psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
{%- else %}
@ -14,7 +14,7 @@ flower==0.9.2 # https://github.com/mher/flower
# Testing
# ------------------------------------------------------------------------------
pytest==3.6.0 # https://github.com/pytest-dev/pytest
pytest==3.6.1 # https://github.com/pytest-dev/pytest
pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar
# Code quality

View File

@ -8,10 +8,10 @@ psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
Collectfast==0.6.2 # https://github.com/antonagestam/collectfast
{%- endif %}
{%- if cookiecutter.use_sentry == "y" %}
raven==6.8.0 # https://github.com/getsentry/raven-python
raven==6.9.0 # https://github.com/getsentry/raven-python
{%- endif %}
# Django
# ------------------------------------------------------------------------------
django-storages[boto3]==1.6.6 # https://github.com/jschneier/django-storages
django-anymail[mailgun]==2.2 # https://github.com/anymail/django-anymail
django-anymail[mailgun]==3.0 # https://github.com/anymail/django-anymail

View File

@ -13,7 +13,7 @@ if not settings.configured:
app = Celery('{{cookiecutter.project_slug}}')
class CeleryConfig(AppConfig):
class CeleryAppConfig(AppConfig):
name = '{{cookiecutter.project_slug}}.taskapp'
verbose_name = 'Celery Config'

View File

@ -1,7 +1,7 @@
from django.apps import AppConfig
class UsersConfig(AppConfig):
class UsersAppConfig(AppConfig):
name = "{{cookiecutter.project_slug}}.users"
verbose_name = "Users"

View File

@ -8,7 +8,7 @@ urlpatterns = [
path("~redirect/", view=views.UserRedirectView.as_view(), name="redirect"),
path("~update/", view=views.UserUpdateView.as_view(), name="update"),
path(
"<str:username>",
"<str:username>/",
view=views.UserDetailView.as_view(),
name="detail",
),