diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 4899c4f9..b232b6e3 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -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. If you need quick professional paid support for your project, contact support@cookiecutter.io. - -* **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 diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 00000000..75f6a19c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -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) + + diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md new file mode 100644 index 00000000..b0d560d8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -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.") + + diff --git a/.github/ISSUE_TEMPLATE/improvement.md b/.github/ISSUE_TEMPLATE/improvement.md new file mode 100644 index 00000000..57265237 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/improvement.md @@ -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.") + + diff --git a/.github/ISSUE_TEMPLATE/paid-support.md b/.github/ISSUE_TEMPLATE/paid-support.md new file mode 100644 index 00000000..d565e564 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/paid-support.md @@ -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 Python/Django, hands-on DevOps and frontend experience. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..0c0f3d89 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -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. diff --git a/.github/ISSUE_TEMPLATE/regression.md b/.github/ISSUE_TEMPLATE/regression.md new file mode 100644 index 00000000..80384004 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/regression.md @@ -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) + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..8dbff6c2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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.") + + diff --git a/.gitignore b/.gitignore index 9e4496f1..54fafb8b 100644 --- a/.gitignore +++ b/.gitignore @@ -215,7 +215,6 @@ tags [Ii]nclude [Ll]ib [Ll]ib64 -[Ll]ocal [Ss]cripts pyvenv.cfg pip-selfcheck.json diff --git a/.travis.yml b/.travis.yml index 8be8bc44..a46726d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 8fbe4771..0f6761ed 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -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 @@ -141,6 +142,7 @@ Listed in alphabetical order. Roman Afanaskin `@siauPatrick`_ Roman Osipenko `@romanosipenko`_ Russell Davies + Sascha `@saschalalala` @saschalalala Sam Collins `@MightySCollins`_ Shupeyko Nikita `@webyneter`_ SÅ‚awek Ehlert `@slafs`_ @@ -217,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 diff --git a/README.rst b/README.rst index acb5d6a1..0eaea519 100644 --- a/README.rst +++ b/README.rst @@ -27,9 +27,6 @@ production-ready Django projects quickly. * See Troubleshooting_ for common errors and obstacles * If you have problems with Cookiecutter Django, please open issues_ don't send emails to the maintainers. -* Need quick professional paid support? Contact `support@cookiecutter.io`_. - This includes configuring your servers, fixing bugs, reviewing your code and - everything in between. .. _cookiecutter: https://github.com/audreyr/cookiecutter @@ -37,7 +34,6 @@ production-ready Django projects quickly. .. _528: https://github.com/pydanny/cookiecutter-django/issues/528#issuecomment-212650373 .. _issues: https://github.com/pydanny/cookiecutter-django/issues/new -.. _support@cookiecutter.io: support@cookiecutter.io Features --------- @@ -102,7 +98,9 @@ Support this Project! This project is run by volunteers. Please support them in their efforts to maintain and improve Cookiecutter Django: -* https://www.patreon.com/danielroygreenfeld: Project lead. Expertise in AWS ELB and Django. +* Daniel Roy Greenfeld, Project Lead (`GitHub `_, `Patreon `_): expertise in Django and AWS ELB. + +* Nikita Shupeyko, Core Developer (`GitHub `_): expertise in Python/Django, hands-on DevOps and frontend experience. Projects that provide financial support to the maintainers: @@ -162,13 +160,13 @@ Answer the prompts with your own desired options_. For example:: domain_name [example.com]: myreddit.com version [0.1.0]: 0.0.1 timezone [UTC]: America/Los_Angeles - use_whitenoise [y]: n + use_whitenoise [n]: n use_celery [n]: y use_mailhog [n]: n - use_sentry [y]: y + use_sentry [n]: y use_pycharm [n]: y windows [n]: n - use_docker [y]: n + use_docker [n]: n use_heroku [n]: y use_compressor [n]: y Select postgresql_version: @@ -283,6 +281,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 @@ -294,6 +294,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/ diff --git a/cookiecutter.json b/cookiecutter.json index e6687822..21a639a3 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -3,8 +3,8 @@ "project_slug": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_') }}", "description": "Behold My Awesome Project!", "author_name": "Daniel Roy Greenfeld", - "email": "{{ cookiecutter.author_name.lower()|replace(' ', '-') }}@example.com", "domain_name": "example.com", + "email": "{{ cookiecutter.author_name.lower()|replace(' ', '-') }}@example.com", "version": "0.1.0", "open_source_license": [ "MIT", @@ -18,6 +18,7 @@ "use_pycharm": "n", "use_docker": "n", "postgresql_version": [ + "10.4", "10.3", "10.2", "10.1", @@ -28,15 +29,14 @@ ], "js_task_runner": [ "None", - "Gulp", - "Grunt" + "Gulp" ], "custom_bootstrap_compilation": "n", "use_compressor": "n", "use_celery": "n", "use_mailhog": "n", - "use_sentry": "y", - "use_whitenoise": "y", + "use_sentry": "n", + "use_whitenoise": "n", "use_heroku": "n", "use_travisci": "n", "keep_local_envs_in_vcs": "y", diff --git a/docs/deployment-on-heroku.rst b/docs/deployment-on-heroku.rst index 1f249c44..7006a287 100644 --- a/docs/deployment-on-heroku.rst +++ b/docs/deployment-on-heroku.rst @@ -14,25 +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 check --deploy + + heroku run python manage.py migrate heroku run python manage.py createsuperuser + heroku run python manage.py collectstatic --no-input + + heroku run python manage.py check --deploy + heroku open diff --git a/docs/deployment-with-docker.rst b/docs/deployment-with-docker.rst index 90f2fa5c..42798aae 100644 --- a/docs/deployment-with-docker.rst +++ b/docs/deployment-with-docker.rst @@ -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. @@ -84,6 +84,10 @@ Once this is ready, you can run it with:: docker-compose -f production.yml up +To run the stack and detach the containers, run:: + + docker-compose -f production.yml up -d + To run a migration, open up a second terminal and run:: docker-compose -f production.yml run --rm django python manage.py migrate diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 86808bfd..207f0ea2 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -115,6 +115,7 @@ Consider the aforementioned ``.envs/.local/.postgres``: :: # PostgreSQL # ------------------------------------------------------------------------------ + POSTGRES_HOST=postgres POSTGRES_DB= POSTGRES_USER=XgOWtQtJecsAbaIyslwGvFvPawftNaqO POSTGRES_PASSWORD=jSljDz4whHuwO3aJIgVBrqEml5Ycbghorep4uVJ4xjDYQu0LfuTZdctj7y0YcCLu diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 4c46cbdc..60453b87 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -1,31 +1,31 @@ Project Generation Options ========================== -project_name [My Awesome Project]: +project_name: Your project's human-readable name, capitals and spaces allowed. -project_slug [my_awesome_project]: +project_slug: Your project's slug without dashes or spaces. Used to name your repo and in other places where a Python-importable version of your project name is needed. -description [Behold My Awesome Project!] +description: Describes your project and gets used in places like ``README.rst`` and such. -author_name [Daniel Roy Greenfeld]: +author_name: This is you! The value goes into places like ``LICENSE`` and such. -email [daniel-roy-greenfeld@example.com]: +email: The email address you want to identify yourself in the project. -domain_name [example.com] +domain_name: The domain name you plan to use for your project once it goes live. Note that it can be safely changed later on whenever you need to. -version [0.1.0] +version: The version of the project at its inception. -open_source_license [1] +open_source_license: A software license for the project. The choices are: 1. MIT_ @@ -34,19 +34,19 @@ open_source_license [1] 4. `Apache Software License 2.0`_ 5. Not open source -timezone [UTC] +timezone: The value to be used for the ``TIME_ZONE`` setting of the project. -windows [n] +windows: Indicates whether the project should be configured for development on Windows. -use_pycharm [n] +use_pycharm: Indicates whether the project should be configured for development with PyCharm_. -use_docker [y] +use_docker: Indicates whether the project should be configured to use Docker_ and `Docker Compose`_. -postgresql_version [1] +postgresql_version: Select a PostgreSQL_ version to use. The choices are: 1. 10.3 @@ -57,46 +57,45 @@ postgresql_version [1] 6. 9.4 7. 9.3 -js_task_runner [1] +js_task_runner: Select a JavaScript task runner. The choices are: - 1. Gulp_ - 2. Grunt_ - 3. None + 1. None + 2. Gulp_ -custom_bootstrap_compilation [n] +custom_bootstrap_compilation: Indicates whether the project should support Bootstrap recompilation via the selected JavaScript task runner's task. This can be useful for real-time Bootstrap variable alteration. -use_compressor [n] +use_compressor: Indicates whether the project should be configured to use `Django Compressor`_. -use_celery [n] +use_celery: Indicates whether the project should be configured to use Celery_. -use_mailhog [n] +use_mailhog: Indicates whether the project should be configured to use MailHog_. -use_sentry [n] +use_sentry: Indicates whether the project should be configured to use Sentry_. -use_whitenoise [y] +use_whitenoise: Indicates whether the project should be configured to use WhiteNoise_. -use_heroku [n] +use_heroku: Indicates whether the project should be configured so as to be deployable to Heroku_. -use_travisci [n] +use_travisci: Indicates whether the project should be configured to use `Travis CI`_. -keep_local_envs_in_vcs [y] +keep_local_envs_in_vcs: Indicates whether the project's ``.envs/.local/`` should be kept in VCS (comes in handy when working in teams where local environment reproducibility is strongly encouraged). -debug [n] +debug: Indicates whether the project should be configured for debugging. This option is relevant for Cookiecutter Django developers only. @@ -114,7 +113,6 @@ debug [n] .. _PostgreSQL: https://www.postgresql.org/docs/ .. _Gulp: https://github.com/gulpjs/gulp -.. _Grunt: https://github.com/gruntjs/grunt .. _Django Compressor: https://github.com/django-compressor/django-compressor diff --git a/docs/settings.rst b/docs/settings.rst index 7962f715..6e71a515 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -18,7 +18,7 @@ DJANGO_READ_DOT_ENV_FILE READ_DOT_ENV_FILE False ======================================= =========================== ============================================== ====================================================================== Environment Variable Django Setting Development Default Production Default ======================================= =========================== ============================================== ====================================================================== -DJANGO_ADMIN_URL n/a r'^admin/' raises error +DJANGO_ADMIN_URL n/a 'admin/' raises error DJANGO_CACHES CACHES (default) locmem redis DJANGO_DATABASES DATABASES (default) See code See code DJANGO_DEBUG DEBUG True False @@ -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 diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 5e60b23a..6b48471e 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -67,12 +67,6 @@ def remove_heroku_files(): os.remove(file_name) -def remove_grunt_files(): - file_names = ["Gruntfile.js"] - for file_name in file_names: - os.remove(file_name) - - def remove_gulp_files(): file_names = ["gulpfile.js"] for file_name in file_names: @@ -160,7 +154,7 @@ def set_django_admin_url(file_path): django_admin_url = set_flag( file_path, "!!!SET DJANGO_ADMIN_URL!!!", - formatted="^{}/", + formatted="{}/", length=32, using_digits=True, using_ascii_letters=True, @@ -264,16 +258,11 @@ def main(): if "{{ cookiecutter.keep_local_envs_in_vcs }}".lower() == "y": append_to_gitignore_file("!.envs/.local/") - if "{{ cookiecutter.js_task_runner}}".lower() == "gulp": - remove_grunt_files() - elif "{{ cookiecutter.js_task_runner}}".lower() == "grunt": + if "{{ cookiecutter.js_task_runner}}".lower() == "none": remove_gulp_files() - else: - remove_gulp_files() - remove_grunt_files() remove_packagejson_file() if ( - "{{ cookiecutter.js_task_runner }}".lower() in ["grunt", "gulp"] + "{{ cookiecutter.js_task_runner }}".lower() != "none" and "{{ cookiecutter.use_docker }}".lower() == "y" ): print( diff --git a/requirements.txt b/requirements.txt index eedbfad0..9f378fda 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.0.0 -pytest==3.5.1 +pytest==3.6.1 pytest-cookies==0.3.0 diff --git a/tests/test_docker.sh b/tests/test_docker.sh index 384fdff2..bebac148 100755 --- a/tests/test_docker.sh +++ b/tests/test_docker.sh @@ -11,7 +11,7 @@ mkdir -p .cache/docker cd .cache/docker # create the project using the default settings in cookiecutter.json -cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y js_task_runner=None +cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y cd my_awesome_project # run the project's tests diff --git a/{{cookiecutter.project_slug}}/.envs/.local/.postgres b/{{cookiecutter.project_slug}}/.envs/.local/.postgres index 87203da0..f190db8e 100644 --- a/{{cookiecutter.project_slug}}/.envs/.local/.postgres +++ b/{{cookiecutter.project_slug}}/.envs/.local/.postgres @@ -1,5 +1,7 @@ # PostgreSQL # ------------------------------------------------------------------------------ +POSTGRES_HOST=postgres +POSTGRES_PORT=5432 POSTGRES_DB={{ cookiecutter.project_slug }} POSTGRES_USER=!!!SET POSTGRES_USER!!! POSTGRES_PASSWORD=!!!SET POSTGRES_PASSWORD!!! diff --git a/{{cookiecutter.project_slug}}/.envs/.production/.django b/{{cookiecutter.project_slug}}/.envs/.production/.django index 2e9eefea..5cb90897 100644 --- a/{{cookiecutter.project_slug}}/.envs/.production/.django +++ b/{{cookiecutter.project_slug}}/.envs/.production/.django @@ -37,7 +37,7 @@ WEB_CONCURRENCY=4 {% if cookiecutter.use_sentry == 'y' %} # Sentry # ------------------------------------------------------------------------------ -DJANGO_SENTRY_DSN= +SENTRY_DSN= {% endif %} # Redis diff --git a/{{cookiecutter.project_slug}}/.envs/.production/.postgres b/{{cookiecutter.project_slug}}/.envs/.production/.postgres index 87203da0..f190db8e 100644 --- a/{{cookiecutter.project_slug}}/.envs/.production/.postgres +++ b/{{cookiecutter.project_slug}}/.envs/.production/.postgres @@ -1,5 +1,7 @@ # PostgreSQL # ------------------------------------------------------------------------------ +POSTGRES_HOST=postgres +POSTGRES_PORT=5432 POSTGRES_DB={{ cookiecutter.project_slug }} POSTGRES_USER=!!!SET POSTGRES_USER!!! POSTGRES_PASSWORD=!!!SET POSTGRES_PASSWORD!!! diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index 84b7e6d6..679fb902 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -105,9 +105,6 @@ coverage # nyc test coverage .nyc_output -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - # Bower dependency directory (https://bower.io/) bower_components @@ -333,7 +330,6 @@ tags [Ii]nclude [Ll]ib [Ll]ib64 -[Ll]ocal [Ss]cripts pyvenv.cfg pip-selfcheck.json @@ -344,3 +340,5 @@ pip-selfcheck.json MailHog {%- endif %} {{ cookiecutter.project_slug }}/media/ + +.pytest_cache/ diff --git a/{{cookiecutter.project_slug}}/.idea/misc.xml b/{{cookiecutter.project_slug}}/.idea/misc.xml new file mode 100644 index 00000000..10af178f --- /dev/null +++ b/{{cookiecutter.project_slug}}/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/{{cookiecutter.project_slug}}/.idea/modules.xml b/{{cookiecutter.project_slug}}/.idea/modules.xml new file mode 100644 index 00000000..1418fcdd --- /dev/null +++ b/{{cookiecutter.project_slug}}/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__runserver.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__runserver.xml deleted file mode 100644 index 77b9a587..00000000 --- a/{{cookiecutter.project_slug}}/.idea/runConfigurations/Docker__runserver.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/merge_production_dotenvs_in_dotenv.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/merge_production_dotenvs_in_dotenv.xml index 18f8365a..cf2c5dd8 100644 --- a/{{cookiecutter.project_slug}}/.idea/runConfigurations/merge_production_dotenvs_in_dotenv.xml +++ b/{{cookiecutter.project_slug}}/.idea/runConfigurations/merge_production_dotenvs_in_dotenv.xml @@ -1,5 +1,6 @@ +