我正在基于此blog创建用户,我在api中使用以下网址,如下所示:
我的api / urls.py:
router = DefaultRouter()
router.register(r'users', UserViewSet)
urlpatterns = [
url(r'^', include(router.urls)),
]
返回
'"%s" is not a valid regular expression: %s' % (regex, e)
django.core.exceptions.ImproperlyConfigured: "^users\.(?P<format>[a-z0-9]+)/?\.(?P<format>[a-z0-9]+)/?$" is not a valid regular expression: redefinition of group name 'format' as group 2; was group 1 at position 37