Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は問題の 1 つの URL を扱っています。それを呼び出しましょう/user/{id}/buckets/
/user/{id}/buckets/
/user/{id}/buckets/GET でリダイレクトしたいのですdispatch_listが、処理のためPOSTに自分のビューにリダイレクトし(process_buckets)ます。
dispatch_list
POST
(process_buckets)
urlconf がリクエスト メソッドをチェックする方法をサポートしていないことは理解していますが、どうすればよいでしょうか?
リソースのディスパッチ メソッドを上書きするだけで、やりたいことが何でもできます
class FooResource(ModelResource): class Meta: # The usual stuff def dispatch(self, request_type, request, **kwargs): # Do whatever