Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8781481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:18:49+00:00 2026-06-13T20:18:49+00:00

I am using Django built in view for user login: url(r’^user/login/$’, ‘django.contrib.auth.views.login’, {‘template_name’: ‘users/templates/login.html’},

  • 0

I am using Django built in view for user login:

url(r'^user/login/$', 'django.contrib.auth.views.login', {'template_name': 'users/templates/login.html'}, name='user-login'),

After login when I goto user/login again I can login second time. I submit the form and getting:

The current URL, accounts/profile/, didn’t match any of these.

I haven’t declare this url in urls.py.

What I am doing wrong? Why framework want to redirect to this url?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:18:51+00:00Added an answer on June 13, 2026 at 8:18 pm

    django.contrib.auth.views.login redirects you to accounts/profile/ right after you log in.
    You may want to set LOGIN_REDIRECT_URL inside your settings.py file to anything you like..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, this is how I do my login: (r'^login/?$','django.contrib.auth.views.login',{'template_name':'login.html'}), I'm using Django's built in
I'm using Django's built-in User model in one of my projects. Users should be
I built my Django homepage's view using direct_to_template plus lots of extra_context, code example:
i transfered my login view from class based views to built-in views which is
I am using Django in built comments for allowing users to comment on my
I develop web applications using Django on Mac OSX 10.6. I use Django's built
I am using the built in comment system with Django but it has started
Using django comments framework http://docs.djangoproject.com/en/dev/ref/contrib/comments/ Not sure is there option, to make all comments
I am creating an API using Django. Every view responds in JSON. I would
I have a website built using Django on Dreamhost deployed successfully with Passenger and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.