Closed teolemon closed 6 years ago
So there is no django support out of the box. Unfortunately I don't intend to add django compatibility at this time.
I haven't tried this, but you may be able to
from django.urls import path
from your_webhook import assist
urlpatterns = [
path('/', assist._flask_assistant_view_func),
]
Modify the _flask_assistant_view_func
and _api_request
methods of the Assistant
class to use Django's HttpRequest object instead of flask's.
Initialize your Assistant object without a flask app
assist = Assistant(route='/')
This is pretty messy because you would still be using flask under the hood. It's been a while since I've used Django as well so I'm not sure if this would even work.
Is there a way to make this project Django-compatible without forking it outright ?
I'm currently building custom code for my Django project, and have that lingering feeling of rebuilding the wheel.