Explicitly fetch a user profile in the account form pages.
Review Request #9617 — Created Feb. 10, 2018 and submitted
ConfigPageForm
in Djblets fetches a user profile up-front, which the
subclasses then use to access profile state. That functionality is
deprecated, as profiles are no longer a core part of Django. An upcoming
change will raise aDeprecationWarning
any timeself.profile
is
accessed.This change prepares for that by fetching the profile on-demand instead
of using the attribute lookup. Since profiles are cached, this won't
result in any extra database access.
Unit tests pass.
Manually tested loading and saving settings on the affected forms.
Description | From | Last Updated |
---|---|---|
Typo in description: "subclasse" |
david |
- Description:
-
ConfigPageForm
in Djblets fetches a user profile up-front, which the~ subclasse then use to access profile state. That functionality is ~ subclasses then use to access profile state. That functionality is deprecated, as profiles are no longer a core part of Django. An upcoming change will raise a DeprecationWarning
any timeself.profile
isaccessed. This change prepares for that by fetching the profile on-demand instead
of using the attribute lookup. Since profiles are cached, this won't result in any extra database access.