Skip to content

json dataclass RedeemResult serialization issues #2

Description

@timnbraun

I'm trying to get this to work with my django 6.0.4 based web site, and the following issues have been seen:

  1. The API doesn't end with a slash - normal for web APIs. But this triggers an error "RuntimeError: You called this URL via POST, but the URL doesn't end in a slash..." if APPEND_SLASH is set. I editted the url.py to accept no trailing slash and found the next error. This also required @no_append_slash decorations on the views in the api.
  2. The CSRF token is not passed, perhaps due to using JSON instead of HTTP responses? I added the @csrf_exempt decorators to the views in the api and then found out the next error.
  3. The redeem view ends with a:
    Bad Request: /cap/v1/redeem
    [11/Jun/2026 21:31:48] "POST /cap/v1/redeem HTTP/1.1" 400

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions