Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add adventure editing #25

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Jun 13, 2016

  1. Add tests for adventure editing

    Tests for put requests in AdventureById currently fail.
    whonut committed Jun 13, 2016
    Configuration menu
    Copy the full SHA
    3c3fe6f View commit details
    Browse the repository at this point in the history
  2. Fix test JSON

    whonut committed Jun 13, 2016
    Configuration menu
    Copy the full SHA
    db80d2e View commit details
    Browse the repository at this point in the history
  3. Add tests for adventure editing

    The AdventureById view remains unchanged, so the put method tests
    currently fail.
    whonut committed Jun 13, 2016
    Configuration menu
    Copy the full SHA
    95af3d8 View commit details
    Browse the repository at this point in the history
  4. Store adventure ID, not object, in an attribute

    When accessing the Adventure object directly, we have no QuerySet and
    so cannot call update(), instead we have to call save(). Storing the
    adventure ID means we can access the Adventure via filter(). This
    returns a QuerySet, so we can call update().
    
    Calling update() instead of save() is more efficient and avoids a race
    condition wherein an object is changed in the database between
    retrieval and saving.
    whonut committed Jun 13, 2016
    Configuration menu
    Copy the full SHA
    d36e061 View commit details
    Browse the repository at this point in the history
  5. Add adventure editing via PUT requests

    No attempt is made at authentication, nor at proper CSRF-handling.
    The assumption is made that authentication will be handled by a
    parent view.
    whonut committed Jun 13, 2016
    Configuration menu
    Copy the full SHA
    99272cf View commit details
    Browse the repository at this point in the history
  6. Merge branch 'edit-adventures' with remote branch

    Local repo was screwed up. This brings the local and remote
    repos to the same point.
    whonut committed Jun 13, 2016
    Configuration menu
    Copy the full SHA
    7b1f82a View commit details
    Browse the repository at this point in the history
  7. Fix code style

    whonut committed Jun 13, 2016
    Configuration menu
    Copy the full SHA
    3bf6fcb View commit details
    Browse the repository at this point in the history