'''
App Urls

Django loads that Python module and looks for the
variable urlpatterns. This should be a Python list
of django.conf.urls.url() instances.

Django runs through each URL pattern, in order, and
stops at the first one that matches the requested URL.

Each regular expression in a urlpatterns is compiled
thefirst time it’s accessed. This makes the system
blazingly fast.
'''
from django.urls import path

from app.views import *

urlpatterns = [
    path(r'countries/',
        CountryListAPIView.as_view(), name='country_list'),
    path(r'states/<int:country>/',
        StateListAPIView.as_view(), name='state_list'),
    path(r'cities/<int:state>/',
        CityListAPIView.as_view(), name='city_list'),
]
