* 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>
* Add more hooks from pre-commit-hooks repo
* Add pre-commit hook for prettier
* Format with prettier
* Remove check-docstring-first hook
* Run prettier in the template
* Tweak formatting of dependabot file
* Fix formatting of GitHub files for prettier
* More format fixes of ci.yml
* 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>
* 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>
* Upgrade to Django 4.1
* Bump django-environ back to 0.10.0
---------
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
* 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>
* 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>
* Change Traefik media router rule generation to force priority
The web-secure-router could end up having priority over the web-media-router when the www subdomain was used.
This fix adds the www subdomain to the web-media-router if it's also present in the web-secure-router rule.
Traefik looks at the length of rules to determine priority when no explicit priority is set.
The web-media-router needs to always have priority over the web-secure-router in order for the media files to be served.
* Add space to Traefik rule
---------
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
* Pin base Python Docker images to bugfix
Fix#1810
* Skip major & minor versions of Docker images in Dependabot
* Remove argument for docs Docker image
* Update Dependabot config of generated project
* 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>
* Update mypy from 0.982 to 0.991
* Ignore type error in test
* Don't build on non-master branch pushes by default
* Ignore type error in DRF view test
---------
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
* Add an integration test
This should cover the problem raised for webpack loader issues
* Add a DummyWebpackLoader for running tests
* Replace DummyWebpackLoader by the one from webpack_loader package
* Fix post-gen hook
* Remove integration test
* Update black from 22.12.0 to 23.1.0
* Update black from 22.12.0 to 23.1.0
* Update code style according to newer version of black
* Update black pre-commit hook (#4122)
Co-authored-by: browniebroke <browniebroke@users.noreply.github.com>
---------
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: browniebroke <browniebroke@users.noreply.github.com>
* 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