[checklist] Refactoring of checklist
Review Request #7176 — Created April 7, 2015 and submitted — Latest diff uploaded
Refactoring includes
- Use of
request.userinstead of passinguser_idin every HTTP request - Updating of the view only after successful API response
- Renamed status of each item from
finishedtochecked - Use of
ChecklistItemnon-database resource API instead of using HTTP request parameters - Moving of front-end API logic from view to model
- CSS hyphens everywhere instead of underscores
- Improving Python code (renaming variables, removing redundant code)
- Start checklist item IDs from 0 instead of 1.
Basic CRUD functionality remains. Ensured that the views will not update unless there is a successful response from the server.
| checklist/checklist/models.py |
|---|
| checklist/checklist/resources/checklist_item.py |
|---|
| checklist/checklist/static/js/models/checklist.js |
|---|
| checklist/checklist/static/js/views/checklistView.js |
|---|