fix NameError: name 'urlpatterns' is not defined