Hi Ken,
Thanks for your reply.
Do you mean that I should move the app ‘restaurant’ above those of Djoser and the Rest Framework in INSTALLED_APPS?
This is what I have at the moment. I thought it was standard practice to put apps after installed packages in INSTALLED_APPS?
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'rest_framework.authtoken',
'djoser',
'restaurant',
]
I’ve just moved the custom view url pattern for ‘auth/users/’ above the include(‘djoser.urls’) and it works now.
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('restaurant.urls')),
path('', include(router.urls)),
path('', include('django.contrib.auth.urls')),
path('auth/users/', views.signup.as_view(), name='sign-up'),
path('auth/', include('djoser.urls')),
path('auth/', include('djoser.urls.authtoken')),
path('api-token-auth/', obtain_auth_token),
]
Do I need to put my restaurant app above Djoser and Rest Framework in INSTALLED_APPS, then, or not?
Thanks again! 