Create new web api for Checklist templates
Review Request #6106 — Created July 15, 2014 and discarded
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 |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 54 W292 no newline at end of file |
reviewbot | |
Col: 46 E127 continuation line over-indented for visual indent |
reviewbot | |
Col: 17 E127 continuation line over-indented for visual indent |
reviewbot | |
undefined name 'ObjectDoesNotExist' |
reviewbot | |
undefined name 'DOES_NOT_EXIST' |
reviewbot | |
'PERMISSION_DENIED' imported but unused |
reviewbot | |
'NOT_LOGGED_IN' imported but unused |
reviewbot | |
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 … |
david | |
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 |
reviewbot | |
Can you change this to name = 'checklist_template'? |
anselina | |
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.) |
anselina |
- Change Summary:
-
Added update method
- Description:
-
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 - Commit:
-
34a6bd7af5f8e8b38e5393c889b8e9a96bc116c10ab373fbd5f8b27a1caa75f817487164193a8bc4
-
Tool: PEP8 Style Checker Processed Files: checklist/checklist/ChecklistTemplateResource.py Tool: Pyflakes Processed Files: checklist/checklist/ChecklistTemplateResource.py
-
-
-
-
- Change Summary:
-
Imported errors and exception objects
- Commit:
-
0ab373fbd5f8b27a1caa75f817487164193a8bc4bf801a5af61aed33eda9a0ee7c1ff58e2b831099
- Change Summary:
-
deleted unused imports.
- Commit:
-
bf801a5af61aed33eda9a0ee7c1ff58e2b831099e113f67958e85ad7595867a4e5738c86c403c653
-
Tool: PEP8 Style Checker Processed Files: checklist/checklist/ChecklistTemplateResource.py Tool: Pyflakes Processed Files: checklist/checklist/ChecklistTemplateResource.py
-
-
-
-
Reviewboard uses trailing commas on lists and dictionaries. You should add them to all your other dictionaries as well.
-
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.
- Change Summary:
-
Fixed format, added a flag for deleting items.
- Commit:
-
e113f67958e85ad7595867a4e5738c86c403c653b7f57c5f1a48c9ab6243f6329b63a499eab9a545