Use Djblets' dynamic config pages for account pages
Review Request #7828 — Created Dec. 24, 2015 and submitted
Account pages now use the
ConfigPageRegistry
and
DynamicConfigPageMixin
from Djblets instead of using custom logic.
The external API has been kept the same, but it has been rewritten to
useRegistry
methods instead. Unit test logic has been updated to
check for the right exceptions.
- Ran unit tests.
Description | From | Last Updated |
---|---|---|
Swap these. |
chipx86 | |
Yielding here is going to be slower than just doing: return (AccountSettingsPage, APITokensPage, ...) We're already building the tuple for … |
chipx86 | |
Maybe just set this directory below in AccountPage, and access it later as AccountPage.registry (similar to how we do ReviewRequest.objects)? |
chipx86 | |
Blank line between these. |
chipx86 | |
Are we aiming to deprecate these, or to keep them as the official API? I ask because it seems it'd … |
chipx86 | |
I think you can just return iter(pages). |
chipx86 | |
No need for parens. |
chipx86 | |
We should use AccountPage.registry instead of pages. |
chipx86 | |
I think you just changed the order of how things are shown on the user settings page. |
david |
-
-
-
Yielding here is going to be slower than just doing:
return (AccountSettingsPage, APITokensPage, ...)
We're already building the tuple for the
for
loop, and generators have additional expense to them, often being slower for smaller lists of static things. -
Maybe just set this directory below in
AccountPage
, and access it later asAccountPage.registry
(similar to how we doReviewRequest.objects
)? -
-
Are we aiming to deprecate these, or to keep them as the official API? I ask because it seems it'd be nice to exclusively use
AccountPage.registry.blah()
for calls, but I know some of these wrap the registry calls in more detailed ways (logging exceptions, for instance).I wonder if we should move all the detail of these global functions into the registry subclass, mark all these as deprecated, and aim to use those exclusively.
-
-
-
-
Tool: Pyflakes Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/pages.py Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/pages.py
-
Tool: Pyflakes Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/pages.py Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/pages.py
-
Tool: Pyflakes Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/pages.py Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/tests.py reviewboard/accounts/pages.py