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