I'm using Django 1.11 and new to it.
I'm using default login and logout functions.
When I login, it redirects to accounts/profile
and then generates error as
Using the URLconf defined in myapp.urls, Django tried these URL patterns, in this order:
^ ^login/$ [name='login']
^ ^logout/$ [name='logout']
^ ^password_change/$ [name='password_change']
^ ^password_change/done/$ [name='password_change_done']
^ ^password_reset/$ [name='password_reset']
^ ^password_reset/done/$ [name='password_reset_done']
^ ^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$ [name='password_reset_confirm']
^ ^reset/done/$ [name='password_reset_complete']
^ ^$ [name='home']
^pages/
^search/
^admin/
The current path, accounts/profile/, didn't match any of these.
Is accounts
built-in function in Django?
If it is, how to access url to accounts
app? If no, why it is there?
Edit 2 : url pattern from
myapp.urls.py
urlpatterns = [
url('^', include('django.contrib.auth.urls')),
url('^', include('pages.urls')),
url(r'^pages/', include('pages.urls')),
url(r'^search/', include('search.urls')),
url(r'^admin/', admin.site.urls),
]
By default, successful login in Django redirects to:
?next=
parameter in the URL, orsettings.LOGIN_REDIRECT_URL
otherwise.Relevant code:
LoginView.get_success_url()