I have a url configuration of this sort
urlpatterns = [
url(r'webhook/', include('foward_bot.telegram_API.urls', namespace='api_webhook'), name='webhook'),
]
In telegram_API.urls I have
urlpatterns = [
url(r'^(?P<token>[-_:a-zA-Z0-9]+)/$', TelegramView.as_view(), name='api_webhook'),
]
When I try to access this url with reverse in this manner
webhook = reverse('webhook', args={instance.token})
I get the error:
`Reverse for 'webhook' with arguments '(u'297704876:AAHiEy-slaktdaSMJfZtcnoDC-4HQYYDNOs',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []`
I have tried different variations like
webhook = reverse('webhook', kwargs={'token': instance.token}),
webhook = reverse('webhook:token', kwargs={'token': instance.token}),
But I always similar NoReverseMatch
errors