mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 22:44:54 +03:00
Merge branch 'master' into integrate-flower-locally
This commit is contained in:
commit
a954162baf
10
.travis.yml
10
.travis.yml
|
@ -1,5 +1,3 @@
|
||||||
# Config file for automatic testing at travis-ci.org
|
|
||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -10,18 +8,18 @@ language: python
|
||||||
python: 3.6
|
python: 3.6
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- TOX_ENV=py36
|
- TOX_ENV=py36
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- docker-compose -v
|
- docker-compose -v
|
||||||
- docker -v
|
- docker -v
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- tox -e $TOX_ENV
|
- tox -e $TOX_ENV
|
||||||
- sh tests/test_docker.sh
|
- sh tests/test_docker.sh
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install tox
|
- pip install tox
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
"use_pycharm": "n",
|
"use_pycharm": "n",
|
||||||
"use_docker": "n",
|
"use_docker": "n",
|
||||||
"postgresql_version": [
|
"postgresql_version": [
|
||||||
|
"10.4",
|
||||||
"10.3",
|
"10.3",
|
||||||
"10.2",
|
"10.2",
|
||||||
"10.1",
|
"10.1",
|
||||||
|
|
|
@ -9,5 +9,5 @@ flake8==3.5.0
|
||||||
# Testing
|
# Testing
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
tox==3.0.0
|
tox==3.0.0
|
||||||
pytest==3.6.0
|
pytest==3.6.1
|
||||||
pytest-cookies==0.3.0
|
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
|
MailHog
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{{ cookiecutter.project_slug }}/media/
|
{{ cookiecutter.project_slug }}/media/
|
||||||
|
|
||||||
|
.pytest_cache/
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o pipefail
|
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
|
|
||||||
rm -f './celerybeat.pid'
|
rm -f './celerybeat.pid'
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o pipefail
|
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
|
|
||||||
celery -A {{cookiecutter.project_slug}}.taskapp worker -l INFO
|
celery -A {{cookiecutter.project_slug}}.taskapp worker -l INFO
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
|
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
|
|
|
@ -75,7 +75,7 @@ THIRD_PARTY_APPS = [
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
]
|
]
|
||||||
LOCAL_APPS = [
|
LOCAL_APPS = [
|
||||||
'{{ cookiecutter.project_slug }}.users.apps.UsersConfig',
|
'{{ cookiecutter.project_slug }}.users.apps.UsersAppConfig',
|
||||||
# Your stuff: custom apps go here
|
# Your stuff: custom apps go here
|
||||||
]
|
]
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
|
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
|
||||||
|
@ -228,7 +228,7 @@ MANAGERS = ADMINS
|
||||||
{% if cookiecutter.use_celery == 'y' -%}
|
{% if cookiecutter.use_celery == 'y' -%}
|
||||||
# Celery
|
# 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
|
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-broker_url
|
||||||
CELERY_BROKER_URL = env('CELERY_BROKER_URL', default='django://')
|
CELERY_BROKER_URL = env('CELERY_BROKER_URL', default='django://')
|
||||||
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-result_backend
|
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-result_backend
|
||||||
|
|
|
@ -62,9 +62,6 @@ services:
|
||||||
{% if cookiecutter.use_mailhog == 'y' -%}
|
{% if cookiecutter.use_mailhog == 'y' -%}
|
||||||
- mailhog
|
- mailhog
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
env_file:
|
|
||||||
- ./.envs/.local/.django
|
|
||||||
- ./.envs/.local/.postgres
|
|
||||||
ports: []
|
ports: []
|
||||||
command: /start-celeryworker
|
command: /start-celeryworker
|
||||||
|
|
||||||
|
@ -77,9 +74,6 @@ services:
|
||||||
{% if cookiecutter.use_mailhog == 'y' -%}
|
{% if cookiecutter.use_mailhog == 'y' -%}
|
||||||
- mailhog
|
- mailhog
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
env_file:
|
|
||||||
- ./.envs/.local/.django
|
|
||||||
- ./.envs/.local/.postgres
|
|
||||||
ports: []
|
ports: []
|
||||||
command: /start-celerybeat
|
command: /start-celerybeat
|
||||||
|
|
||||||
|
|
|
@ -52,23 +52,11 @@ services:
|
||||||
celeryworker:
|
celeryworker:
|
||||||
<<: *django
|
<<: *django
|
||||||
image: {{ cookiecutter.project_slug }}_production_celeryworker
|
image: {{ cookiecutter.project_slug }}_production_celeryworker
|
||||||
depends_on:
|
|
||||||
- postgres
|
|
||||||
- redis
|
|
||||||
env_file:
|
|
||||||
- ./.envs/.production/.django
|
|
||||||
- ./.envs/.production/.postgres
|
|
||||||
command: /start-celeryworker
|
command: /start-celeryworker
|
||||||
|
|
||||||
celerybeat:
|
celerybeat:
|
||||||
<<: *django
|
<<: *django
|
||||||
image: {{ cookiecutter.project_slug }}_production_celerybeat
|
image: {{ cookiecutter.project_slug }}_production_celerybeat
|
||||||
depends_on:
|
|
||||||
- postgres
|
|
||||||
- redis
|
|
||||||
env_file:
|
|
||||||
- ./.envs/.production/.django
|
|
||||||
- ./.envs/.production/.postgres
|
|
||||||
command: /start-celerybeat
|
command: /start-celerybeat
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -15,7 +15,7 @@ celery==3.1.25 # pyup: <4.0 # https://github.com/celery/celery
|
||||||
|
|
||||||
# Django
|
# 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-environ==0.4.4 # https://github.com/joke2k/django-environ
|
||||||
django-model-utils==3.1.2 # https://github.com/jazzband/django-model-utils
|
django-model-utils==3.1.2 # https://github.com/jazzband/django-model-utils
|
||||||
django-allauth==0.36.0 # https://github.com/pennersr/django-allauth
|
django-allauth==0.36.0 # https://github.com/pennersr/django-allauth
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Werkzeug==0.14.1 # https://github.com/pallets/werkzeug
|
Werkzeug==0.14.1 # https://github.com/pallets/werkzeug
|
||||||
ipdb==0.11 # https://github.com/gotcha/ipdb
|
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' %}
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
|
psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
|
||||||
{%- else %}
|
{%- else %}
|
||||||
|
@ -14,7 +14,7 @@ flower==0.9.2 # https://github.com/mher/flower
|
||||||
|
|
||||||
# Testing
|
# 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
|
pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar
|
||||||
|
|
||||||
# Code quality
|
# 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
|
Collectfast==0.6.2 # https://github.com/antonagestam/collectfast
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_sentry == "y" %}
|
{%- 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 %}
|
{%- endif %}
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
django-storages[boto3]==1.6.6 # https://github.com/jschneier/django-storages
|
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}}')
|
app = Celery('{{cookiecutter.project_slug}}')
|
||||||
|
|
||||||
|
|
||||||
class CeleryConfig(AppConfig):
|
class CeleryAppConfig(AppConfig):
|
||||||
name = '{{cookiecutter.project_slug}}.taskapp'
|
name = '{{cookiecutter.project_slug}}.taskapp'
|
||||||
verbose_name = 'Celery Config'
|
verbose_name = 'Celery Config'
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class UsersConfig(AppConfig):
|
class UsersAppConfig(AppConfig):
|
||||||
name = "{{cookiecutter.project_slug}}.users"
|
name = "{{cookiecutter.project_slug}}.users"
|
||||||
verbose_name = "Users"
|
verbose_name = "Users"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ urlpatterns = [
|
||||||
path("~redirect/", view=views.UserRedirectView.as_view(), name="redirect"),
|
path("~redirect/", view=views.UserRedirectView.as_view(), name="redirect"),
|
||||||
path("~update/", view=views.UserUpdateView.as_view(), name="update"),
|
path("~update/", view=views.UserUpdateView.as_view(), name="update"),
|
||||||
path(
|
path(
|
||||||
"<str:username>",
|
"<str:username>/",
|
||||||
view=views.UserDetailView.as_view(),
|
view=views.UserDetailView.as_view(),
|
||||||
name="detail",
|
name="detail",
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user