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

  • Home
  • SEARCH
  • 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 5974865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:00:07+00:00 2026-05-22T21:00:07+00:00

The password_reset page of my Django site is causing a DoesNotExist exception after an

  • 0

The password_reset page of my Django site is causing a DoesNotExist exception after an email address is entered and the button pressed.

The four URLs required for the password reset function are in (the main project) urls.py as:

(r'^password_reset/$', 'appname.views.cust_password_reset'),
(r'^password_reset/done/', 'appname.views.cust_password_reset_done'),
(r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'appname.views.cust_password_reset_confirm'),
(r'^reset/done/$', 'appname.views.cust_password_reset_complete')

The following is the code used for the associated views:

def cust_password_reset(request):
    return password_reset(request, post_reset_redirect='password_reset/done',template_name='registration/password_reset_done.html')

def cust_password_reset_done(request):
    return password_reset_done(request,  template_name='registration/password_reset_done.html')

def cust_password_reset_confirm(request, uidb36=None, token=None):
    return password_reset_confirm(request, uidb36=uidb36, token=token,
    template_name='registration/password_reset_confirm.html',
    post_reset_redirect='registration/reset/done/')

def cust_password_reset_complete(request):
    return password_reset_complete(request,
    template_name='registration/password_reset_complete.html')

The email address is correctly checked for validity, but the redirect to password_reset/done doesn’t appear to happen. The URL stays as password_reset, but causes a DoesNotExist exception with the value ‘Site matching query does not exist’.

The URLs and templates seem to work properly and password_reset/done displays correctly when manually accessed.
The templates referenced are exact copies of the original Django templates, with just a header/ footer added. Password Resetting without using custom views/templates results in the same error.

Any ideas as to what could be causing this would be greatly appreciated.

  • 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-05-22T21:00:07+00:00Added an answer on May 22, 2026 at 9:00 pm

    That error, “Site matching query does not exist” means that the SITE_ID in settings.py does not match up with an actual Site object in the database. Check the id attribute for your site, and make sure it’s the same as SITE_ID.

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

Sidebar

Related Questions

The flow is: user enters email address after submit, an email is sent to
For example I can point the url '^/accounts/password/reset/$' to django.contrib.auth.views.password_reset with my template filename
I am trying to setup django-registration and it is not recognizing the URLs. I
I am writing a password-reset page for my website. Here's my idea: a. User
My app has normal users: those which come through a typical signup page facebook(FB)
Many lost password workflows usually result in a page which is reached by a
On a standard web signup form, users are required to have a unique email
I created a Forgot Password functionality for my website using the password_reset function that
On my password reset page, I save the user's new password using Security::hash(). When
I am implementing a reset password aspx page and in that page, I am

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.