تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4786 أدوات العرض

Standard behavior:
Allowed only methods: POST, if CORS
Expected behavior:
I want to override the method set_default(self, template=None, qcontext=None, uid=None)
To allow such methods as DELETE, PUT, PATCH etc.,
But when I try to use, for example, method PUT -  nothing happens.
My Case:

@http.route(['/api/v1/detail'], type='json', auth="public", methods=['PUT', 'OPTIONS'], cors='*', csrf=False)
الصورة الرمزية
إهمال
أفضل إجابة

Try with ['POST'] methods or whatever you want

ex

@http.route(['/api/XXX/auth/token'], methods=['POST'], type='json', csrf=False, auth="public")
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
2947
0
مارس 15
4431
1
مارس 15
8291
1
مارس 15
5404
2
يوليو 25
1079