Description: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
Status Updates part 5: Add the StatusUpdate model.
Review Request #8406 — Created Sept. 18, 2016 and submitted
This change adds the model for status updates. A status update has some display
fields (the state, summary, description, url, etc.), and some relations to
other models to link things up as appropriate.
- Ran syncdb.
- Used the model via the admin UI (and other changes).
Description | From | Last Updated |
---|---|---|
What does this look like in the admin UI? We should probably flesh this out with some state that'd help … |
chipx86 | |
We should include a file docstring for status_update.py. |
chipx86 | |
Should be "third-party service or extension." |
chipx86 | |
"etc." Can we also flesh out what a status update means? What it comprises of? |
chipx86 | |
We should have doc comments for these, too. |
chipx86 | |
Doc comments follow the same format as docstrings: Single-line summary, multi-line description. Same below. |
chipx86 | |
No : on static:. |
chipx86 | |
These should use :py:attr: for the constant references. |
chipx86 | |
Can we make this a ForeignKey? I know this is a bigger topic, which we should probably have in more … |
chipx86 | |
We should be representing these as fields in the ModelAdmin, instead of in __str__ (we recently fixed this in another … |
chipx86 | |
Static methods should go before normal methods. |
chipx86 | |
Missing Returns. |
chipx86 | |
We don't do this anywhere else. |
brennie | |
bool |
chipx86 |
-
-
reviewboard/reviews/admin.py (Diff revision 1) What does this look like in the admin UI? We should probably flesh this out with some state that'd help us locate and debug statuses.
-
reviewboard/reviews/models/status_update.py (Diff revision 1) We should include a file docstring for
status_update.py
. -
reviewboard/reviews/models/status_update.py (Diff revision 1) Should be "third-party service or extension."
-
reviewboard/reviews/models/status_update.py (Diff revision 1) "etc."
Can we also flesh out what a status update means? What it comprises of?
-
reviewboard/reviews/models/status_update.py (Diff revision 1) We should have doc comments for these, too.
-
reviewboard/reviews/models/status_update.py (Diff revision 1) Doc comments follow the same format as docstrings: Single-line summary, multi-line description.
Same below.
-
-
reviewboard/reviews/models/status_update.py (Diff revision 1) These should use
:py:attr:
for the constant references. -
reviewboard/reviews/models/status_update.py (Diff revision 1) Can we make this a
ForeignKey
?I know this is a bigger topic, which we should probably have in more detail offline (I have a lot of thoughts to go over here), but the more I think about it the more I firmly believe we should be consolidating reviews on publish. To leave that option open as a possibility, for now or down the road, I'd like to not box ourselves in to a one-to-one relationship.
-
reviewboard/reviews/models/status_update.py (Diff revision 1) We should be representing these as fields in the
ModelAdmin
, instead of in__str__
(we recently fixed this in another model). -
reviewboard/reviews/models/status_update.py (Diff revision 1) Static methods should go before normal methods.
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+209 -4) |
-
Tool: Pyflakes Processed Files: reviewboard/reviews/models/status_update.py reviewboard/reviews/admin.py reviewboard/reviews/models/__init__.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/models/status_update.py reviewboard/reviews/admin.py reviewboard/reviews/models/__init__.py
-
-
-
reviewboard/reviews/admin.py (Diff revision 2) Not related to this change, but we should consider a
@model_admin_short_description()
decorator for stuff like this.