Commit Graph

99 Commits

Author SHA1 Message Date
Matthew Foster Walsh
10c85ce3d6
Rename docker compose files to include 'docker-compose' (#4995)
* Renamed local.yml to docker-compose.local.yml

* Renamed production.yml to docker-compose.production.yml

* Rename docs.yml to docker-compose.docs.yml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2024-05-13 18:18:56 +01:00
pyup.io bot
6301fcc603
Update black to 24.1.0 (#4806)
* Update black from 23.12.1 to 24.1.0

* Update black from 23.12.1 to 24.1.0

* Update black pre-commit hooks

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix a few styling issues for black v24

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-26 10:49:52 +00:00
Jens Kaeske
bda89eaa06
Replace custom static & media storage classes by passing options in the STORAGES setting (#4803)
The custom cloud storages module has been deleted, and the settings have been updated to use the storage backend settings directly from each cloud provider's storage backend libraries. These changes have simplified the cloud storage configuration for each cloud provider in the production settings file.
2024-01-25 09:01:27 +00:00
Bruno Alla
cbacbb7525
Remove unused gulp-concat when Webpack is selected (#4520)
Fix #4513
2023-08-14 11:48:37 +01:00
Bruno Alla
bc56102f13
Change how we remove prettier pre-commit hook from the config (#4450) 2023-08-01 20:56:51 +01:00
Shayan Karimi
40ddc4b6af
Add support for Drone (#4382)
* Add overall config for drone.io support

* Update docs

* Configure basic CI setup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix python image version for tests step

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-28 13:03:47 +01:00
tmajerech
e0388d11c7
Fixed bug with pycharm editor option in post_gen_project.py (#4441) 2023-07-09 09:07:07 +02:00
masavini
1ed6d6e03b
VS Code Dev Container (#4198)
* decontainer setup

* update

* fix typo

* keep .envs

* add info

* typo

* minor fixes

* keep compose/production

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add isort and lint

* choose editor and configure devcontainer

* choose editor and configure devcontainer

* add ssh client

* Remove isort arguments duplicated with base config

* End of file

* Only keep black as code formatter

* Add note about black not being accepted as formatter in devcontainer

* Avoid empty lines in devcontainer.json

* Move bash_history into .devcontainer folder

* Remove .prettierignore file

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2023-07-03 11:55:33 +02:00
Bruno Alla
2e561ed6c4
Fix missing compilemessages step before deploying to prod (#4363)
* Update readme on internationalization

* Run compilemessages when building production image

* Run compilemessages when deploying to Heroku

* Always keep Heroku post-compile hooks

* Add empty po file for en-US language

* Update instructions for Docker

* Update default po file

* Convert locale readme to markdown and expand a bit the instructions

* Don't compile translations for 3rd party packages

* Use simplified settings & set env variables for compiling translations

* Update README for translations

* Improve metadata for Brazilian Portuguese translations

* Fix condition for django compressor on Heroku

* Fix condition for Django Compressor
2023-06-09 11:12:44 +01:00
Bruno Alla
5bf90a43a9
Replace runserver with runserver_plus (#4373)
This reverts commit f93a9f78d9

In #4255, `runserver_plus` was replaced by `runserver` due to some bugs in django-extensions, preventing us to upgrade Django.

In #4372, django-extensions was upgraded to a version with a fix, so we can go back to using `runserver_plus`.
2023-06-07 17:12:01 +01:00
Bruno Alla
17fa459dc3
Fix inconsistent line length and move configs to pyproject.toml (#4276)
* Fix inconsistent line length and move config to pyproject.toml

Fix #2720

* Fix running tox with AUTOFIXABLE_STYLES

* Adjust some styles

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Adjust more styles

* Split isort and flake8 tests

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-15 15:43:04 +01:00
Andrew Chen Wang
1783257ed3
Add username_type option (#3958)
* Add username_type option

* Update docs

Signed-off-by: Andrew-Chen-Wang <acwangpython@gmail.com>

* Fix errors and lint

Signed-off-by: Andrew-Chen-Wang <acwangpython@gmail.com>

* Try linting again

* Try linting again

* Handle signup

* Fix url reverse in template

* Fix migration file

* Remove extra line in factories

* E2E tests for email username

* Fix style in users api views and serializers

* Fix style in users api views and serializers

* Add conditions for fields in UserAdminCreationForm

* Consistent Jinja tag conditions

* Fix more empty lines issues

* Tweak options order

* Test username email

* Fix code style

* Fix kwargs to reverse user details view

* Remove comment in template

* Fix error messages dict in user form

* Fix line wrapping

* Move custom manager into a separate module and add tests

---------

Signed-off-by: Andrew-Chen-Wang <acwangpython@gmail.com>
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2023-04-15 11:53:15 +01:00
Jelmer
f93a9f78d9
Replace runserver_plus with runserver (#4255)
* Replace runserver_plus with runserver since it is not compatible with django >= 4.1

* Replace runserver_plus with runserver in post_gen_hooks

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2023-04-04 21:42:53 +01:00
Arkadiusz Michał Ryś
06369bfd4c
Add option to serve media files locally using nginx (#2457)
* Add option to serve media files locally using nginx

* Fix nginx media location and storage issue

* Fix traefik django-media typo

* Add certresolver property to web-media-router

* Add trailing slash in nginx configuration to avoid path traversal exploits

* Remove autoindexing from nginx configuration so nginx uses its default off setting

* Use nginx to serve media files if cloud provider is None

* Add back warning about lack of media files without Docker or Cloud providers

* Update documentation

* Fix typos and rephrase

Co-authored-by: Arkadiusz Ryś <arkadiusz.michal.rys@gmail.com>

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2023-03-04 18:36:11 +00:00
Bruno Alla
cbb0e19de7
Add Webpack support (#3623)
* Add support for Webpack as frontend pipeline

* Rename CI jobs

* Fix a couple of issues with Webpack + Docker

* Don't include Boostrap CSS from CDN with Webpack

* Rename variable

* Set publicPath in prod webpack config

* Fix removal of SASS files in post-gen hooks

* Add Webpack to readme usage section

* Run Django + Webpack dev server concurrently without Docker

* Fix async runserver command with Gulp/Webpack

* Upgrade django-webpack-loader to 1.5.0

* Pass variables required by Webpack at build time

* Upgrade django-webpack-loader to 1.7.0

* Add missing condition

* Add support for Azure Storage + Webpack

* Whitespaces

* Rename ROOT_DIR -> BASE_DIR

* Rename jobs

* Bump django-webpack-loader to latest

* Document limitation of Docker + Webpack + no Whitenoise

* Update section on custom Bootstrap compilation in generated readme
2023-01-29 12:12:12 +00:00
Bruno Alla
c0e83b104c
Refactor merge_production_dotenvs_in_dotenv.py (#4105) 2023-01-28 15:10:45 +00:00
Bruno Alla
ab4a32d558
Unify compressor, gulp and custom bootstrap options (#3535) 2022-03-20 15:00:40 +00:00
ghazi-git
c22f2c7e9e
Fix Swagger schema API endpoint & add a test for it (#3592)
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2022-02-16 12:25:32 +00:00
Vikas Yadav
721b86723c
Add swagger API documentation when DRF is enabled (#3536)
* Adds swagger api documentation when drf is enabled

Changes
* Integrate drf-spectacular module
* Added routes and tests for swagger-ui

* Removes swagger ui tests when drf is not enabled

* Changes url names and documentation title

* Apply suggestions from code review

Co-authored-by: Fábio C. Barrionuevo da Luz <bnafta@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>

* Fixes typos and linting issues

* Update domain in swagger description

Co-authored-by: Fábio C. Barrionuevo da Luz <bnafta@gmail.com>

Co-authored-by: Fábio C. Barrionuevo da Luz <bnafta@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2022-01-19 18:14:36 +00:00
Bruno Alla
df0b2cac3f
Add a PyCharm run configuration for docker-compose (#3462)
Co-authored-by: Pavel Karateev <lancelote.du.lac@gmail.com>
2021-12-20 09:39:23 +00:00
Bruno Alla
ce1c76e34e
Fix carriage return in .gitignore on Windows (#3456) 2021-12-16 11:07:47 +00:00
Bruno Alla
035eede670
Configure Dependabot for npm packages at the template level (#3436) 2021-12-07 19:05:59 +00:00
Bruno Alla
407a7d8bbc
Setup pre-commit for the template files (#3433) 2021-11-26 15:41:50 +00:00
Arnav Choudhury
b064e09f12
Adding GitHub-Action CI Option (#2837) 2020-09-21 11:20:24 +01:00
Bruno Alla
68116dcdea Fix issue with Heroku + Django Compressor 2020-07-04 15:20:51 +01:00
Bruno Alla
672be773a3
Fix formatting 2020-04-28 23:18:52 +01:00
Pilhwan Kim
f13f3dc2bf add use drf tests 2020-04-28 12:41:51 +09:00
Andrew Chen Wang
2ecbf7ac34
Merge branch 'master' into async 2020-04-06 23:02:36 -04:00
Andrew-Chen-Wang
aee2de347b Add uvicorn and web sockets for Django 3
* Add use_async option to cookiecutter.json
* Add websocket configuration
2020-03-24 15:40:14 -04:00
Bruno Alla
c4b1666707 Move storages classes into their own module 2020-03-23 21:46:14 +00:00
Bruno Alla
949d8b684c Merge branch 'master' into drf-option-with-tests
# Conflicts:
#	hooks/post_gen_project.py
2020-01-23 14:41:42 +00:00
Ivan Khomutov
113ce88d9c Add option to choose CI tool 2019-12-06 10:55:00 +03:00
Jelmert
eb8ea447e4 fix: black 2019-10-21 11:12:53 +02:00
Jelmert
58f41fc97f fix: remove the aws Dockerfile and remove the awscli definition from production.yml when not selected 2019-10-21 10:07:17 +02:00
Jerome Caisip
548417612f Additonal option to setup DRF. 2019-09-17 23:24:09 +08:00
Tano Abeleyra
de7be3652a Make cloud_provider optional
Some projects may not need AWS or GCS
2019-05-19 12:45:28 -03:00
Bruno Alla
895298c28f Refactor Celery integration according to current best practices
- Change celery app to not be a Django app, more like a WSGI app
- Define a Celery task in the Django users app
- Write a test to execute the task
- Update scripts to use the new app to start workers
- Update documentation

Fix #865
2019-04-02 15:40:32 +01:00
Bruno Alla
b91c70d755
Add a node image to run Gulp when selecting it with Docker (#1687)
## Description

Following up on @webyneter attempt in #1205, which is now getting outdated, I've tried to make Gulp task runner work with Docker. There is no documentation yet, but this seems to work locally with the custom bootstrap compilation...

- [x] Add a node image for local developement
- [x] Proxy the django image rather than localhost in Browser sync, pass header to keep hostname
- [x] Don't call the runserver command from Gulp, let docker-compose handle
- [x] Update package.json & gulpfile.js templates to reduce the number of unwanted empty lines
- [x] Use [multi-stage build](https://docs.docker.com/develop/develop-images/multistage-build/) in production to make sure the static assets are produced
- [x] Update documentation
- [x] Verify that the previous issue with static assets missing from production isn't there 

## Rationale

Currently, the static build isn't working nicely with Docker, extra manual setup is required.

Fixes #1762
2019-03-25 12:10:55 +00:00
Bruno Alla
68f7268770
Run Black on Travis (#1957)
* Create a test matrix on Travis CI to help testing multiple options

* Change test_docker.sh to fail if any command in it fails

* Run black on the CI with --check option

* Fix formatting of project files using black

* Install black in the docker container

* Exclude migrations in black checks

* Fix Black formatting violations

* Run black on the whole generated project & fix issues
2019-03-18 17:49:43 +00:00
Cole Mackenzie
5a4a3217f1 prevent removal if using travisci 2018-10-16 13:22:04 -06:00
Cole Mackenzie
9e8e09119d
Remove requirements.txt file from delete list.
fixes #1829
2018-10-10 21:35:17 -06:00
Bruno Alla
11bb4cdb84 Avoid '$' in random string generation
Until the [upstream bug](https://github.com/joke2k/django-environ/issues/60) is fixed in django-environ, this should prevent people using this template from hitting the bug.

Fix #454
2018-09-18 10:27:58 +01:00
Nikita P. Shupeyko
ed7609f715 Remove utility/ when use_docker=y 2018-06-28 16:43:34 +03:00
Nikita P. Shupeyko
c5c6bace99 Remove LICENSE for non open source projects 2018-06-28 16:39:51 +03:00
Nikita Shupeyko
275c13292c
Integrate Flower with Docker Compose setup (#1655)
* Integrate Flower with Docker Compose setup locally

* Remove alien worker celeryd option

* Move Flower COPY section below the worker's

* Remove set -o pipefail command from Flower start script

* Flower client authentication

* Override flower service image name

* Move flower service to the end of local.yml

* Install flower==0.9.2 in all environments

* Introduce production flower service

* Fix local flower start script

* Document Flower integration

* Prettify *.django envs

Rationale: consistency.

* Reference local environment Flower docs from the production's

* 'two more services' -> 'three more services'
2018-06-27 19:33:21 +03:00
saschalalala
6d4be405d8 Migrate to Django2 path urls (#1637)
* Change users urls to Django 2 paths

* Change config urls to Django 2 paths

* Change admin url setting to Django 2 path syntax

* Replace more admin urls

* Add myself to contributors.rst
2018-05-14 10:09:24 +03:00
Nikita P. Shupeyko
be1024cd06 Drop Grunt support
Closes #1636.
2018-05-13 13:51:01 +03:00
Nikita P. Shupeyko
1732659678 Set POSTGRES_USER and POSTGRES_PASSWORD to the debug value when opting for debug 2018-05-05 13:47:58 +03:00
Nikita P. Shupeyko
d8267edd09 Run black reformatting
https://github.com/ambv/black
2018-05-05 12:37:10 +03:00
Daniel Roy Greenfeld
3f753e0411
First pass at running black across the project (#1602) 2018-04-08 17:03:29 -05:00