from django.conf.urls import url from . import views urlpatterns = [ url( regex=r'(?P[-\w]+)$', view=views.ExpenseListView.as_view(), name='list_expense' ), url( regex=r'^$', view=views.TripListView.as_view(), name='list_trip' ) ]