fix: review issues - add rate limiting for auth views, add __str__ to User model

This commit is contained in:
Marko (Hermes Implementer)
2026-05-26 06:07:58 +00:00
parent fc0531395d
commit e6e6c92c28
2 changed files with 15 additions and 1 deletions
+7
View File
@@ -91,6 +91,13 @@ REST_FRAMEWORK = {
"DEFAULT_RENDERER_CLASSES": (
"rest_framework.renderers.JSONRenderer",
),
"DEFAULT_THROTTLE_CLASSES": [
"rest_framework.throttling.AnonRateThrottle",
],
"DEFAULT_THROTTLE_RATES": {
"anon": os.environ.get("DJANGO_THROTTLE_ANON_RATE", "10/hour"),
"auth": os.environ.get("DJANGO_THROTTLE_AUTH_RATE", "5/minute"),
},
}
SIMPLE_JWT = {