-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTODO
More file actions
82 lines (58 loc) · 3 KB
/
TODO
File metadata and controls
82 lines (58 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
General:
- Docs
- Tests
- Fix breadcrumbs again...def should be one of the first tests since it checks
the resolver logic as well.
Specifically:
BoundField
- is_first used? leftover from readonlybound field?
- is_readonly used/useful
- build out proxy field concept via boundfield
- ensure errors working as intended from BF to field to FieldLine to FieldSet to Form
Fieldline
- conditionally returned a ROF or AdminField (wrapped BF) based on whether in ROF list -- reinstate behavior
- flagged whether field is first for when that is important
Inline fieldset skips iteration of the FK for an inline formset.
- TODO: Conditionally do NOT skip this when a) acting as SU and b) a root controller (allows to choose attribution).
- Move view dict to DRF view sets.
- Rename groupings of views from public/private to display/editing -- tip off
controllers on how to render. This is more in line with providing forms with
display-only, editable, or both components on a page so that individual fields
can be edited and AJAX calls can be made.
Re-implement addition widgets with popup behavior
TODO memoize view (and form) class composition?
# TODO: eventually we could consider putting the FK name on the URL path
# and thus supporting multiple FK names for *query* purposes and then let
# the single-object (in-focus) object discern which FK it is using
# FOR NOW, let's maintain a single FK since that is more typical
"""
TODO: look into the intent of this
if not qs.query.select_related:
qs = self.apply_select_related(qs)
"""
# TODO: lean on configurable pk/slug_field
# TODO: add a build-time error if controller patterns yield slug
# uniqueness constraints that differ from model contraints.
# i.e. post has a slug, post is subordinated to blog and to user,
# e.g. /tom/blogs/food/posts/apples and /tom/posts/apples
# ergo post must have (owner, slug) and (blog, slug)
TODO: Issue dev warning if we get here? On one hand, None is used
to indicated there was no path. On the other hand, such a silent
fail could be hard to debug
TODO: Allow parent controller to provide access to a form repr of object for use on pages (e.g. selector for admin as su)
TODO: allow render of list/single object view using form designs as upstream but rendering "simple fields" as text w labels
Do general review and reconciliation with admin behaviors on fields to ensure uniform/imporoved behavior.
Re-introduce widgets
# TODO: consider request field whitelist (e.g. user-controlled)
# TODO: consider view field whitelist
# TODO: consider controller mode fields (with fallback)
# TODO: for list mode, consider formset fallback?
# TODO: for all modes, consider form fallback
# TODO: rinse-wash-repeat for exclude
# NOTE: This gets called as a helper to get_form_class_kwargs. Recurring
# here is avoided by ensuring fields=None is passed to that method.
# TODO: remove
# if fields is None:
# form = self.get_formset_class(view, obj, fields=None).form
# fields = list(form.base_fields) + \
# list(self.get_readonly_fields(view, obj))