[checklist] Refactoring of checklist
Review Request #7176 — Created April 7, 2015 and submitted — Latest diff uploaded
Refactoring includes
- Use of
request.user
instead of passinguser_id
in every HTTP request - Updating of the view only after successful API response
- Renamed status of each item from
finished
tochecked
- Use of
ChecklistItem
non-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.
Diff Revision 3
This is not the most recent revision of the diff. The latest diff is revision 8. See what's changed.
orig
1
2
3
4
5
6
7
8
checklist/checklist/extension.py |
---|
checklist/checklist/models.py |
---|
checklist/checklist/resources/__init__.py |
---|
checklist/checklist/resources/checklist_item.py |
---|
checklist/checklist/resources/checklist_resource.py |
---|
checklist/checklist/static/css/style.less |
---|
checklist/checklist/static/js/models/checklist.js |
---|
checklist/checklist/static/js/models/checklistAPI.js |
---|
checklist/checklist/static/js/views/checklistView.js |
---|
checklist/checklist/templates/checklist/template.html |
---|