Skip to content

Commit

Permalink
add readme note on drf/ninja/cbvs
Browse files Browse the repository at this point in the history
  • Loading branch information
andriykohut committed Apr 16, 2024
1 parent 7c119ce commit 5dd3f8f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,10 @@ from limits.storage import RedisStorage
def view(request):
return HttpResponse("OK")
```

### DRF/ninja/class-based views

`django-ratelimiter` is framework-agnostic, it should work with DRF/ninja out of the box.
Class-based views are also supported with [method_decorator](https://docs.djangoproject.com/en/5.0/topics/class-based-views/intro/#decorating-the-class).

See examples in [test_app](./test_app/views.py)

0 comments on commit 5dd3f8f

Please sign in to comment.