Replies: 1 comment 3 replies
-
|
Doesn't CBV work? @auth.route("/login")
class LoginView:
@render("auth/login.html")
async def get(self, request, response, **server):
return {'csrf_token': get_csrf_token(request)}
@csrf_protect
async def post(self, request, response, **server):
data = await request.form() |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
if render a form with 'GET', then receive form data with 'POST',
and serve the form with CSRF protection, no way to apply '@csrf_protect'.
if added a argument 'methods=...' to app.route(), we can
Beta Was this translation helpful? Give feedback.
All reactions