Commit Graph

124 Commits

Author SHA1 Message Date
Bruno Alla
6f5f1b8576
Fix a number of issues with Azure storage (#5476) 2024-10-21 10:12:29 +01:00
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
Jelmer Draaijer
b488056b63 Upgrade Python to version 3.12 2024-03-18 20:07:24 +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
42c30dafcb
Upgrade Python to version 3.11 (Faster CPython) (#4256)
* Upgrade Python to version 3.11 (Faster CPython)

* Update pyupgrade config for Python 3.11

* Update tox env to Python 3.11

* Update to latest Python 3.11.3

* Add a note about lack of support in PythonAnywhere

* Rephrase note

* Fix casing

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2023-04-15 11:42:33 +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
Hoai-Thu Vuong
dcea8f1e7b
Trim leading and trailing space in domain_name and email (#4163)
* remove trailing space in domain_name and email

* Add test for leading and trailing spaces removals

* Move magic string and add a comment explaining its role

---------

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2023-03-16 17:17:02 +00: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
rguptar
49b3bb8ffe
Add Azure Storage as an option to serve static and media files (#3967)
Fix https://github.com/cookiecutter/cookiecutter-django/issues/2301
2022-11-30 18:26:58 +00:00
Jelmer
4ea0e98f3f
Upgrade Python version from 3.9 to 3.10 (#3913) 2022-10-24 21:41:00 +01: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
areski
a1d551d067 Update from Python3.8 to Python3.9 2021-01-26 16:13:27 +01: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
Bruno Alla
c4e4bea31b Merge branch 'master' into async 2020-04-16 09:43:38 +01:00
Andrew Chen Wang
2ecbf7ac34
Merge branch 'master' into async 2020-04-06 23:02:36 -04:00
Ernesto Cedeno
0cdf60ceac Change Python version to 3.8 2020-03-29 19:55:27 +02: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
Andrew-Chen-Wang
484fa4ae77 Added unsupported mail_service combinations
* Added default yaml Loader for pre_gen_projects.py
2020-03-22 13:31:52 -04: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
Bruno Alla
6a9feea2fe
Support python 3.7 (#2240)
Support python 3.7
2019-10-06 11:06:03 +01:00
Caio Ariede
d0c208d10f Fix #2249 -- Broken static files with whitenoise=n & cloud_provider=none 2019-10-02 12:03:33 -03:00
Nicolas Stefani
ea52a0be25 Updated python version in warning message 2019-09-29 21:46:34 -03:00
Jerome Caisip
548417612f Additonal option to setup DRF. 2019-09-17 23:24:09 +08:00
Bruno Alla
2103cf2f9d Add a pre-generation hook to avoid non-lowercase slugs - fixes #2042 2019-06-05 19:00:43 +01:00
Tano Abeleyra
de7be3652a Make cloud_provider optional
Some projects may not need AWS or GCS
2019-05-19 12:45:28 -03:00