Arnav Choudhury
1371d6a3e6
Reverting the use of get_absolute_url method in getting the detail view url. Purpose was to test if the url could be created correctly and not if the view was working correctly.
2021-03-04 19:34:58 +05:30
Arnav Choudhury
fa0b278225
Updated test_urls and views to re-use User.get_absolute_url method instead of using reverse on the user:detail view
2021-02-26 12:04:48 +05:30
Bruno Alla
4e96b64261
Merge branch 'master' into fix_django_31
...
# Conflicts:
# {{cookiecutter.project_slug}}/requirements/base.txt
2021-02-23 19:10:52 +00:00
Bruno Alla
ddc102d0f1
Merge pull request #2992 from Andrew-Chen-Wang/patch-3
...
Use exception var in status code pages if available
2021-02-23 08:43:33 +00:00
Andrew Chen Wang
1aa4c31b87
Change confusing CSRF 403 message
...
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2021-02-22 15:45:05 -05:00
Areski Belaid
26540f4cc9
Merge branch 'master' into fix_django_31
2021-02-21 17:56:24 +01:00
areski
86f79e08b2
Update Django to 3.1.7
2021-02-21 17:55:05 +01:00
Andrew Chen Wang
8aeee881bb
Remove email from User API Test
2021-02-16 18:35:47 -05:00
Andrew Chen Wang
17499a12c9
Remove email from User API
2021-02-16 18:33:27 -05:00
Bruno Alla
e5bc9af44c
Merge pull request #3041 from arnav13081994/update_test_case
2021-02-06 17:07:00 +00:00
Arnav Choudhury
352232f617
Fixed Formatting Issues.
2021-02-05 09:55:30 +05:30
Arnav Choudhury
47768d495f
Refactored test_views to test only the required characteristics of the UserCreationForm.
2021-02-05 09:47:06 +05:30
areski
002b3eaf41
Update Django 3.0.11 to 3.1.6
2021-02-04 16:52:45 +01:00
Arnav Choudhury
3cf7e74a77
Removed unused Http404 import.
2021-02-04 15:54:26 +05:30
Arnav Choudhury
fc8e2ea8a2
Removed unnecessary test for username case sensitivity since django usernames are case sensitive by default. Also made the redirecting to the login url more dynamic by fetching the defined login_url from settings
2021-02-04 15:28:08 +05:30
Arnav Choudhury
e8996ef281
Updated the test_clean_username test to also test for the custom validation message raised in case username already exists in the db
2021-01-30 11:41:16 +05:30
Arnav Choudhury
0a241a8f75
Updated test_forms.py to not check whether UserCreationForm has a clean_username() method
2021-01-29 22:16:11 +05:30
Arnav Choudhury
e0cf956fe2
Refactored users.forms to make the code more readeable
2021-01-29 17:55:10 +05:30
Bruno Alla
d62ad403a4
Merge pull request #3018 from Andrew-Chen-Wang/patch-6
2021-01-26 18:51:00 +00:00
Arnav Choudhury
125f1a8afe
Fixing Formatting issues
2021-01-26 10:34:18 +05:30
Arnav Choudhury
d358fc948d
Using SuccessMessageMixin to pass the message to django template instead of overriding form_valid
2021-01-26 09:56:24 +05:30
Bruno Alla
d12d01d325
Fix mypy error
2021-01-25 22:13:19 +00:00
Bruno Alla
37e0d6ae04
Add test for the UserAdmin
2021-01-25 21:55:14 +00:00
Bruno Alla
d1409e2fb3
Missing import
2021-01-25 21:08:33 +00:00
Andrew Chen Wang
cbb3cdb2b1
Update admin to ignore *_name User attributes
...
Fixes #3016
2021-01-25 11:20:34 -05:00
Bruno Alla
6a4a9ba6ee
Merge branch 'master' into defer-js
2021-01-24 15:42:12 +00:00
Bruno Alla
42f33527c5
Refactor test
2021-01-24 15:17:01 +00:00
Bruno Alla
e293d8c00e
Merge pull request #2949 from thorrak/add_test
2021-01-24 15:08:22 +00:00
Bruno Alla
aee2559d4f
Merge pull request #2998 from Andrew-Chen-Wang/patch-6
2021-01-24 14:26:23 +00:00
Bruno Alla
23c7616bd4
Merge pull request #2986 from pydanny/pyup-update-factory-boy-3.1.0-to-3.2.0
2021-01-24 14:25:16 +00:00
Bruno Alla
b7c95f6eed
Update factory-boy's .generate to evaluate
...
Co-Authored-By: Timo Halbesma <timo@halbesma.com>
2021-01-24 14:20:39 +00:00
Andrew Chen Wang
3cbd840a96
Use self.request.user instead of second query
2021-01-21 19:02:01 -05:00
Andrew Chen Wang
5809eabb31
Ignore typing override in name removals
2021-01-07 22:39:18 -05:00
Andrew Chen Wang
2f416f9057
Remove first_name and last_name from migrations
2021-01-07 22:30:27 -05:00
Andrew Chen Wang
dce3144b39
Omit first_name and last_name in User model
2021-01-07 22:27:50 -05:00
Andrew Chen Wang
ac0af4c178
Use exception var in 404.html if available
2021-01-01 22:44:02 -05:00
Andrew Chen Wang
3a1e94f41c
Use exception var in 403.html if available
2021-01-01 22:40:30 -05:00
Thorrak
ed69df4403
Change test to iterate through messages instead of accessing _queued_messages directly
2020-11-26 11:23:46 -05:00
Thorrak
894dbce645
Add test for users.form_valid
...
Ensures that the message is added to the request when a form is submitted
2020-11-26 10:17:20 -05:00
Thorrak
d2ec1eca12
Fix typo in message
2020-11-26 10:15:04 -05:00
Andrew Chen Wang
1fa5d79813
Add "defer" for inline Javascript
...
* Also utilize ECMAScript 6, 2015 syntax
2020-11-14 10:27:14 -05:00
umgelurgel
9f3117c615
Upgrade factory-boy to 3.1.0
2020-11-12 18:53:29 +01:00
Andrew-Chen-Wang
607c9676f5
Use defer for script tags ( Fix #2922 )
...
* This way, scripts from external URLs are loaded asynchronously. By putting it at the top of the file, the browser parses it first, downloads it while continuing to parse the HTML, and then executes on parsing finish
* Additionally, developers will not need to use $(window).ready() or the like in their files anymore.
* Added inline_javascript tag in case anyone wants to use the bottom of the HTML page to execute some Javascript. Using defer here has no effect as inline scripts defer by default
Signed-off-by: Andrew-Chen-Wang <acwangpython@gmail.com>
2020-11-04 11:54:21 -05:00
Bruno Alla
26f2a3d7ba
Fix mypy error
...
my_awesome_project/users/admin.py:15: error: No overload variant of "__add__" of "tuple" matches argument type "List[Tuple[Optional[str], _FieldOpts]]"
my_awesome_project/users/admin.py:15: note: Possible overload variants:
my_awesome_project/users/admin.py:15: note: def __add__(self, Tuple[Tuple[str, Dict[str, Tuple[str]]], ...]) -> Tuple[Tuple[str, Dict[str, Tuple[str]]], ...]
my_awesome_project/users/admin.py:15: note: def __add__(self, Tuple[Any, ...]) -> Tuple[Any, ...]
my_awesome_project/users/admin.py:15: note: Right operand is of type "Union[Tuple[Tuple[Optional[str], _FieldOpts], ...], List[Tuple[Optional[str], _FieldOpts]]]"
2020-10-01 20:01:26 +01:00
Bruno Alla
689c768abf
Fix mypy error
...
users/tests/test_views.py:67: error: unused 'type: ignore' comment
2020-10-01 19:16:22 +01:00
Bruno Alla
a2c4453cf5
Fix isort errors
2020-09-16 09:39:02 +01:00
Daniel Feldroy
ec3922cfe6
Give admin_forms the forms namespace
...
This will make extending various signup and registration forms easier.
2020-09-14 11:36:47 -07:00
Bruno Alla
e21869c1d4
Fix black formatting issues
2020-08-27 09:41:28 +02:00
Bruno Alla
0ebd35dd83
Update deprecated imports
2020-08-14 12:19:42 +01:00
Bruno Alla
e2910a3222
Merge pull request #2694 from Andrew-Chen-Wang/patch-7
2020-07-24 17:40:23 +01:00