-
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 1) Col: 46 E127 continuation line over-indented for visual indent
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 1) Col: 80 E501 line too long (80 > 79 characters)
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 1) Col: 54 W292 no newline at end of file
Create new web api for Checklist templates
Review Request #6106 — Created July 15, 2014 and discarded
Information | |
---|---|
salam0smy | |
rb-extension-pack | |
Reviewers | |
students | |
Declerations, and override access methods.
Added create method to post a new template list. It attaches the user to the new template list.
Added update method that :
- creates a new items when id is not present
- updates items when id, and description is present
- delete item when only id is present
Description | From | Last Updated |
---|---|---|
Col: 46 E127 continuation line over-indented for visual indent |
![]() |
|
Col: 80 E501 line too long (80 > 79 characters) |
![]() |
|
Col: 54 W292 no newline at end of file |
![]() |
|
Col: 46 E127 continuation line over-indented for visual indent |
![]() |
|
Col: 17 E127 continuation line over-indented for visual indent |
![]() |
|
undefined name 'ObjectDoesNotExist' |
![]() |
|
undefined name 'DOES_NOT_EXIST' |
![]() |
|
'PERMISSION_DENIED' imported but unused |
![]() |
|
'NOT_LOGGED_IN' imported but unused |
![]() |
|
You only really need braces around the from _ import _ if it spans multiple lines. |
MA matthewcmaclean | |
Reviewboard uses trailing commas on lists and dictionaries. |
MA matthewcmaclean | |
Reviewboard uses trailing commas on lists and dictionaries. You should add them to all your other dictionaries as well. |
MA matthewcmaclean | |
This shouldn't be necessary. You can add a request argument (immediately after self), and then use request.user to find the … |
|
|
PUT is used to update an object. I don't think you should support adding or deletion in update. In the … |
MA matthewcmaclean | |
'User' imported but unused |
![]() |
|
Can you change this to name = 'checklist_template'? |
|
|
Very minor nitpick - there is no need for extra newlines before elif/else clauses (at least that's how it's done … |
VO volodymyr | |
Add one more blank line before this. (There should be two blank lines between top-level blocks.) |
|

Change Summary:
Added update method
Description: |
|
||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commit: |
|
||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+90) |

-
Tool: PEP8 Style Checker Processed Files: checklist/checklist/ChecklistTemplateResource.py Tool: Pyflakes Processed Files: checklist/checklist/ChecklistTemplateResource.py
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 2) Col: 46 E127 continuation line over-indented for visual indent
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 2) Col: 17 E127 continuation line over-indented for visual indent
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 2) undefined name 'ObjectDoesNotExist'
-
Change Summary:
Imported errors and exception objects
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+93) |

-
Tool: PEP8 Style Checker Processed Files: checklist/checklist/ChecklistTemplateResource.py Tool: Pyflakes Processed Files: checklist/checklist/ChecklistTemplateResource.py
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 3) 'PERMISSION_DENIED' imported but unused
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 3) 'NOT_LOGGED_IN' imported but unused
Change Summary:
deleted unused imports.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+92) |

-
Tool: PEP8 Style Checker Processed Files: checklist/checklist/ChecklistTemplateResource.py Tool: Pyflakes Processed Files: checklist/checklist/ChecklistTemplateResource.py
-
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 4) You only really need braces around the from _ import _ if it spans multiple lines.
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 4) Reviewboard uses trailing commas on lists and dictionaries.
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 4) Reviewboard uses trailing commas on lists and dictionaries. You should add them to all your other dictionaries as well.
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 4) PUT is used to update an object. I don't think you should support adding or deletion in update. In the situation that the object is invalid if it has no description so it should be deleted, you might want to make the field required instead of optional.
-
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 4) This shouldn't be necessary. You can add a
request
argument (immediately afterself
), and then userequest.user
to find the authenticated user.That also prevents people from impersonating others when creating checklist templates.
Change Summary:
Fixed format, added a flag for deleting items.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+88) |

-
Tool: PEP8 Style Checker Processed Files: checklist/checklist/ChecklistTemplateResource.py Tool: Pyflakes Processed Files: checklist/checklist/ChecklistTemplateResource.py
-
-
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 5) Very minor nitpick - there is no need for extra newlines before elif/else clauses (at least that's how it's done in 99% of the codebase).
-
-
checklist/checklist/ChecklistTemplateResource.py (Diff revision 5) Can you change this to
name = 'checklist_template'
? -
checklist/checklist/ChecklistTemplateResource.py (Diff revision 5) Add one more blank line before this. (There should be two blank lines between top-level blocks.)
Change Summary:
Changed api name to include underscore instead of camel case style. Fixed a bug where I wasn't initlizing the right resource for the api.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+7 -34) |