Conversation
Reviewer's GuideIntroduces a new Django integration example in the README to demonstrate setting up a webhook endpoint with CSRF exemption and method handling using the WHATSAPP service. Sequence diagram for Django WhatsApp webhook endpoint handlingsequenceDiagram
actor User
participant DjangoView as "Django whatsapp_endpoint view"
participant WhatsAppService as "WHATSAPP service"
User->>DjangoView: HTTP GET /whatsapp_endpoint
DjangoView->>WhatsAppService: webhook_challenge_handler(verify_token, challenge)
WhatsAppService-->>DjangoView: (response_content, status_code)
DjangoView-->>User: HttpResponse(response_content, status_code)
User->>DjangoView: HTTP POST /whatsapp_endpoint
DjangoView->>WhatsAppService: webhook_update_handler(update, hmac_header)
WhatsAppService-->>DjangoView: (response_content, status_code)
DjangoView-->>User: HttpResponse(response_content, status_code)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Adjust the require_http_methods decorator to use the positional argument (e.g. require_http_methods(["GET", "POST"])) instead of the named 'request_method_list' to match Django’s API.
- Add a quick example of how to wire this view into urls.py so users see how to route the whatsapp_endpoint in their Django URL configuration.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Adjust the require_http_methods decorator to use the positional argument (e.g. require_http_methods(["GET", "POST"])) instead of the named 'request_method_list' to match Django’s API.
- Add a quick example of how to wire this view into urls.py so users see how to route the whatsapp_endpoint in their Django URL configuration.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Hi @timkofu — thanks so much for this excellent contribution! 🙏 |
|
Hi @david-lev
Yes of course. That is perfect. This is a great software, thanks for making it. |
Hi,
I added a Django example to README.md
Summary by Sourcery
Documentation: