[Answer]-DRF 1.7.1 'str' object has no attribute 'resolve' AttributeError

1👍

Remove the "polls.view", string from the patterns():

urlpatterns = patterns('',
    # Examples:
    # url(r'^admin/', include(admin.site.urls)),
    url(r'^Expediteur/$', views.ExpeViewSet.as_view(), name="expediteur"),
)

To access the view at the /polls/expediteur/ address change the url to:

url(r'^polls/expediteur/$', views.ExpeViewSet.as_view(), name="expediteur"),

Or, if this urls.py is from the polls app:

url(r'^expediteur/$', views.ExpeViewSet.as_view(), name="expediteur"),

Leave a comment