Commit 1ee1c82
authored
autocomplete widget validation and related object creation, added obj param to extra context methods, allow override back url in change view (#92)
* feat: autocomplete widget - validate restricted queryset and allow create new objects
* fix: missing data during view instancing
* triv: validate multiselect in widget
* triv: pass obj to all methods of change view extra context
* triv: added obj param to reflect admin changes
* triv: fixed get_parent_instance_from_request for new objects
* triv: style fix
* triv: add option for autocomplete widget to reload parent change view when saving related model instance in modal
* triv: removed unused import
* triv: allow override back url in change form view
* triv: raise ImproperlyConfigured for multiselect with allow_add
* fix lxml version
* triv: fixed case where newly created value didn't propagate to context data due to form being bound which is caused by other field error
* triv: check for referer
* triv: poetry lock
* triv: update workflow
* bump version
* triv: revert form field changes
* triv: save newly created value in autocomplete widget to request data and retrieve it in context data if there is other validation error in form
* Revert "triv: pass obj to all methods of change view extra context"
This reverts commit 41b61d8
* Revert "triv: added obj param to reflect admin changes"
This reverts commit 34d23bf.
* triv: black format1 parent 0f6ba35 commit 1ee1c82
File tree
14 files changed
+716
-386
lines changed- .github/workflows
- src/django_smartbase_admin
- admin
- engine
- services
- static/sb_admin/src/js
- templates/sb_admin
- actions
- widgets
- includes
14 files changed
+716
-386
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
319 | 328 | | |
320 | 329 | | |
321 | 330 | | |
| |||
324 | 333 | | |
325 | 334 | | |
326 | 335 | | |
327 | | - | |
| 336 | + | |
328 | 337 | | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | 338 | | |
334 | 339 | | |
335 | 340 | | |
| |||
822 | 827 | | |
823 | 828 | | |
824 | 829 | | |
825 | | - | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
826 | 838 | | |
827 | 839 | | |
828 | 840 | | |
| |||
958 | 970 | | |
959 | 971 | | |
960 | 972 | | |
961 | | - | |
| 973 | + | |
962 | 974 | | |
963 | 975 | | |
964 | 976 | | |
| |||
1051 | 1063 | | |
1052 | 1064 | | |
1053 | 1065 | | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
1054 | 1091 | | |
1055 | 1092 | | |
1056 | 1093 | | |
| |||
0 commit comments