Update rbmotd for Review Board 4.0
Review Request #11057 — Created June 25, 2020 and submitted
Information | |
---|---|
david | |
rb-extension-pack | |
master | |
Reviewers | |
rb-extension-pack | |
This change updates the message of the day extension for changes in
Review Board 4.0. This includes moving away from the oldpatterns
method for creating urlpatterns, and updating for API changes in Djblets
config forms. This also modernizes the codebase a bit, adding
unicode_literals
and docstrings.
Activated and configured the motd extension. Verified that everything
worked as expected.
Summary | |
---|---|
Description | From | Last Updated |
---|---|---|
These should be in the same import group. While here, can you add the standard unicode_literals import? |
|
|
Can you add some docs while you're here? Took me a few to figure out what this was doing (with … |
|
|
"Board" |
|
|
Probably MotdExtension would be appropriate here. |
|
|
This would be SafeText. SafeString is bytes on Python 2. |
|
|
We've only been using * for JavaScript, since there's no base object. For Python, we've been using object. |
|
|
The module is still safestring, just the class is SafeText. |
|
-
-
rbmotd/rbmotd/admin_urls.py (Diff revision 1) These should be in the same import group.
While here, can you add the standard
unicode_literals
import? -
rbmotd/rbmotd/forms.py (Diff revision 1) Can you add some docs while you're here? Took me a few to figure out what this was doing (with the self-call to
set_key_value()
).
Description: |
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commits: |
|
||||||||||||||||||
Diff: |
Revision 2 (+118 -28) |
Checks run (2 succeeded)
-
Looks good. A couple small doc nits.
-
-
-
rbmotd/rbmotd/extension.py (Diff revision 2) This would be
SafeText
.SafeString
isbytes
on Python 2. -
rbmotd/rbmotd/forms.py (Diff revision 2) We've only been using
*
for JavaScript, since there's no base object. For Python, we've been usingobject
.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+118 -28) |
Checks run (2 succeeded)
-
-
rbmotd/rbmotd/extension.py (Diff revision 3) The module is still
safestring
, just the class isSafeText
.