I am working with Django, HTML and CSS.
When using
<a href='link' target="_blank">www.supportline.org.uk/problems/suicide/</a>
in my HTML file to open a link on my web page I have no problems. However when inserting this link into a JSON text file i end up with the following:
127.0.0.1:8000/chatbotModel/anxiety/www.supportline.org.uk/problems/suicide/
Does this mean that i will need to manually add this somehow in the urls.py?
What I have tried:
in main urls.py:
urlpatterns = [
path('admin/', admin.site.urls),
path('chatbotModel/', include('chatbotModel.urls')),
]
in app urls.py
urlpatterns = [
path('anxiety/', views.say_hello, name='say_hello'),
path('getResponse/', views.getResponse, name = 'getResponse'),
path('suicidePrevention/', views.suicidePrevention, name = 'suicidePrevention')
]
in views.py
def suicidePrevention(request):
return HttpResponse('suicidePrevention')
Am i heading in the right direction?