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
16c4d8e369
33
.github/ISSUE_TEMPLATE.md
vendored
33
.github/ISSUE_TEMPLATE.md
vendored
|
@ -1,32 +1 @@
|
|||
**Note: for support questions, please use the `cookiecutter-django` tag on stackoverflow**. This repository's issues are reserved for feature requests and bug reports.
|
||||
|
||||
* **I'm submitting a ... **
|
||||
- [ ] bug report
|
||||
- [ ] feature request
|
||||
- [ ] support request => Please do not submit support request here, see note at the top of this template.
|
||||
|
||||
|
||||
* **Do you want to request a *feature* or report a *bug*?**
|
||||
|
||||
|
||||
|
||||
* **What is the current behavior?**
|
||||
|
||||
|
||||
|
||||
* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem**
|
||||
|
||||
|
||||
* **What is the expected behavior?**
|
||||
|
||||
|
||||
|
||||
* **What is the motivation / use case for changing the behavior?**
|
||||
|
||||
|
||||
|
||||
* **Please tell us about your environment:**
|
||||
|
||||
|
||||
|
||||
* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
|
||||
## [Make sure to follow one of the issue templates we've got](https://github.com/pydanny/cookiecutter-django/issues/new/choose), otherwise the issue might be closed immeditely
|
||||
|
|
23
.github/ISSUE_TEMPLATE/bug.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE/bug.md
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
name: Bug Report
|
||||
about: Report a bug
|
||||
---
|
||||
|
||||
## What happened?
|
||||
|
||||
|
||||
|
||||
|
||||
## What should've happened instead?
|
||||
|
||||
|
||||
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
[//]: # (Any or all of the following:)
|
||||
[//]: # (* Host system configuration: OS, Docker & friends' versions etc.)
|
||||
[//]: # (* Project generation options)
|
||||
[//]: # (* Logs)
|
||||
|
||||
|
24
.github/ISSUE_TEMPLATE/feature.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/feature.md
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
name: New Feature Proposal
|
||||
about: Propose a new feature
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
[//]: # (What's it you're proposing? How should it be implemented?)
|
||||
|
||||
|
||||
|
||||
|
||||
## Rationale
|
||||
|
||||
[//]: # (Why should this feature be implemented?)
|
||||
|
||||
|
||||
|
||||
|
||||
## Use case(s) / visualization(s)
|
||||
|
||||
[//]: # ("Better to see something once than to hear about it a thousand times.")
|
||||
|
||||
|
24
.github/ISSUE_TEMPLATE/improvement.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/improvement.md
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
name: Improvement Suggestion
|
||||
about: Let us know how we could improve
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
[//]: # (What's it you're proposing? How should it be implemented?)
|
||||
|
||||
|
||||
|
||||
|
||||
## Rationale
|
||||
|
||||
[//]: # (Why should this feature be implemented?)
|
||||
|
||||
|
||||
|
||||
|
||||
## Use case(s) / visualization(s)
|
||||
|
||||
[//]: # ("Better to see something once than to hear about it a thousand times.")
|
||||
|
||||
|
10
.github/ISSUE_TEMPLATE/paid-support.md
vendored
Normal file
10
.github/ISSUE_TEMPLATE/paid-support.md
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
name: Paid Support Request
|
||||
about: Ask Core Team members to help you out
|
||||
---
|
||||
|
||||
Provided your question goes beyound [regular support](https://github.com/pydanny/cookiecutter-django/issues/new?template=question.md), and/or the task at hand is of timely/high priority nature use the below information to reach out for contributors directly.
|
||||
|
||||
* Daniel Roy Greenfeld, Project Lead ([GitHub](https://github.com/pydanny), [Patreon](https://www.patreon.com/danielroygreenfeld)): expertise in Django and AWS ELB.
|
||||
|
||||
* Nikita Shupeyko, Core Developer ([GitHub](https://github.com/webyneter)): expertise in Django, Docker, and Heroku.
|
6
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
6
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Question
|
||||
about: Please, ask your question on StackOverflow or Gitter
|
||||
---
|
||||
|
||||
First, make sure to examine [the docs](https://cookiecutter-django.readthedocs.io/en/latest/). If that doesn't help post a question on [StackOverflow](https://stackoverflow.com/questions/tagged/cookiecutter-django) tagged with `cookiecutter-django`. Finally, feel free to join [Gitter](https://gitter.im/pydanny/cookiecutter-django) and ask around.
|
28
.github/ISSUE_TEMPLATE/regression.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/regression.md
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
name: Regression Report
|
||||
about: Let us know if something that'd been working has broke
|
||||
---
|
||||
|
||||
## What happened before?
|
||||
|
||||
|
||||
|
||||
|
||||
## What happens now?
|
||||
|
||||
|
||||
|
||||
|
||||
## Last stable commit / Since when?
|
||||
|
||||
|
||||
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
[//]: # (Any or all of the following:)
|
||||
[//]: # (* Host system configuration: OS, Docker & friends' versions etc.)
|
||||
[//]: # (* Project generation options)
|
||||
[//]: # (* Logs)
|
||||
|
||||
|
27
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
27
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
[//]: # (Thank you for helping us out: your efforts mean great deal to the project and the community as a whole!)
|
||||
|
||||
[//]: # (Before you proceed:)
|
||||
|
||||
[//]: # (1. Make sure to add yourself to `CONTRIBUTORS.rst` through this PR provided you're contributing here for the first time)
|
||||
[//]: # (2. Don't forget to update the `docs/` presuming others would benefit from a concise description of whatever that you're proposing)
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
[//]: # (What's it you're proposing?)
|
||||
|
||||
|
||||
|
||||
|
||||
## Rationale
|
||||
|
||||
[//]: # (Why does the project need that?)
|
||||
|
||||
|
||||
|
||||
|
||||
## Use case(s) / visualization(s)
|
||||
|
||||
[//]: # ("Better to see something once than to hear about it a thousand times.")
|
||||
|
||||
|
|
@ -120,6 +120,7 @@ Listed in alphabetical order.
|
|||
Lyla Fischer
|
||||
Malik Sulaimanov `@flyudvik`_ @flyudvik
|
||||
Martin Blech
|
||||
Martin Saizar `@msaizar`_
|
||||
Mathijs Hoogland `@MathijsHoogland`_
|
||||
Matt Braymer-Hayes `@mattayes`_ @mattayes
|
||||
Matt Linares
|
||||
|
@ -218,6 +219,7 @@ Listed in alphabetical order.
|
|||
.. _@kevgathuku: https://github.com/kevgathuku
|
||||
.. _@knitatoms: https://github.com/knitatoms
|
||||
.. _@krzysztofzuraw: https://github.com/krzysztofzuraw
|
||||
.. _@msaizar: https://github.com/msaizar
|
||||
.. _@MathijsHoogland: https://github.com/MathijsHoogland
|
||||
.. _@mattayes: https://github.com/mattayes
|
||||
.. _@menzenski: https://github.com/menzenski
|
||||
|
|
|
@ -280,6 +280,8 @@ experience better.
|
|||
Articles
|
||||
---------
|
||||
|
||||
* `cookiecutter-django with Nginx, Route 53 and ELB`_ - Feb. 12, 2018
|
||||
* `cookiecutter-django and Amazon RDS`_ - Feb. 7, 2018
|
||||
* `Deploying Cookiecutter-Django with Docker-Compose`_ - Oct. 19, 2017
|
||||
* `Using Cookiecutter to Jumpstart a Django Project on Windows with PyCharm`_ - May 19, 2017
|
||||
* `Exploring with Cookiecutter`_ - Dec. 3, 2016
|
||||
|
@ -291,6 +293,8 @@ Articles
|
|||
|
||||
Have a blog or online publication? Write about your cookiecutter-django tips and tricks, then send us a pull request with the link.
|
||||
|
||||
.. _`cookiecutter-django with Nginx, Route 53 and ELB`: https://msaizar.com/blog/cookiecutter-django-nginx-route-53-and-elb/
|
||||
.. _`cookiecutter-django and Amazon RDS`: https://msaizar.com/blog/cookiecutter-django-and-amazon-rds/
|
||||
.. _`Deploying Cookiecutter-Django with Docker-Compose`: http://adamantine.me/2017/10/19/deploying-cookiecutter-django-with-docker-compose/
|
||||
.. _`Exploring with Cookiecutter`: http://www.snowboardingcoder.com/django/2016/12/03/exploring-with-cookiecutter/
|
||||
.. _`Using Cookiecutter to Jumpstart a Django Project on Windows with PyCharm`: https://joshuahunter.com/posts/using-cookiecutter-to-jumpstart-a-django-project-on-windows-with-pycharm/
|
||||
|
|
|
@ -14,26 +14,31 @@ Run these commands to deploy the project to Heroku:
|
|||
heroku pg:promote DATABASE_URL
|
||||
|
||||
heroku addons:create heroku-redis:hobby-dev
|
||||
heroku addons:create mailgun
|
||||
|
||||
heroku config:set WEB_CONCURRENCY=4
|
||||
# Generating a 32 character-long random string without any of the visually similiar characters "IOl01":
|
||||
heroku config:set DJANGO_ADMIN_URL="$(openssl rand -base64 4096 | tr -dc 'A-HJ-NP-Za-km-z2-9' | head -c 32)/"
|
||||
heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)"
|
||||
heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production
|
||||
heroku config:set DJANGO_ALLOWED_HOSTS='.herokuapp.com'
|
||||
# If using mailgun:
|
||||
heroku addons:create mailgun:starter
|
||||
|
||||
heroku config:set DJANGO_AWS_ACCESS_KEY_ID=YOUR_AWS_ID_HERE
|
||||
heroku config:set DJANGO_AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY_HERE
|
||||
heroku config:set DJANGO_AWS_STORAGE_BUCKET_NAME=YOUR_AWS_S3_BUCKET_NAME_HERE
|
||||
|
||||
# This is to be set only if you're using Sentry:
|
||||
heroku config:set DJANGO_SENTRY_DSN=YOUR_SENTRY_DSN
|
||||
heroku addons:create sentry:f1
|
||||
|
||||
heroku config:set PYTHONHASHSEED=random
|
||||
heroku config:set WEB_CONCURRENCY=4
|
||||
heroku config:set DJANGO_DEBUG=False
|
||||
heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production
|
||||
heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)"
|
||||
# Generating a 32 character-long random string without any of the visually similiar characters "IOl01":
|
||||
heroku config:set DJANGO_ADMIN_URL="$(openssl rand -base64 4096 | tr -dc 'A-HJ-NP-Za-km-z2-9' | head -c 32)/"
|
||||
heroku config:set DJANGO_ALLOWED_HOSTS= # Set this to your Heroku app url, e.g. 'bionic-beaver-28392.herokuapp.com'
|
||||
|
||||
heroku config:set DJANGO_AWS_ACCESS_KEY_ID= # Assign with AWS_ACCESS_KEY_ID
|
||||
heroku config:set DJANGO_AWS_SECRET_ACCESS_KEY= # Assign with AWS_SECRET_ACCESS_KEY
|
||||
heroku config:set DJANGO_AWS_STORAGE_BUCKET_NAME= # Assign with AWS_STORAGE_BUCKET_NAME
|
||||
|
||||
git push heroku master
|
||||
|
||||
heroku run python manage.py migrate
|
||||
heroku run python manage.py check --deploy
|
||||
heroku run python manage.py createsuperuser
|
||||
heroku run python manage.py collectstatic --no-input
|
||||
|
||||
heroku run python manage.py check --deploy
|
||||
|
||||
heroku open
|
||||
|
|
|
@ -32,7 +32,7 @@ Configuring the Stack
|
|||
|
||||
The majority of services above are configured through the use of environment variables. Just check out :ref:`envs` and you will know the drill.
|
||||
|
||||
To obtain logs and information about crashes in a production setup, make sure that you have access to an external Sentry instance (e.g. by creating an account with `sentry.io`_), and set the ``DJANGO_SENTRY_DSN`` variable.
|
||||
To obtain logs and information about crashes in a production setup, make sure that you have access to an external Sentry instance (e.g. by creating an account with `sentry.io`_), and set the ``SENTRY_DSN`` variable.
|
||||
|
||||
You will probably also need to setup the Mail backend, for example by adding a `Mailgun`_ API key and a `Mailgun`_ sender domain, otherwise, the account creation view will crash and result in a 500 error when the backend attempts to send an email to the account owner.
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ Environment Variable Django Setting Development
|
|||
DJANGO_AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_ID n/a raises error
|
||||
DJANGO_AWS_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY n/a raises error
|
||||
DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a raises error
|
||||
DJANGO_SENTRY_DSN SENTRY_DSN n/a raises error
|
||||
SENTRY_DSN SENTRY_DSN n/a raises error
|
||||
DJANGO_SENTRY_CLIENT SENTRY_CLIENT n/a raven.contrib.django.raven_compat.DjangoClient
|
||||
DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO
|
||||
MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error
|
||||
|
|
|
@ -9,5 +9,5 @@ flake8==3.5.0
|
|||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
tox==3.0.0
|
||||
pytest==3.5.1
|
||||
pytest==3.6.0
|
||||
pytest-cookies==0.3.0
|
||||
|
|
|
@ -37,7 +37,7 @@ WEB_CONCURRENCY=4
|
|||
{% if cookiecutter.use_sentry == 'y' %}
|
||||
# Sentry
|
||||
# ------------------------------------------------------------------------------
|
||||
DJANGO_SENTRY_DSN=
|
||||
SENTRY_DSN=
|
||||
{% endif %}
|
||||
|
||||
# Redis
|
||||
|
|
|
@ -9,7 +9,7 @@ RUN apk update \
|
|||
# Pillow dependencies
|
||||
&& apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
|
||||
# CFFI dependencies
|
||||
&& apk add libffi-dev openssl-dev py-cffi \
|
||||
&& apk add libffi-dev py-cffi \
|
||||
# Translations dependencies
|
||||
&& apk add gettext \
|
||||
# https://docs.djangoproject.com/en/dev/ref/django-admin/#dbshell
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
FROM abiosoft/caddy:0.11
|
||||
FROM abiosoft/caddy:0.11.0
|
||||
|
||||
COPY ./compose/production/caddy/Caddyfile /etc/Caddyfile
|
||||
|
|
|
@ -9,7 +9,7 @@ RUN apk update \
|
|||
# Pillow dependencies
|
||||
&& apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
|
||||
# CFFI dependencies
|
||||
&& apk add libffi-dev openssl-dev py-cffi
|
||||
&& apk add libffi-dev py-cffi
|
||||
|
||||
RUN addgroup -S django \
|
||||
&& adduser -S -G django django
|
||||
|
@ -19,23 +19,25 @@ COPY ./requirements /requirements
|
|||
RUN pip install --no-cache-dir -r /requirements/production.txt \
|
||||
&& rm -rf /requirements
|
||||
|
||||
COPY ./compose/production/django/gunicorn /gunicorn
|
||||
RUN sed -i 's/\r//' /gunicorn
|
||||
RUN chmod +x /gunicorn
|
||||
RUN chown django /gunicorn
|
||||
|
||||
COPY ./compose/production/django/entrypoint /entrypoint
|
||||
RUN sed -i 's/\r//' /entrypoint
|
||||
RUN chmod +x /entrypoint
|
||||
RUN chown django /entrypoint
|
||||
|
||||
COPY ./compose/production/django/start /start
|
||||
RUN sed -i 's/\r//' /start
|
||||
RUN chmod +x /start
|
||||
RUN chown django /start
|
||||
{% if cookiecutter.use_celery == "y" %}
|
||||
COPY ./compose/production/django/celery/worker/start /start-celeryworker
|
||||
RUN sed -i 's/\r//' /start-celeryworker
|
||||
RUN chmod +x /start-celeryworker
|
||||
RUN chown django /start-celeryworker
|
||||
|
||||
COPY ./compose/production/django/celery/beat/start /start-celerybeat
|
||||
RUN sed -i 's/\r//' /start-celerybeat
|
||||
RUN chmod +x /start-celerybeat
|
||||
RUN chown django /start-celerybeat
|
||||
{% endif %}
|
||||
COPY . /app
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ MIDDLEWARE = ['raven.contrib.django.raven_compat.middleware.SentryResponseErrorI
|
|||
|
||||
# Sentry
|
||||
# ------------------------------------------------------------------------------
|
||||
SENTRY_DSN = env('DJANGO_SENTRY_DSN')
|
||||
SENTRY_DSN = env('SENTRY_DSN')
|
||||
SENTRY_CLIENT = env('DJANGO_SENTRY_CLIENT', default='raven.contrib.django.raven_compat.DjangoClient')
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
|
|
|
@ -17,7 +17,7 @@ services:
|
|||
env_file:
|
||||
- ./.envs/.production/.django
|
||||
- ./.envs/.production/.postgres
|
||||
command: /gunicorn
|
||||
command: /start
|
||||
|
||||
postgres:
|
||||
build:
|
||||
|
|
|
@ -14,7 +14,7 @@ flower==0.9.2 # https://github.com/mher/flower
|
|||
|
||||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
pytest==3.5.1 # https://github.com/pytest-dev/pytest
|
||||
pytest==3.6.0 # https://github.com/pytest-dev/pytest
|
||||
pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar
|
||||
|
||||
# Code quality
|
||||
|
|
|
@ -14,4 +14,4 @@ raven==6.8.0 # https://github.com/getsentry/raven-python
|
|||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
django-storages[boto3]==1.6.6 # https://github.com/jschneier/django-storages
|
||||
django-anymail==2.2 # https://github.com/anymail/django-anymail
|
||||
django-anymail[mailgun]==2.2 # https://github.com/anymail/django-anymail
|
||||
|
|
Loading…
Reference in New Issue
Block a user