Commit történet

Szerző SHA1 Üzenet Dátum
  Andrew Knox Shiels 8edc10289d Added 404 codes for the '<Object> does not exist' exceptions, added (UNTESTED) functionality to send errors only to the connection making the erroneous request instead of broadcasting it (worked for a tag that doesn't actually exist, testing for all models to follow). Updated API documentation to reflect this change, and added documentation for delete_canvas and delete_project views, which I forgot. Finally, modified delete_project to only allow the owner to delete the project - admins of a project may still delete individual canvases. 6 éve
  Andrew Knox Shiels 3c1715db0d addressed a bug where my working front-end wasn't working right with JSONified single model instances. 6 éve
  Andrew Knox Shiels f1e8d3a6f7 Marked canvas_type in models.py as TODO: 'change canvas_type to strings, update URL parameters to reflect this in routing, views.py, and in the html templates...' 6 éve
  Andrew Knox Shiels 958dc856bf runserver warned me null has no effect on m2m - removed null=True from project.users and project.admins 6 éve
  Andrew Knox Shiels 6edd5366f7 Allowing the user, admin and owner fields to be blank and null for the blank trial canvas. Made all operations be available on public canvasses. 6 éve
  Andrew Knox Shiels 5929a2dfa4 Forgot to update the trial user functionality after adding projects, done so. Enabled null on project owner for the allowance of the AnonymousUser to have a blank project created (if it doesn't exist) for blank trial canvases. 6 éve
  Andrew Knox Shiels 451e23472f Tidied the views up a bit. Changed the consumers calls to view functions to be await database_sync_to_async (issues with delete_idea consumer and remove_tag consumer accessing the database out of order, remove_tag couldn't remove a tag from an idea that had been deleted). 6 éve
  Andrew Knox Shiels 5237139b23 Added M2M relation between tags and ideas. Altered view functions to make use of these. remove_tag now removes the current idea from the current tag's idea_set. Delete still removes the tag in its entirety. Add still checks for a tag's existence before creating one. Add and remove tag functions return every tag, every tag's canvas_set and every tag's idea_set to make the updating of these sets on the front-end relatively straightforward. Delete only returns the tag so that the callback can just find its location in its array and remove it. 6 éve
  Andrew Knox Shiels 6bf2541800 Added comment resolve functionality for a single comment as well as for all comments on an idea. Also, comment resolve, delete and resolveAll buttons are hidden for non-admin users. 6 éve
  Andrew Knox Shiels e4db0c8c18 Added functionality to the deleteUserSuccessCallback where if the current user is the victim user, they are kicked out of the project and back to their own project-list page without the need for a page reload. 6 éve
  Andrew Knox Shiels 3dc6a4d911 Modified canvas model, replaced 'is_ethics' boolean with 'canvas_type' integer to allow for privacy canvas and any other canvas type (so long as the category list exists and is of length 9 with a 10th uncategorised slot) which may arise in the future. 6 éve
  Andrew Knox Shiels dd85c2f8a2 Added (very untested) project functionality. Users, admins, owner are all moved from Canvas to Project. All canvasses in a project are visible to every user in the project. The same user / admin permissions required as before, but check user in project.users instead of canvas.users. Went ahead with tags existing for all canvasses in a given project (also quite untested). When a tag is created it (should) add itself to any other canvas in the project containing the label as a substring of an idea. Deletion deletes the tag object outright, it doesn't check occurrences in other canvasses. 6 éve
  Andrew Knox Shiels 7ab33db9bc Added some basic CSS to tidy the canvas up a bit, mostly for myself, as I was tired of looking at black-and-white left-aligned text fields. Additionally added a boolean to canvas model is_ethics, true for ethics canvas and false for business canvas. If business canvas, the blocks are labelled as a business canvas's would be, with the extra uncategorised block at the bottom. Newly created canvasses have (Business) or (Ethics) at the end of the default title to show their type. For now, on the anonymous user trial of a canvas, tags and collaborators are outright disabled. 6 éve
  Andrew Knox Shiels 7f2d88a9af All things now open in a vue modal component, they no longer redirect away from the page except for clicking a different canvas link in a tag. Tags should automatically remove themselves when there are no ideas containing them in the current canvas, which will only cause them to be deleted outright if they also do not occur in any other canvas. Tags still require their own view functions in python, as they're currently mixed in with the CanvasDetailView class-based view. 6 éve
  Andrew Knox Shiels 78ec64414c Added tags. Addition, conditional creation (if doesn't exist), removal and conditional deletion(if there are no longer any canvasses with that tag). The tags are represented with Vue components, using a modal component when clicked to display the canvasses it occurs in as links. The modal component was taken from the Vue.js modal example at https://vuejs.org/v2/examples/modal.html . 6 éve
  Andrew Knox Shiels 1bf8a0c1af Added permissions for view functions, still using login_required decorator for new_canvas for now, cannot check user in canvas.users for canvas that doesn't exist. Provisionally completed functionality for collaborators page; temporarily a separate page with views and ajax/json requests/responses for purposes of making sure they work. 6 éve
  Andrew Knox Shiels 4768559724 Added comment add/remove functionality. Edit and Resolve are still TODO. 6 éve
  Andrew Knox Shiels d561c4a831 Added div elements for Idea Categories that contain idea lists, idea creation/deletion/comment buttons. Idea still needs submit to be clicked and comments with AJAX/JSON method are still a TODO. Added is_temporary to canvas model to denote if a canvas is a temporary canvas or not, temporary canvasses are made by anonymous users and should be deleted when the session is closed (also TODO). 6 éve
  Andrew Knox Shiels f36148571f Focused on getting AJAX JSON stuff working, so permissions still a TODO. Idea creation, editing and deletion all done using jquery AJAX POST methods with JSON returned by the Django View to the AJAX callback functions. 6 éve
  Andrew Knox Shiels 6ea2c44436 Added 'owner' field to Canvas, began adding permission requirements via checking existence of logged-in user in the current canvas's users/admins/owner fields. 6 éve
  Andrew Knox Shiels 5e875702c3 Added basic functionality to remove users or admins and to delete canvasses. Inserted TODOs for myself to assign permission requirements for certain view functions, the permissions being what I thought were appropriate at the time. Currently only permission required is login mixin on the CanvasList and CanvasDetailView class-based views, and a login_required decorator on the new_canvas view function. 6 éve
  Andrew Knox Shiels 350743df15 Added idea add/remove/edit operations, comment add/remove/resolve operations, and add user to canvas. Permissions have not been created yet, nor has removal of users or canvasses, promotion / demotion of users to / from admin status. 6 éve
  Harshvardhan Pandit 22a76dadee modified models based on code-review 6 éve
  Harshvardhan Pandit 10bda0b652 Added canvas models (merge --squash) 6 éve