Skip to content

feat(crud): implement the CRUD integrations of the fotdraft #33

Description

@gery25

Description

Create a draft_detail view and a corresponding template to allow users to view the full details of a specific formation.

Tasks

  • Add draft_detail view in myapp/views.py with proper ownership checks (request.user).
  • Create templates/myapp/draft_detail.html (reusing the pitch rendering logic from my_drafts.html).
  • Add the URL pattern in myapp/urls.py.
    Issue 2

Description

Add an AJAX-enabled endpoint to allow users to rename their drafts or change their formation without a full page reload.

Tasks

  • Add update_draft view in myapp/views.py using @require_POST.
  • Add the URL pattern in myapp/urls.py.
  • Implement the frontend JavaScript in the detail view to handle the update request.
    Issue 3

Description

Add an AJAX-enabled endpoint to allow users to safely delete their saved formations.

Tasks

  • Add delete_draft view in myapp/views.py using @require_POST.
  • Add the URL pattern in myapp/urls.py.
  • Implement the frontend JavaScript (e.g., a confirmation dialog and fetch call) in the UI.
    Issue 4

Description

Update the existing "Tactical History" list to provide navigation to the individual draft details.

Tasks

  • Modify the loop in templates/myapp/my_drafts.html to include links to {% url 'draft_detail' draft.id %}.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions