Closed lemaiyan closed 5 years ago
Updating \mpesa-api\mpesa_api\core\urls.py by adding app_name = 'mpesa'
will likely resolve the issue
app_name = 'mpesa'
urlpatterns = [
url('^b2c/timeout$', B2cTimeOut.as_view(), name='b2c_timeout'),
url('^b2c/result', B2cResult.as_view(), name='b2c_result'),
url('^c2b/confirmation', C2bConfirmation.as_view(), name='c2b_confirmation'),
url('^c2b/validate', C2bValidation.as_view(), name='c2b_validation'),
url('^c2b/online_checkout/callback', OnlineCheckoutCallback.as_view(), name='c2b_checkout_callback'),
]
Further, URL patterns in > django 2.0 moved from regular expressions. Rewriting the URL patterns will probably work better going forwards?
path('mpesa/', include('mpesa_api.core.urls', namespace='mpesa'))
https://docs.djangoproject.com/en/2.0/topics/http/urls/#example
Thanks for this @otuoma. 👍
When running the app on
Django 2
it throws the error below