Commit Graph

268 Commits

Author SHA1 Message Date
Reggie Riser
f86df89db9 Fixed invalid HTML in django-allauth field element template 2024-02-27 14:53:12 -05:00
Jelmer Draaijer
0e41e5e8d0 Added messages to entrance page 2024-02-24 19:32:56 +01:00
Jelmer Draaijer
2c93ef4009 Entrance justify-content-center with a sice of md-4 2024-02-24 19:31:34 +01:00
Bruno Alla
8f2b894176
Merge branch 'master' into allauth
# Conflicts:
#	{{cookiecutter.project_slug}}/requirements/base.txt
2024-02-24 18:03:38 +01:00
Matthew Foster Walsh
4db3ea1e58
Switch to local imports within app (#4883) 2024-02-23 14:37:34 +00:00
Matthew Foster Walsh
a247d8f8a2
Switch to celery.shared_task (#4881)
* Switch to celery.shared_task

* Sort impots

---------

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2024-02-21 22:07:25 +01:00
Matthew Foster Walsh
b756d904d7
You probably don't need get_user_model (#4879)
* You probably don't need `get_user_model`
Fixes #4872

* Fix Flake8 (add space after import)

* (try to) fix ruff

* Fix import format
2024-02-21 10:01:56 +00:00
Jelmer Draaijer
0fc4ea6165 Apply ruff to codebase 2024-02-13 11:59:55 +01:00
Jelmer Draaijer
6ba6104f09 Ruff as formatter & linter 2024-02-13 11:59:54 +01:00
Jelmer Draaijer
44ca412dc1 Enable allauth.mfa for two-factor authentication 2024-02-08 16:52:16 +01:00
Jelmer Draaijer
6b90a9e701 Implement allauth elements and add body & main block for more override capabilities 2024-02-08 16:42:07 +01:00
Jelmer Draaijer
52e7b05209 Generic UserManager 2024-02-07 13:40:58 +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
Matthew Foster Walsh
bc06b0da59
Add a test to cover DJANGO_ADMIN_FORCE_ALLAUTH (#4790)
* Add a test to cover `DJANGO_ADMIN_FORCE_ALLAUTH`

* Remove unused fixtures

* Test redirect url
2024-01-17 09:18:54 +00:00
Nix Siow
a035a11874
Update allauth documentation links (#4786) 2024-01-15 09:51:21 +00:00
Freddy
2f72838d98
Add missing __init__.py file to api module (#4726) 2023-12-09 10:36:16 -03:00
Christian Jauvin
6dea941258
Fix bug with social account adapter name override, in very specific conditions (#4650)
* Fix bug with social account adapter in specific condition

* Slight refactoring of fix
2023-11-20 12:45:20 +00:00
pyup.io bot
c27a9a8454
Update django-storages to 1.14 (#4564)
* Update django-storages from 1.13.2 to 1.14

* Update django-storages from 1.13.2 to 1.14

* Update django-storages from 1.13.2 to 1.14

* Migrate to new namespace for S3 Storage class

* Update extra require for django-storages

* Rename our subclasses for S3Storage to match parent naming

* Remove "Root" in our own storage class names

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2023-09-12 12:07:28 +01:00
John
13b97de9d7
Override _after_postgeneration to force save in User factory (#4534)
* Override _after_postgeneration to force save

Saving in _after_postgeneration was automatic in Factory Boy versions below 4.0, but must be done explicitly in newer versions.

* Clean up formatting
2023-08-19 20:31:53 +01:00
Bruno Alla
b9550a1dab
Prevent error in data migration caused by long project name (#4525)
* Test very long project names on CI

* Fix migration
2023-08-14 23:00:26 +01:00
Imran Rahman
a50f2bee94
Display custom 403_csrf.html while getting a csrf error in prod (#4464)
Co-authored-by: Imran Rahman <imranrahman.ix@gmail.com>
2023-07-24 12:41:10 +01:00
Bruno Alla
67a7194d06
Improve type hints for UserSerializer (#4429)
* Improve type hints for UserSerializer

* Fix NameError for UserType
2023-07-11 14:11:24 +01:00
Andrew Chen Wang
a82622b592
Name shown twice in user_details.html if username set to email (#4436)
* Update user_detail.html

* Wrap long conditions over multiple lines

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2023-07-10 17:46:42 +01:00
Will Gordon
397100dcab
Allow django-admin to optionally use django-allauth login workflow (#1921)
* Allow django-admin to optionally use django-allauth login workflow

* Fix mypy and add a comment to allauth documentation

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2023-06-30 10:50:20 +01:00
Andrew Chen Wang
5a7de40b83
Populate user name field in social auth (#3968)
* Populate user name field in social auth

* Add docstring for populate_user

* Fix missing def

* Fix missing def

* Add some type hints to the SocialAccountAdapter class

---------

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2023-06-27 23:36:01 +01:00
monosans
30e8506872
Add djLint for HTML formatting and linting (#4389)
* Add djLint for HTML formatting and linting

* Remove djLint pre-commit hook

* Bump djLint from 1.31.0 to 1.31.1
2023-06-27 22:52:36 +01:00
mpsantos
1025d73083
Translate fixed message in test (#4374) 2023-06-08 16:41:35 +01:00
Bruno Alla
66660f41e6
Update cdn js URLs to latest Bootstrap 2023-04-26 10:29:07 +02: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
Bruno Alla
0dcc4c4b4c
Add more pre-commit hooks (#4266)
* 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
2023-04-15 12:15:15 +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
Adin Hodovic
3db64512c8
fix: Syntax for ignoring specific errors (#4250)
Noticed when started using pygrep-hooks. Syntax is noqa: code with a colon.
2023-04-03 10:34:45 -03:00
pyup.io bot
3c71b54e4c
Update mypy to 0.991 (#4106)
* 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>
2023-02-09 09:35:41 +00:00
Bruno Alla
5bc4bed952
Change RequestFactory to APIRequestFactory in tests for API views (#4110) 2023-02-06 18:33:08 +00:00
pyup.io bot
119df8c61b
Update black to 23.1.0 (#4120)
* 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>
2023-02-02 11:25:41 +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
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
Bruno Alla
9db2752598
Upgrade to Django 4.0 (#3848) 2022-10-19 20:01:43 +01:00
Dani Hodovic
122ebfc3a8
Simplify database access in tests (#3807) 2022-07-26 23:44:34 +01:00
github-actions[bot]
419f6b0e87
Auto-update pre-commit hooks (#3780)
* Auto-update pre-commit hooks

* Run 'pre-commit run -a'

* Fix pyupgrade into generated project

Co-authored-by: browniebroke <browniebroke@users.noreply.github.com>
Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
2022-07-26 23:37:02 +01:00
Andrew Chen Wang
c7a8b6498c
Update view test should set user to form instance (#3776) 2022-07-22 00:09:12 +01:00
Bruno Alla
cf6fc443bb Fix type error 2022-06-04 14:49:26 -03:00
Bruno Alla
96b9b95af7
Add pyupgrade to pre-commit config (#3702)
* Add pyupgrade to pre-commit config

* Exclude hooks folder from pyupgrade

* Autofix: run pyupgrade

* Autofix: run pyupgrade on template files
2022-05-07 19:21:15 +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
b58f0e726c
Fix out-of-sync sequence for Site ID (#3511) 2022-01-13 21:23:28 +00:00
mpoli
9f8820241f
Add UserSignupForm and UserSocialSignupForm (#3515)
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2022-01-13 18:38:35 +00:00
Bruno Alla
e99120d87d Fix typo and trailing whitespaces 2022-01-04 17:49:40 +00:00