mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 06:24:52 +03:00
Merge branch 'master' into integrate-flower-locally
This commit is contained in:
commit
a954162baf
|
@ -1,5 +1,3 @@
|
|||
# Config file for automatic testing at travis-ci.org
|
||||
|
||||
sudo: required
|
||||
|
||||
services:
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"use_pycharm": "n",
|
||||
"use_docker": "n",
|
||||
"postgresql_version": [
|
||||
"10.4",
|
||||
"10.3",
|
||||
"10.2",
|
||||
"10.1",
|
||||
|
|
|
@ -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
|
||||
|
|
2
{{cookiecutter.project_slug}}/.gitignore
vendored
2
{{cookiecutter.project_slug}}/.gitignore
vendored
|
@ -341,3 +341,5 @@ pip-selfcheck.json
|
|||
MailHog
|
||||
{%- endif %}
|
||||
{{ cookiecutter.project_slug }}/media/
|
||||
|
||||
.pytest_cache/
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
set -o xtrace
|
||||
|
||||
|
||||
rm -f './celerybeat.pid'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
set -o xtrace
|
||||
|
||||
|
||||
python manage.py migrate
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class UsersConfig(AppConfig):
|
||||
class UsersAppConfig(AppConfig):
|
||||
name = "{{cookiecutter.project_slug}}.users"
|
||||
verbose_name = "Users"
|
||||
|
||||
|
|
|
@ -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",
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue
Block a user