I am new to django and trying to build my first API.
The url structure is as follows but the problem is:
when the first part of the URL matches, it calls that one.
Ex. If I call 'welcome/example' it matches with welcome and doesn't make it to the actual welcome/example...
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^login/', include('shopify_app.urls')),
url(r'^', include('home.urls'), name='root_path'),
url(r'^admin/', admin.site.urls),
url(r'^welcome/', views.welcome),
url(r'^welcome/example', views.create_example), #regex not working
]
#regex not working, Here onlyregexcause you to not have your desired output. Its just matches with your first welcome url i.e.url start with string welcome, thats it , it matches and reditects to view