Defining OPTIONS or meta method

RFC 9110 defines the OPTIONS HTTP method, but sadly Django’s View which we use as a base class for all controllers, already has options() method.

It would generate a typing error to redefine it with a different signature that we need for our endpoints.

That’s why we created our own meta controller method as a replacement for older Django’s options name.

To use it you have two options:

  1. Define the meta endpoint yourself and provide a custom implementation

  2. Use MetaMixin or AsyncMetaMixin with the default implementation: we provide Allow header with all the allowed HTTP methods in this controller

Here’s an example of a custom meta implementation:

Run result

$ curl http://127.0.0.1:8000/api/settings/ -D - -X OPTIONS
HTTP/1.1 204 No Content
date: Sun, 05 Apr 2026 17:51:41 GMT
server: uvicorn
Allow: GET, OPTIONS, POST
Content-Type: application/json
X-Frame-Options: DENY
Vary: Accept-Language
Content-Language: en
Content-Length: 0
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin